设为首页 加入收藏

TOP

Android 安装软件后执行“OPEN”引起的Intent血案(系统BUG)(二)
2014-11-24 07:29:21 来源: 作者: 【 】 浏览:2
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 15:19:15)
·关于 Java 学习,有 (2025-12-25 15:19:12)
·有没有Java swing教 (2025-12-25 15:19:09)
·Start, Stop, and Di (2025-12-25 14:50:57)
·C语言入门教程:零基 (2025-12-25 14:50:54)