If I use the code below to disable the static BroadcastReceiver defined in AndroidManifest.xml, will it be re-enabled after reboot? This does not seem to be the case, but the documents do not say whether this should be done.
final ComponentName compName = new ComponentName(context, MyBroadcastReceiver.class); context.getPackageManager().setComponentEnabledSetting( compName, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
Thanks in advance...
Is PackageManager.getComponentEnabledSettings () persistent between cold starts?
. reset / . reset, reset setComponentEnabledSetting(). reset, - (, - ACTION_BOOT_COMPLETED). , , . .
setComponentEnabledSetting()
ACTION_BOOT_COMPLETED
, BroadcastReceiver, AndroidManifest.xml, ?
.
Source: https://habr.com/ru/post/1535645/More articles:Trigger Press "Enter" when clicking a tag in IE 8 - javascriptAndroid: show download symbol in Network ImageView - androidArray formula with over 255 characters - vbaPython library search paths - pythonCan anyone explain why I would like or need Lua mixed with C ++ for the game? - c ++Candy Crush Saga jQuery & Phonegap Countdown System Type - javascriptMultiJson AdapterError Rails 4 Ruby 2 Passenger - ruby-on-railsCUDA initialization error after fork - cudaBash string replace "with" \ "for the file path - variable extension - bashcuda kernel using pthreads Missing configuration error - pthreadsAll Articles