亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

android開機(jī)自啟動(dòng)app示例分享

 更新時(shí)間:2014年01月11日 14:37:08   作者:  
這篇文章主要介紹了android開機(jī)自動(dòng)啟動(dòng)APP的方法,大家參考使用吧

復(fù)制代碼 代碼如下:

/*開機(jī)自動(dòng)啟動(dòng)APP*/
public class BootReceiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {

Log.d("XRGPS", "BootReceiver.onReceive: " + intent.getAction());
if (ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
           Intent mBootIntent = new Intent(context, MainActivity.class);
           mBootIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
           context.startActivity(mBootIntent); 
    } else {
        Log.w("XRGPS", "BootReceiver: unsupported action");
    }
}
}

相關(guān)文章

最新評(píng)論