Library for fetching usage stats of applications in an android device.

Overview

AppsUsageMonitor Library Tweet

Java library for Android to detect time spent on applications in an android device.

-feature-graphic

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 Download

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

alt tag

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. 

Comments
  • Mobile Internet Data usage not available

    Mobile Internet Data usage not available

    Hi, Greate work.

    You mention in Read Me that "Returns the amount of mobile data consumed by the application." but the app not showing the data used by the particular app.

    How can I fix that?

    Thanks.

    opened by RB4915 1
  • Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/collect/Lists;

    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/collect/Lists;

     Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/collect/Lists;
        at bot.box.appusage.delegate.FetchPackageTimelineDelegate.doInBackground(FetchPackageTimelineDelegate.java:50)
        at bot.box.appusage.delegate.FetchPackageTimelineDelegate.doInBackground(FetchPackageTimelineDelegate.java:20)
        at android.os.AsyncTask$2.call(AsyncTask.java:305)
    
    opened by thinkido 0
  • Data receives from this library is half of data from Digital Wellbeing

    Data receives from this library is half of data from Digital Wellbeing

    Hey TheBotBox, Thanks for this amazing library. I have to get the total usage time of the phone for that purpose I'm using this amazing library. Issue is when I compare my data with digital wellbeing, the data I received is half. It means it is not accurate. It will be better if you fix those issues. Thanks

    opened by prateekcode 0
  •  All Application Usage not working properly

    All Application Usage not working properly

    The feature "All Application Usage" is not working correctly. I made a comparison with the usage results of yesterday with other apps with the same feature, and they don't only match. And another thing: is it normal that the mTotalUsage variable in DurationRange.WEEK being higher than in the DurationRange.YESTERDAY, for example? That was what happened to me, even that I don't know if DurationRange.WEEK is about the average time for each day of the week.

    opened by carlosrsabreu 1
  • +1

    +1

    Thank you and great work. 1 more suggestion you can add weekly usage report day wise.

    Originally posted by @fenilDominant in https://github.com/TheBotBox/AppsUsageMonitorAPI/issues/1#issuecomment-486551158

    enhancement 
    opened by alluriramgopalvarma 1
Releases(v1.1)
Owner
TheBotBox
What I cannot build, I do not understand
TheBotBox
This is a News Application for android mobiles, fetching news through Guardian API.

News-In-Hand This is a NEWS FEED APP which gives a user regularly-updated news from the Internet. To achieve this, I use the Guardian API. This is a w

Bhramar Virmani 1 Nov 5, 2021
Clean architecture dictionary app fetching remote data with local caching

ComposeDictionary Clean architecture dictionary app fetching remote data with local caching Installation Clone this repository and import into Android

Timothy Serem 2 Feb 19, 2022
This Andoird project is about classifying garbage pictures using a CNN-based Tensorflowlite model and fetching location using GPS to mark its area on the map.

Grbage_Detector_And_Locator Description As per some of the recent reports published, in India, the pollution levels are increasing at a colossal pace

Sayantan Banerjee 5 Mar 5, 2022
HyperUPnP is Android Application that lets you to Stream Media from PC, NAS or any other device running UPnP/DLNA compliant media server to your Android Device.

Hyper UPnP Android UPnP/DLNA client Stream Media from PC, NAS or any other device running UPnP/DLNA compliant media server to your Android Device. Int

Var Bhat 8 Jul 17, 2022
Android app with advanced usage of Epoxy library

Epoxy Advanced Best practices and advanced usages (EditText & Forms) of Epoxy library written in accordance with the Modular and Clean Architectures.

Yusuf Gökmen Arısoy 6 Aug 30, 2022
An android application which shows usage of various jetpack libraries built by the android team

JetPacker JetPacker is an android application which implements various jetpack libraries created by the android team. FEATURES - (Will be updated as m

Ibrahim 14 Dec 9, 2022
Android Phishing Application.This Project is for Educational purposes only.The Developer of this application is not responsible of any bad usage

Android Phishing Application.This Project is for Educational purposes only.The Developer of this application is not responsible of any bad usage

Aria Shirazi 93 Oct 23, 2022
A sample Android app which showcases advanced usage of Dagger among other open source libraries.

U+2020 A sample Android app which showcases advanced usage of Dagger among other open source libraries. Watch the corresponding talk or view the slide

Jake Wharton 5.7k Dec 27, 2022
A Frida based tool that traces usage of the JNI API in Android apps.

jnitrace A Frida based tool to trace use of the JNI API in Android apps. Native libraries contained within Android Apps often make use of the JNI API

null 1.1k Jan 7, 2023
Allows usage of vCard resources with the Android contacts provider

vcard4android vcard4android is an Android library that brings together VCard and Android. It's a framework for parsing and generating VCard resources

bitfire web engineering 7 Dec 15, 2022
Android library for finding connected devices on same WiFi network. It can provide IP Address, device name, MAC Address and vendor names.

Android WiFi Tools Android library for finding connected devices on the same WiFi network. It can provide IP Addresses, device names, MAC Address and

Tej Magar 5 Nov 16, 2022
Changelog - a android library, it helps developers display the history of changes in their applications

Changelog is a android library, it helps developers display the history of changes in their applications. Supports Locales, Layout direction

Amirhosein Barati 2 Aug 1, 2022
A library for Android to get the market name of the device.

GoogleSupportedDevices A library for Android to get the market name of the device. Getting Started Include the library in your build.gradle. implement

David González 7 Dec 4, 2022
This application uses Google Play Services Vision library to scan barcodes. It uses Google's on device ML kit to scan for barcodes.

Barcode-Scanner This application showcases use of Google Play Services Vision library It uses Google's on device machine learning kit to scan for barc

Soumik 2 Apr 28, 2022
Source code of JekyllEx Android App which can manage your Jekyll blog directly from your Android device!

JekyllEx Android App Built with ❤︎ by Gourav Khunger ?? Introduction JekyllEx is an Android App that allows you to manage a Jekyll Blog directly from

JekyllEx 24 Nov 8, 2022
Android Study Jams - These are applications built for Android Study Jams 2022 at Chitkara University

Project Description These are applications built for Android Study Jams 2022 at

Armaan Jain 3 Sep 16, 2022
Examples of Android applications

Android Demos This is a collection of basic android examples created by Novoda. CarouselFragment CompassExample ContactSelector CustomActivityTransiti

Novoda 2k Dec 16, 2022
Using Android device to uninstall iPhone apps

Using Android device to uninstall iPhone apps

chi 23 Nov 6, 2022
An open source application to make your own android applications without coding!

Stif An Open source project for building Android Application at a go both with and without coding. This project was inspired from Scratch and Sketchwa

Nethical org 5 Aug 28, 2021