PendingIntent中的一些错误

时间:2012-11-01 06:49:58

标签: android notifications android-pendingintent

从我的应用程序中,我将“活动”设置为“蓝牙设置”选项。如果我从BT设置活动中单击主页按钮并尝试重新启动应用程序它无法工作,任何人都可以让我了解它吗?

notification=new Notification(R.drawable.icon, "", System.currentTimeMillis());
Intent in=new Intent(getBaseContext(),MainActivity.class);

PendingIntent pi=PendingIntent.getActivity(getBaseContext(), 0, in, 0);
notification.setLatestEventInfo(getBaseContext(), "app name", "Application is now running, press here to open", pi);
notifyMgr.notify(id, notification);

0 个答案:

没有答案