moonlightcheese

Untitled

Apr 30th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. package com.conceptualsystems.minutemaid;
  2.  
  3. import android.content.*;
  4. //import android.telephony.*;
  5. import android.util.Log;
  6.  
  7. public class BootReceiver extends BroadcastReceiver {
  8.     final String LOG_TAG = "Minutemaid - BootReceiver";
  9.    
  10.     @Override
  11.     public void onReceive(Context context, Intent intent) {
  12.         String action = intent.getAction();
  13.         if (Intent.ACTION_BOOT_COMPLETED.equals(action)) {
  14.             //DO THINGS ON STARTUP (START THE SERVICE)
  15.             Log.i(LOG_TAG, "boot intent received");
  16.             context.startService(new Intent(context, MinutemaidService.class));
  17.         }
  18.     }
  19. }
Add Comment
Please, Sign In to add comment