android端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
685 B

  1. package com.nsgk.ruralWeb;
  2. import android.content.BroadcastReceiver;
  3. import android.content.Context;
  4. import android.content.Intent;
  5. public class Receiver extends BroadcastReceiver {
  6. @Override
  7. public void onReceive(Context context, Intent intent) {
  8. //Log.e("broadCastReceiver","onReceiver...");
  9. try {
  10. Intent mBootIntent = new Intent(context, FullscreenActivity.class);
  11. // 下面这句话必须加上才能开机自动运行app的界面
  12. mBootIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  13. context.startActivity(mBootIntent);
  14. } catch (Exception e) {
  15. e.printStackTrace();
  16. }
  17. }
  18. }