Android Question activities and matching service result

wmardian

Member
Licensed User
Longtime User
Dear Erel and All B4A users..
Could you please help for my questions?

I have an activities that hold a master data and this call a service to retrieve detail. Before finish retrieving detail, the user press back key, and call the same activities AGAIN, and call the service to retrieve detail for second master data

my question;
1. what happen if same service called twice? with different data passed to it. do the service will be recreated? or second call will be executed after first service job finish? or they can running at the same time (duplicate it self), but how i match the result to the matching activities?

2. what is the best practice to check running service? Should i create public boolean variable inside public module that i can access from service and from activities to see a service is running or stop?

i hope i can explain clearly.
Thanks in advance

best Regards
W Mardian
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…