Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.conceptualsystems.minutemaid;
- import android.content.*;
- //import android.telephony.*;
- import android.util.Log;
- public class BootReceiver extends BroadcastReceiver {
- final String LOG_TAG = "Minutemaid - BootReceiver";
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- if (Intent.ACTION_BOOT_COMPLETED.equals(action)) {
- //DO THINGS ON STARTUP (START THE SERVICE)
- Log.i(LOG_TAG, "boot intent received");
- context.startService(new Intent(context, MinutemaidService.class));
- }
- }
- }
Add Comment
Please, Sign In to add comment