Android-为服务实现StartForeland?
因此,我不知道在何处/如何实现此方法,以使我的服务在前台运行。目前,我在另一个活动中通过以下方式开始我的服务:
Intent i = new Intent(context, myService.class); context.startService(i);
然后在myServices的onCreate()中,我尝试startForeplace().?
Notification notification = new Notification();startForeground(1, notification);
所以,是的,我有点迷茫,也不知道如何实现它。
慕的地6264312
相关分类