Android Question Resuming from pause issue

Alessandra Pellegri

Active Member
Licensed User
Longtime User
My application is associated with some file extension. So if I open one of these files from file manager or email the app starts.

The problem is that after I open a file, every time my app pauses and resumes, it believes that I am opening that file again.

In other words, my code is :
B4X:
Sub Activity_Create(FirstTime As Boolean)
....
....
   Dim in As Intent
   in = Activity.GetStartingIntent
   If in.IsInitialized Then
     If in.GetData <> Null Then
       If in.GetData<>"" Then
...
....
....

If in.GetData was different from "" the first time that I launch the app (because I am opening a file), it will be different from "" every time that the app resumes from pause.

How could I solve that?

Thank you
 
Top