Tuesday, 22 June 2021

Difference between Foreground service vs Activity in android

I am trying to create one hobby app on Android rooted device. In this app there is no need for user interaction as well and app need to run continuously . I am trying to use some sensors (accelerometer/gps) and camera also. I have 2 approaches for this implementation as mentioned below-

1- Single Activity with Kiosk mode

2- Foreground Activity starting from application class

So I am looking for pros and cons for both the approaches in terms for battery , some background tasks etc.

Does doze mode/screen sleep impact activity and foreground service differently?



from Difference between Foreground service vs Activity in android

No comments:

Post a Comment