Android Question Check if another application has been installed and run

Douglas Farias

Expert
Licensed User
Longtime User
Hi all.
Is there any way to verify that an application has been installed and run on the device.

I am making an application where I will direct the user to download an application in google play, shortly after it download and install the application, I need to check if the user has run this application for more than X Seconds.

Is it possible to do this verification?

PS: I really need to know if the user ran the downloaded application, as there may be cases that users will download and leave installed, but they will never run the application or open it for the first time.


I found a code to check if app is instaled.
B4X:
Private Sub ShowInstalledApps
   Dim pm As PackageManager  'phone library
   For Each pck As String In pm.GetInstalledPackages
     Dim name As String = pm.GetApplicationLabel(pck)
     Log(name)
   Next
End Sub

but now, how can i check if user opned the app, And ran an app for more than 5 seconds.
its possible in B4A? i dont found any example here on the forum.

thx
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Starting from Android 6+ you cannot check whether another app is running
Having a previous version as you can?
 
Upvote 0
Top