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 5952227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:39:05+00:00 2026-05-22T17:39:05+00:00

I want to record what application is being used by the user at every

  • 0

I want to record what application is being used by the user at every time. I can write a program to save the processes running on the phone, but I want to know which one is the one that the user is interacting with.

  • 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-05-22T17:39:06+00:00Added an answer on May 22, 2026 at 5:39 pm

    I don’t know if this is what Chris was referring to in the comment, and I don’t know how reliable it is, but you can iterate through the list returned by ActivityManager#getRunningAppProcesses () :

    public List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses ()
    

    Since: API Level 3

    Returns a list of application processes that are running on the device.

    Returns a list of RunningAppProcessInfo records, or null if there are no running processes (it will not return an empty list). This list ordering is not specified.

    Then, check for the importance field of each ActivityManager.RunningAppProcessInfo:

    public int importance
    

    Since: API Level 3

    The relative importance level that the system places on this process. May be one of IMPORTANCE_FOREGROUND, IMPORTANCE_VISIBLE, IMPORTANCE_SERVICE, IMPORTANCE_BACKGROUND, or IMPORTANCE_EMPTY. These constants are numbered so that “more important” values are always smaller than “less important” values.

    You may have a service polling every 30 seconds or so and log those values.

    (BTW, you want to look for those IMPORTANCE_FOREGROUND and IMPORTANCE_VISIBLE)

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

Sidebar

Related Questions

I want to develop an iPhone application which has to record the phone conversation.
I am developing an application in which I want to record the sound of
I have a non-rails application that I want to use rails active-record migrations with.
I want to record Cpu usage ,cpu time ,VM size in notepad per minute
I want to record voice as long as holding the record button and save
i want to record video through webcam using Directshow.Net.i can able to record the
I created an application for android. Now, I want to record a video on
I'm working on a Rails web application, and it's currently being used by some
I am developing one application. In that I want to record the sounds and
I want to record the handshake messages between server and client into the file

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.