From: Michael Gernoth Date: Fri, 20 May 2011 18:45:12 +0000 (+0200) Subject: run at boot time X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/ms2-fixes/commitdiff_plain/c32e803e34e204b74691c83ff0d5013a159d651f?ds=sidebyside run at boot time --- diff --git a/MS2Debounce/AndroidManifest.xml b/MS2Debounce/AndroidManifest.xml index ddbbbb3..7f9b472 100644 --- a/MS2Debounce/AndroidManifest.xml +++ b/MS2Debounce/AndroidManifest.xml @@ -12,5 +12,11 @@ + + + + + + diff --git a/MS2Debounce/src/de/rmdir/ms2debounce/DebounceBootReceiver.java b/MS2Debounce/src/de/rmdir/ms2debounce/DebounceBootReceiver.java new file mode 100644 index 0000000..2f97c2c --- /dev/null +++ b/MS2Debounce/src/de/rmdir/ms2debounce/DebounceBootReceiver.java @@ -0,0 +1,15 @@ +package de.rmdir.ms2debounce; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; + +public class DebounceBootReceiver extends BroadcastReceiver{ + @Override + public void onReceive(Context context, Intent intent) { + if("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) { + Intent debouncesvc = new Intent(context, DebounceService.class); + context.startService(debouncesvc); + } + } +}