Questions tagged [usagestatsmanager]

UsageStatsManager provides access to Android device usage history and statistics. This tag is to be used with Android tag.

UsageStatsManager provides access to device usage history and statistics. Usage data is aggregated into time intervals: days, weeks, months, and years. This API requires the permission android.permission.PACKAGE_USAGE_STATS, which is a system-level permission and will not be granted to third-party apps. However, declaring the permission implies intention to use the API and the user of the device can grant permission through the Settings application.

This tag is to be used with tag.

92 questions
-1
votes
1 answer

Xamarin Android C# How to check how many times facebook have been opened

How do I check how many times facebook have been opened? I'm using Xamarin.android with C#. My goal is to check how many times facebook have been opened. I want to increment a integer, each time the user opens the facebook app. I have been looking…
-6
votes
1 answer

The issue is,it takes 3 seconds.I want to check foreground app every 1000milliseconds#THANKS_IN_ADVANCE

UsageEvents usageEvent = mUsageStatsManager.queryEvents(time - 100 * 1000, time); UsageEvents.Event event = new UsageEvents.Event(); // get last event while (usageEvent.hasNextEvent()) { usageEvent.getNextEvent(event); } if…
jai
  • 1
  • 1
1 2 3 4 5 6
7