Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9126769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:07:09+00:00 2026-06-17T07:07:09+00:00

I’m trying to make an app which records usage of various apps on the

  • 0

I’m trying to make an app which records usage of various apps on the device. e.g: 10 mins for Fifa, 23 mins for GTA and etc. right now i have service which runs constantly and i have a broadcast receiver which suppose to trigger when any application package changes( using intent.action.PACKAGE_CHANGED), but unfortunately code inside the broadcast never runs. i appreciate if any one could hint out the problem or tell me any other ways to do this. Thanks

public class ScreenReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
     Log.d("BROADCAST", "Works fine" );
}

}

and this is the code inside the Service class:

public int onStartCommand(Intent intent, int flags, int startId) {
    IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_CHANGED);
    ScreenReceiver recevier = new ScreenReceiver();
    registerReceiver(recevier, filter);runningApps();

    return START_STICKY;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:07:11+00:00Added an answer on June 17, 2026 at 7:07 am

    PACKAGE_CHANGED intent will only be sent when the app iteself changes . it has nothing to do with app usage .

    in fact , there is no official way to monitor apps usage . there are only similar solutions:

    1. up to jelly bean , you could read the logs and find out when a process of an app has started and when it closed (or user moved to another app) .

    2. you can poll every now and then about the recently launched apps or the currently running processes .

    3. you can create an launcher app that will find out which apps are being launched within it.

    of course , each of the methods i’ve written has its flaws and only give you a clue about the real usage , and of course since android supports running more than one app at the same time , i don’t think any method would suffice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to select an H1 element which is the second-child in its group
I am writing an app for my school newspaper, which is run completely online
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.