Back to project page SensorsWebLogger.
The source code is released under:
GNU General Public License
If you think the Android project SensorsWebLogger 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 org.kost.android.sensorsweblogger; /* ww w . j a v a2s .c o m*/ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; public class MyReceiver extends BroadcastReceiver { public MyReceiver() { } @Override public void onReceive(Context context, Intent intent) { SharedPreferences sharedPrefs = context.getSharedPreferences(context.getPackageName() + "_preferences", Context.MODE_PRIVATE); if (sharedPrefs.getBoolean("pref_on_boot",true)) { Intent myIntent = new Intent(context, MainService.class); context.startService(myIntent); } } }