Android Question check if activity is isplayed

yaniv hanya

Active Member
Licensed User
I have a player service that should play no matter what activity of the app I am on.
How can I check from the service if the activity controlling the service is displayed
to know whether to update its progressbar or not
 

MarkusR

Well-Known Member
Licensed User
Longtime User
a activity run always through
B4X:
Sub Activity_Resume
Visible
B4X:
Sub Activity_Pause (UserClosed As Boolean)
Not Visible

u can use a flag in your service

with
B4X:
StartActivity
you can bring a activity in front
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
B4X:
    If IsPaused(controlling) Then
        ' Controlling activity is paused
else
        ' Controlling activity is running
    End If
 
Upvote 0
Top