Android – Start service on boot

Well here is a complete example of an AutoStart Application AndroidManifest file <?xml version=”1.0″ encoding=”utf-8″?> <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”pack.saltriver” android:versionCode=”1″ android:versionName=”1.0″> <uses-permission android:name=”android.permission.RECEIVE_BOOT_COMPLETED” /> <application android:icon=”@drawable/icon” android:label=”@string/app_name”> <receiver android:name=”.autostart”> <intent-filter> <action android:name=”android.intent.action.BOOT_COMPLETED” /> </intent-filter> </receiver> <activity android:name=”.hello”></activity> <service android:enabled=”true” android:name=”.service” /> </application> </manifest> autostart.java public class autostart extends BroadcastReceiver { public void onReceive(Context context, Intent arg1) … Read more