Answers for "android studio start service on boot"

2

android start service on boot

<!-- Allows application to receive actions related to rebooting -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<!-- Inside your <application> -->
<receiver
	android:name="com.example.MyBroadcastReceiver"
	android:exported="true"
	android:enabled="true"
    android:installLocation="internalOnly">
	<intent-filter>
		<!-- Handles cold reboot (power off/on) -->
		<action android:name="android.intent.action.BOOT_COMPLETED" />
		<!-- Handles quick restart -->
		<action android:name="android.intent.action.QUICKBOOT_POWERON" />
	</intent-filter>
</receiver>
Posted by: Guest on October-18-2020

Code answers related to "android studio start service on boot"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language