Extension needed to check which application is open on the screen

com.jaxparrow.tasksinfo.aix (9.9 KB)

It has an event and 4 methods ( functions )

  • Do (Event)
    Callback for the StartForegroundAppListener function

  • StartForegroundAppListener
    Starts the listener with an interval
    accepts : int ~ interval

  • CurrentForegroundApp
    Returns the package name
    returns: String ~ packageName

  • hasUsageAccess
    Checks if the app has usage access
    returns: boolean

  • OpenUsageAccessSettings
    Opens the usage access settings to grant permission

This extension uses android.permission.PACKAGE_USAGE_STATS and android.permission.GET_TASKS permissions

I don’t have time to test them myself right now. Will do it when I have time.

Uses this lib:

8 Likes