W winelover Member Licensed User Longtime User Dec 27, 2011 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Dec 28, 2011 #2 When your activity is not in the foreground it can be destroyed by the OS. Upvote 0
W winelover Member Licensed User Longtime User Dec 28, 2011 #3 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
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
Erel B4X founder Staff member Licensed User Longtime User Dec 28, 2011 #4 See this thread for more information about the activities life cycle: http://www.b4x.com/forum/basic4andr...87-android-process-activities-life-cycle.html You can use StateManager to help you with restoring the state. Basic4android Search: StateManager Upvote 0
See this thread for more information about the activities life cycle: http://www.b4x.com/forum/basic4andr...87-android-process-activities-life-cycle.html You can use StateManager to help you with restoring the state. Basic4android Search: StateManager
F Flosch Member Licensed User Longtime User Jan 5, 2013 #5 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
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?
Erel B4X founder Staff member Licensed User Longtime User Jan 6, 2013 #6 The Result event should fire when the activity restarts. Upvote 0
J jamessp Member Licensed User Longtime User Apr 13, 2014 #7 Erel said: The Result event should fire when the activity restarts. Click to expand... Erel, How do I call an event that is called automatically by the click? Upvote 0
Erel said: The Result event should fire when the activity restarts. Click to expand... Erel, How do I call an event that is called automatically by the click?
DonManfred Expert Licensed User Longtime User Apr 14, 2014 #8 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 Code: Copy Sub ClickButton(b As Button) Dim r As Reflector r.Target = b r.RunMethod("performClick") End Sub Upvote 0
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 Code: Copy Sub ClickButton(b As Button) Dim r As Reflector r.Target = b r.RunMethod("performClick") End Sub