Activity_Create after ContentChooser?

winelover

Member
Licensed User
Longtime User
Hello,

I'm using the ContentChooser to get a picture from the Phone's Gallery.

On the emulator the program raises the Result event, as expected, but on the phone it raises the Activity_Create event.

Does anyone know why this happens?

Thankx.
Mischa
 

winelover

Member
Licensed User
Longtime User
That means that it also destroys the info I already entered in some textfields!
Is there any way to avoid that the OS destroys the activity? Can I keep the activity alive in some way?

Greetz,
Mischa
 
Upvote 0

Flosch

Member
Licensed User
Longtime User
Hi I have the same problem - so i have one mor question:

If my activity is destroyed by the OS is there a possibility to get the result from the ContantChooser?

I want to set a selected image as background.
If the OS destroyed my activity I'm able to figured that out after the restart of the activity and could set the right image as background. The question is how can I get the information about the picture wich was selected?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I know that this code has originally opened a spinner. I´ve changed the code here in editor to a button. So the code is untested. I don´t know whether it works or not.
Give it a try

B4X:
Sub ClickButton(b As Button)
  Dim r As Reflector
  r.Target = b
  r.RunMethod("performClick")
End Sub
 
Upvote 0
Top