I want to program a service that reads out the title of an active activity. I just can not get past. I have tried the OS.Library, but I come to a conclusion. Can anyone help me? Please ....
The aim should be that at a very specific window my app comes to the foreground.
(sorry translate with google)
The aim should be that at a very specific window my app comes to the foreground.
(sorry translate with google)
B4X:
Dim OS As OperatingSystem
Dim Tasks As List
Tasks = OS.getRunningTasks(1000)
If Tasks.Size > 0 Then
For i = 0 To Tasks.Size - 1
Dim r As Reflector
r.Target = Tasks.Get(i)
Log(r.GetField("topActivity"))
Log(r.GetField("baseActivity"))
Next
End If
Last edited: