Hi Erel, this is how my app work:
I have one activity (main) with lot of classes. In the main activity i load main layout and show menu items. The main layout it self contains header, side menu and a container. Container will be the place for every layout shown base on what menu user choose.
Every menu will represented with a class, the class will do loading layout to the container and do some logic process (read, write to database and do some validation).
There is also dialog class (contain alert, progress and some custom layout dialog) that will be call in the activity, classes or even service to update progress info and completeness.
Since i can't declare variable with activity object in services, so i call service in class (say Class E). For now the service run in background while phone in sleep mode and get all data.
question is:
If i have 5 job in sequence to get data, and there is error in job 3 how i can trap/show the error since the phone in sleep mode so remaining job will be skipped ?
If all 5 job is success, how i can raise a message box and wake-up phone from sleep state
*sorry, maybe this is un-ussual behavior of how app in android work, and far away from standard on how it should be. but this is my style (as newbie), i believe b4a can provide what i plan to build, and it does so far