tigrot Well-Known Member Licensed User Longtime User Jan 25, 2016 #1 Hi everybody, I'm trying to understand the behaviour of this sequence of code. Code: Activity.Finish StartActivity(camera) camera.npreview=0 timx.Enabled=False Activity.finish the first activity.finish should terminate the activity but the code runs till the second, which is the last instruction of the sub.(the first finish is a refuse from a cut and paste, not seen before). I have written this : Code: ToastMessageShow("Prima",False) Activity.Finish Msgbox("Dopo","test") This code displays a toastmessage, terminates and displays no msgbox Code: ToastMessageShow("Prima",False) Activity.Finish ToastMessageShow("Dopo",False) This code generates two toastmessages as aspected. What I think is that the msgbox must have a parent window(like in Windows OS) and cannot run standalone. Thank you in advance for your explanations! Mauro
Hi everybody, I'm trying to understand the behaviour of this sequence of code. Code: Activity.Finish StartActivity(camera) camera.npreview=0 timx.Enabled=False Activity.finish the first activity.finish should terminate the activity but the code runs till the second, which is the last instruction of the sub.(the first finish is a refuse from a cut and paste, not seen before). I have written this : Code: ToastMessageShow("Prima",False) Activity.Finish Msgbox("Dopo","test") This code displays a toastmessage, terminates and displays no msgbox Code: ToastMessageShow("Prima",False) Activity.Finish ToastMessageShow("Dopo",False) This code generates two toastmessages as aspected. What I think is that the msgbox must have a parent window(like in Windows OS) and cannot run standalone. Thank you in advance for your explanations! Mauro
DonManfred Expert Licensed User Longtime User Jan 25, 2016 #2 Activity.finish will be executed and the end of the sub not directly! Dont use a messagebox here. Upvote 0
tigrot Well-Known Member Licensed User Longtime User Jan 25, 2016 #3 Thank you Don. That what I noticed. I have the need to call a phone, close an activity and start another one(in this case the MAIN) and sometimes the call is not started. I was asking myself why this could happen. I don't get an error, simply the call is not started! Mauro Upvote 0
Thank you Don. That what I noticed. I have the need to call a phone, close an activity and start another one(in this case the MAIN) and sometimes the call is not started. I was asking myself why this could happen. I don't get an error, simply the call is not started! Mauro
DonManfred Expert Licensed User Longtime User Jan 25, 2016 #4 start a service and setup a timer for 5 seconds or so start the intent which do the call and finish that activity. in timer tick of your service you start the new activity from the service... Upvote 0
start a service and setup a timer for 5 seconds or so start the intent which do the call and finish that activity. in timer tick of your service you start the new activity from the service...
DonManfred Expert Licensed User Longtime User Jan 25, 2016 #5 or use callsubutils and do a delayed callsub in your new activity. Upvote 0
tigrot Well-Known Member Licensed User Longtime User Jan 25, 2016 #6 I'll try the best solution between those pointed from you. The problem is why the intent for calls SOMETIMES doesn't work? Till I'll explain the behaviour my APP will not always work well. In case I put the call on the last statement of the sub, 99% chance it won't start! Since it's complex anti-aggression system, I must be SURE it works! Upvote 0
I'll try the best solution between those pointed from you. The problem is why the intent for calls SOMETIMES doesn't work? Till I'll explain the behaviour my APP will not always work well. In case I put the call on the last statement of the sub, 99% chance it won't start! Since it's complex anti-aggression system, I must be SURE it works!