Android Question Event not fired with SaveFile function

CR95

Active Member
Licensed User
I am using the "Save File" code from Erel's sample
https://www.b4x.com/android/forum/t...list-of-other-related-methods.129897/#content

It goes well if I use it in a small test program (with B4XPages) -> B4A program opens a "system" window and requests user's agreement for writing the file in Download directory.

If I move this code in a large program with several pages, the "ion-Event" is never fired after the opening and the agreement for writing the file

Launching code (placed in B4XMainPage) is as follows :
With :
Any idea what is happening ?
 

CR95

Active Member
Licensed User
Thanks Erel for your help
Is ion a global variable? What do you see in the logs?
"ion" is a global variable declared as an Object.
Nothing appears in the Log after the "StartActivityForResult(intent)" instruction. Program is waiting ?????
But a zero byte is created in the Download directory (which is the purpose of the Intent if my understanding is right).

My code is a copy of this example. The difference is that I used it in the B4XMainPage (in the example, the code is in a separate class)
 
Upvote 0

CR95

Active Member
Licensed User
@Erel
I restart from my running well test program and I copy inside a part of my large (not running) program.
Unfortunately, event is not fired
One of the main difference is that I added a B4XPage.
Could that be the issue (the system does not know where to return ????) ?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…