TriggerOnBoot.java :  » UnTagged » hackathon-jp » jp » co » haw » android » example » shake » Android Open Source

Android Open Source » UnTagged » hackathon jp 
hackathon jp » jp » co » haw » android » example » shake » TriggerOnBoot.java
package jp.co.haw.android.example.shake;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class TriggerOnBoot extends BroadcastReceiver {

  @Override
  public void onReceive(Context context, Intent intent) {
    if("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
      Intent newIntent = new Intent(Intent.ACTION_VIEW);
      newIntent = new Intent(context, ShakeDetector.class);
      context.startActivity(newIntent);
    }
    
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.