I have an Android app with 3 activities in 1 package. I also have 1 more package(monitoring package) which has java files mainly for monitoring the performance of these 3 activities.Now I need to monitor cpu usage of my app and I need to have this cpumonitor file defined for the same in monitoring package. I am not supposed to touch the 3 activities. How do I achieve this?
I have seen various posts wherein you get the current running process from activitymanager and find cpu usage. In my case, I cant get context from these 3 activities since I am not allowed to edit them.