From c32e803e34e204b74691c83ff0d5013a159d651f Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Fri, 20 May 2011 20:45:12 +0200 Subject: [PATCH] run at boot time --- MS2Debounce/AndroidManifest.xml | 6 ++++++ .../rmdir/ms2debounce/DebounceBootReceiver.java | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 MS2Debounce/src/de/rmdir/ms2debounce/DebounceBootReceiver.java 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); + } + } +} -- 2.39.5