设为首页 加入收藏

TOP

Android 安装软件后执行“OPEN”引起的Intent血案(系统BUG)(二)
2014-11-24 07:29:21 来源: 作者: 【 】 浏览:4
Tags:Android 安装 软件 执行 OPEN 引起 Intent 血案 系统 BUG
nentName componentName = new ComponentName(context, TestActivity.class);
intent.setComponent(componentName);

intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);

PendingIntent contentIntent = PendingIntent.getActivity(context, 0, intent, 0);
Notification notification =
new Notification(iResIcon,sNotifybar, System.currentTimeMillis());
notification.flags = notification.flags | Notification.FLAG_ONGOING_EVENT;
notification.defaults =
/*Notification.DEFAULT_SOUND|*/Notification.DEFAULT_LIGHTS;
notification.setLatestEventInfo(context, from, message, contentIntent);
nm.notify(R.string.app_name, notification);
}
@Override
protected void onStart()
{
// TODO Auto-generated method stub
super.onStart();
}
@Override
protected void onResume()
{
// TODO Auto-generated method stub
super.onResume();
}
@Override
protected void onStop()
{
// TODO Auto-generated method stub
super.onStop();
}
@Override
protected void onDestroy()
{
// TODO Auto-generated method stub
super.onDestroy();
}
}


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Android Widget 设计与开发 下一篇Android: 缩放图片文件引起的OOM..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Java 并发工具类:提 (2025-12-25 20:25:44)
·Java面试技巧:如何 (2025-12-25 20:25:41)
·Java并发编程中的线 (2025-12-25 20:25:38)
·C 语言 - cppreferen (2025-12-25 19:50:27)
·《C 语言入门教程》 (2025-12-25 19:50:23)