Android Open Source - UnlockHumor Boot Receiver






From Project

Back to project page UnlockHumor.

License

The source code is released under:

Apache License

If you think the Android project UnlockHumor listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package cn.chendihao;
// w w w  .j  av  a  2  s. com
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class BootReceiver extends BroadcastReceiver {

  @Override
  public void onReceive(Context context, Intent intent) {
    
     if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)){ 
          Intent newIntent = new Intent(context, SettingActivity.class); 
          newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  //???????????????????????? 
          context.startActivity(newIntent);    
     }  
     
     Toast.makeText(context, "okay boot receiver", Toast.LENGTH_LONG).show();
  }

}




Java Source Code List

cn.chendihao.AboutActivity.java
cn.chendihao.BootReceiver.java
cn.chendihao.ScreenOnReceiver.java
cn.chendihao.SettingActivity.java
cn.chendihao.UnlockHumorService.java