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
yes but its the same, users of googleplay is noob, dont know what is /..
i need to use a file select with icons or native if this exist xD
i like this
http://www.b4x.com/android/forum/threads/fileselect-library-with-type-icons.38345/#content
but cant change the colors, icons etc
its strange root button and up button cant change this lib class is perfect but need change this =(
fs1-png.23703
 
Upvote 0
Top