Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

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>
Comment

PREVIOUS NEXT
Code Example
Java :: java get current date string 
Java :: java convert string to int 
Java :: convert string to list java 8 
Java :: array to map java 
Java :: kill all java processes windows 
Java :: android essential plugin missing 
Java :: @SpringBootApplication 
Java :: apk full form 
Java :: Java android studio int to string 
Java :: internet access android manifest 
Java :: java measure execution time 
Java :: bukkit runnable 
Java :: javafx open file dialog 
Java :: java for map 
Java :: flutter request location permission 
Java :: Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt 
Java :: change editext hint color android 
Java :: finally block does not complete normallyJava(536871096) 
Java :: gradle build with javadoc 
Java :: display default value of auto commit java 
Java :: java arraylist get number of elements with same parameter 
Java :: set html text android java 
Java :: collection vs collections 
Java :: how to restart activity in android 
Java :: javafx set min window size 
Java :: spring jpa tree structure 
Java :: actionlistener java 
Java :: localdatetime to timestamp 
Java :: calculate age from localdate java 
Java :: localdate to timestamp in java 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =