hello,
i have a little problem, if me call a sub (in an activity) from a service and the activity is not in front
it seems it create a new activity instead of open the one that is in pause mode.
Private Sub Client_MessageArrived(Topic As String, Payload() As Byte)
Dim received As String = BytesToString(Payload,0,Payload.Length,"UTF-8")
Dim m As Message
m.Initialize
m.Topic = Topic
m.Body = received
CallSubDelayed2(Main,"AddMessage",m)
End Sub
The previous activity might be killed. You shouldn't end with two instances of the same activity. Are you sure that this is the case? Have you changed anything special in the manifest editor?
me expected it used this one, means awake if other activity is in front.
nothing special in manifest.
here the log from debug mode, it really killed the previous activity. (this phone is android 5.0.2)
i switched via menu from main to activitycontrol, there i clicked a button which send data via service to mqtt broker.
the mqtt broker answer to my connection service and this should show in main activity.
its unusual because i have only 2 activitis and if me click back from the other one the main always open.
but i considered to change it that the activity itself fetch this information if needed from service.