Android Question How to "consume" the Starting Intent

Alessandro71

Well-Known Member
Licensed User
Longtime User
My B4XPages app receives a starting Intent from another app, with some Extras.
I get the Starting Intent in the Appear Sub of B4XMainPage as follows

B4X:
Sub B4XPage_Appear
    Dim In As Intent = B4XPages.GetNativeParent(Me).GetStartingIntent

This works the first time the app is started.
After the app is running, if I open another B4XPage and later I ClosePage it, or the user sends the app in background, the B4XMainMainPage Appear is called again, but the Starting Intent is still the one who started the app before.
Is there a way to "consume" the Starting Intent or should I keep track of which Intent has already been processed and skip it the second time?
 
Solution
Remember the intent and check if is is different

See this for an example

DonManfred

Expert
Licensed User
Longtime User
Remember the intent and check if is is different

See this for an example

 
Upvote 0
Solution

Alessandro71

Well-Known Member
Licensed User
Longtime User
please note that I used "search" before asking, but I haven't guessed that "reset" or "cleared" were the right keywords to try...
 
Upvote 0
Top