So I'm not sure where/how to implement this method to make my service run in the foreground. Currently I start my service by the following in another activity:
Intent i = new Intent(context, myService.class);
context.startService(i);
And then in myServices' onCreate() I try the startForeground()...?
Notification notification = new Notification();
startForeground(1, notification);
So yeah I'm a bit lost and unsure of how to implement this.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…