0
说我开始通过以下的通知我的应用程序的服务:Android - 如何关闭startForeground启动的服务通知?
notification = new Notification(R.drawable.icon, getText(R.string.app_name), System.currentTimeMillis());
Intent notificationIntent = new Intent(this, mainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
initService.notification.setLatestEventInfo(this, getText(R.string.app_name), "ibike rider", pendingIntent);
startForeground(ONGOING_NOTIFICATION, notification);
我怎么会去shutting down/cancelling
这项服务?在另一项活动中可以做到这一点吗?
谢谢。
很好的答案,谢谢你! – JDS