How to know if the Activity is shown

farisnt

Member
Licensed User
Longtime User
Hi
I am making a program (Chat Software) that run the app as service in backgroud
this software should show a notification and display a sound when there is an incomming message, but the software interface is not shown

how can i do this ??
THanks
 

farisnt

Member
Licensed User
Longtime User
Thanks for reply
but I want to show the number of notification only when the APP interface is not shown ...
 
Upvote 0

farisnt

Member
Licensed User
Longtime User
THanks alot
But I already find a workaround

B4X:
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed=False Then
ToastMessageShow ("Program is running in background",False)
Iamshown=False
End If
End Sub

and in the Sub Process_Globals I add
B4X:
Iamshown=False

The Service will read the Value for IamShown, if it was yes then it will display make the notification, other it will not

NOTE: The Iamshown will have the default value when the app start as True

Correct for me if I am wrong
Thanks
:):):):)
 
Upvote 0
Top