Android Question How to open one text via intent

Douglas Farias

Expert
Licensed User
Longtime User
Hi how can i open one text file via intent and put the text of file on my edittext1 ?
EX: when user press a button , open intent to user select the text file, he select and the text of file go to my edittext, like filedialog

B4X:
    Dim i As Intent
    Dim fn As String
    fn = "file://" & target
    i.Initialize(i.ACTION_EDIT, fn)
    i.SetType("text/plain")
    StartActivity(i)

This dont works

ACTION_VIEW
ACTION_PICK
dont work too
 

Douglas Farias

Expert
Licensed User
Longtime User
hmm and its possible make a .txt files chooser via intent ?
 
Upvote 0

Douglas Farias

Expert
Licensed User
Longtime User
i m using the file dialog, this is fine for me its working etc, but users on googleplay dont know use xD
many users dont know the ... < its to back folder ¬¬ i need to make a file select with icons etc, i dont find any good file select for here =(

thx @NJDude
 
Upvote 0

Douglas Farias

Expert
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…