Android - implementing startForeground for a service?

前端 未结 11 1359
不思量自难忘°
不思量自难忘° 2020-11-22 06:26

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:

<         


        
11条回答
  •  天命终不由人
    2020-11-22 07:18

    I'd start by completely filling in the Notification. Here is a sample project demonstrating the use of startForeground().

提交回复
热议问题