1

从我的应用程序中,我将 Activity 设置为蓝牙设置选项。如果我从 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);
4

0 回答 0