Android Question Open text editor when clicking on text file in file browser

mscientist33

Active Member
Licensed User
I am using the text editor in this tutorial : Text Editor

It works great when I click on the Text Editor app icon. Is there a way to pass the clicked text file while in the file browser to open up the clicked text file in the editor?

Currently I click the text file in the browser it asks which text editor app to use. I click the above text editor and it only opens the app, I still have to navigate to the file I clicked.

I am using B4Xpages.
 

mscientist33

Active Member
Licensed User
Strange, looks like this was missing from the example:
B4X:
Private Sub B4XPage_Appear
    FileHandler1.CheckForReceivedFiles
End Sub
Does this work only for certain Android versions? I have added that to my B4XMainPage and it still opens up empty with no text. I am using Android version 9.
 
Upvote 0

mscientist33

Active Member
Licensed User
Does this work only for certain Android versions? I have added that to my B4XMainPage and it still opens up empty with no text. I am using Android version 9.
I added the following

B4X:
Private Sub B4XPage_Appear
    HandleLoadResult(FileHandler1.CheckForReceivedFiles)
End Sub

This worked. I'm not sure if this is the correct way of doing it but it did work.
 
Upvote 0
Top