Quote:
Originally Posted by pooja.a.maheshwari You can know by following these steps:
1. ApplicationManager.getVisibleApplications() returns ApplicationDescriptor[].
2. ApplicationManager.getForegroundProcessId() returns foreground app's process Id.
3. ApplicationDescriptor.getName() returns the app name.
4. Check the output of step 3. For the app name = Home Screen, get ApplicatonManager.getProcessId(ApplicatonDescripto r).
If the output of step 2 = output of step 4, then Homescreen is in foreground, else not. |
Did this solution help you? Please respond.