0

I'm new to Android development and I'd like to develop an app that shows application statistics, but only for their background runs (with background i mean the app is totally closed, also in the multitasking, and it starts to run for doing different jobs, or run always in background for different reasons, for example the messaging apps that must be always running in background...).

For example i would like to know the amount of time of run in background of the app in a certain timespam, how many times the app was started in the background in a certain timespam, the duration time of single run in background of the app etc...

My question is: are there APIs that provide this informations? If not, is it possible to retrieve this informations in another way? I'm interested in developing with API 24 (Android 7.0 Nougat) and above.

I have read about ActivityManager and AppUsage, but i can not figure out how they can be useful for my purpose.

Can anyone help me please? Thank you.

1 Answers1

0

I think you can do this with very easy steps first make the application which will run in the background and for this, you can refer to this link.

Link of background running app

after this, you can use SQLite DB to store all log information. hope this will help you.

Rishabh Gupta
  • 119
  • 1
  • 5