I have 5 Activities...when user press OK button on Item 1 i call
B4X:
StartActivity(Item1)
When user press BACK key on remote controll then i call:
B4X:
Activity.Finish
Some time when user press OK to StartActivity(Item1) apk starts Main Activity because Activity Item1 does not get populated all variables from server responde. I try DoEvents but it is same.
How to prevent to start Main Activity From Item1 Activity if Activity does not get all variables populated from server?
I'm not sure that I fully understand the problem. Sounds to me that you need to move the communication code to a service. This will allow you to decide whether to start the activity or not.
I im using Activity Module not Service Module...because in Activity Module i have added labels panels imageviews bbitmaps and json code to parse from server....how can i add thease items in Service Module?
Service cannot show any UI. It is not exactly clear to me what your code is doing, however if you make any http requests then it is better to make them on a service and then the response will not be affected by the current running activity.