J jvrh_1 Active Member Licensed User Apr 26, 2020 #1 Hello! When I am in a service, I need to know what activity is open. Any ideas?
DonManfred Expert Licensed User Longtime User Apr 26, 2020 #2 jvrh_1 said: When I am in a service, I need to know what activity is open. Click to expand... You know what activities are available. You need to get rid of them. B4X: Copy If IsPaused(Main) = False Then ' Main is the Activity to check.... Do it for all your activities. Log("Main is Showing") End If Edit to add: B4X: Copy public Sub Activitycheck() Dim Activities() As Object = Array(Main) ' Add all your activities to this array For Each Act As Object In Activities If IsPaused(Act) = False Then Log($"${Act} is Showing"$) End If Next End Sub Last edited: Apr 26, 2020 Upvote 0
jvrh_1 said: When I am in a service, I need to know what activity is open. Click to expand... You know what activities are available. You need to get rid of them. B4X: Copy If IsPaused(Main) = False Then ' Main is the Activity to check.... Do it for all your activities. Log("Main is Showing") End If Edit to add: B4X: Copy public Sub Activitycheck() Dim Activities() As Object = Array(Main) ' Add all your activities to this array For Each Act As Object In Activities If IsPaused(Act) = False Then Log($"${Act} is Showing"$) End If Next End Sub
J jvrh_1 Active Member Licensed User Apr 26, 2020 #3 Thanks DonManfred! Works perfectly! Thanks for you help one more time. Upvote 0