Hi,
i've a problem when i try to auto-open a customDialog into a function outside Activity_Create.
So...from Main i call a service that exec a polling from an externa device. After polling..at the end, i exit from Service and re-call main activity passing it some data read from background service.
My problem is that if i try to open (when i return to Main Activity) a customDialog for view results extract from device...it don't work.
I don't able to see the return code of show method. Below pieces of my code:
Backgroud service
B4X:
If dataSendPlatform.Size = 1 Then
Main.data = meterData.misura
Main.timeMeasure = meterData.dataTime
Main.extraData = meterData.fFlag
AStream.Close
Main.deviceType = "GLC"
StartActivity(Main)
CallSub(Main, "RefreshData")
StopService(es)
End If
..when i close the service, i call a subroutine from Main thath it perform a view data reload. If i have multiple data, i want to open a CustomDialog with all data passed from service to Main Activity (below a piece of relevant code):
StartActivity sends a message to the internal message queue. When this message is processes the activity is started.
This means that the activity will not be active when you call CallSub (unless it was already visible).
StartActivity sends a message to the internal message queue. When this message is processes the activity is started.
This means that the activity will not be active when you call CallSub (unless it was already visible).