Android Question How to Close the Activity?

ldhyob

Member
Licensed User
Longtime User
Hello, Please help me: how to close a specified Activity in Service, and I don't want to use CallSub or CallSubDelayed.
 

Linostar

Member
Licensed User
Longtime User
I don't think there is a B4A solution, for your problem, that doesn't include CallSub or CallSubDelayed. May I ask what do you have against those 2 functions?
 
Upvote 0

ldhyob

Member
Licensed User
Longtime User
I don't think there is a B4A solution, for your problem, that doesn't include CallSub or CallSubDelayed. May I ask what do you have against those 2 functions?
First of all thank you for your reply! Sometimes, these two functions are nottoo good! Don't work! So I want to have a look whether there are bettersolutions in B4A.
 
Upvote 0

NeoTechni

Well-Known Member
Licensed User
Longtime User
I would just put a sub in the activity to close itself

sub CloseMe
activity.finish
end sub

That's the easy way. The other way I send messages to an activity without doing that is to store the data/message in a variable, then just have a timer set up on the activity that checks the variable.
 
Upvote 0

ldhyob

Member
Licensed User
Longtime User
I would just put a sub in the activity to close itself

sub CloseMe
activity.finish
end sub

That's the easy way. The other way I send messages to an activity without doing that is to store the data/message in a variable, then just have a timer set up on the activity that checks the variable.
I seemed to understand something. Thank you!
 
Upvote 0
Top