Back to project page appsensor.
The source code is released under:
GNU General Public License
If you think the Android project appsensor listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.dfki.appsensor.logging; //from w w w . j a v a2 s.com import de.dfki.appsensor.utils.App; import de.dfki.appsensor.utils.Utils; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; /** * @author Matthias Boehmer, matthias.boehmer@dfki.de */ public class ServiceStarter extends BroadcastReceiver { /* * (non-Javadoc) * * @see android.content.BroadcastReceiver#onReceive(android.content.Context, * android.content.Intent) */ @Override public void onReceive(Context context, Intent action) { Utils.dToast(App.getAppContext(), "onReceive"); Utils.d(this, "received boot intent -- starting component BackgroundService"); Intent starter = new Intent(context, BackgroundService.class); starter.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startService(starter); } }