1

I am getting this ANR in our app . Whenver I am calling startForegroundService() , in the start of the onCreate(), I am elevating the service to foreground with a notification .

Is there any way I can avoid this ANR ? This contributes to 90% of the ANR that we are getting .

I looked into this question but for them they are saying its causing a crash for them , while for us its an ANR

enter image description here

1 Answers1

-1

Follow these links to see the examples of foreground services in android: Sample

Sample 2

Muhammad Saad Rafique
  • 3,158
  • 1
  • 13
  • 21
  • I understand how foreground services work.Its already implemented and its in production for the last 3 months. Our app has more than 1 million DAU with 99.90% ANR free sessions. The ANR that I added in the question is the leading cause of the remaining 0.10% of ANRs. – thenoob100pi Dec 31 '18 at 10:04