Android Question Is an Specific activity open?

When I am in a service, I need to know what activity is open.
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:
Upvote 0
Back
Top