AppsUsageMonitor Library
Java library for Android to detect time spent on applications in an android device.
Contents
Requirements
Features
Implementation
AndroidX
API Usage
Wiki
To-dos
Release-Notes
License
Features
- Returns the list of all the application used in the device.
- Returns the total duration for which the applications are being used.
- Returns the total number of times the application is launched.
- Returns the amount of mobile data consumed by the application. [Added in 1.0.2] [#3]
- Returns the timestamp on which the application was last launched.
- Returns the total time spend on device [calculates only the time spend on application & not idle screen time]
- Returns all the above mentioned usage data that can be filtered on the basis of Duration i.e. for TODAY, YESTERDAY, WEEK, MONTH
Implementation
Library is available on JCenter, simply add the following line in your app build.gradle
implementation 'the.bot.box:appusagemonitor:{latest-version}'
where {latest-version}
corresponds to latest published version
To-dos
-
androidX support[completed] - Conversion to kotlin
-
Query usage for a specific package[completed] - Return sorted list on the basis of Data Usage, App Usage Time,App Launch Counts.[currently sorted on the basis of app usage time]
-
Calcuate Data usage of applications(Both Wifi & Mobile Data)[currently calculating only mobile data][completed] - App Usage for any particular date
-
Fetch [launch & exit] timeline of any particular app for duration of TODAY & YESTERDAY.[completed] - Implement device & particular application usage limit & notify when usage limit exceeds
- Query for device lock-unlock count
- To Query for both system and installed applications or either one of them
- Code Commenting
License
Copyright (c) 2020 TheBotBox
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without
limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to
whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE,ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.