Linked Questions
29 questions linked to/from Android read text raw resource file
0 votes
0 answers
797 views
Need help reading a text file from a path using Kotlin with Windows [duplicate]
I am not able to find a text file on my local Windows computer to open it in Kotlin - Android Studio. I tried placing the file in an assets folder and I tried various path variations but nothing so ...
1 vote
1 answer
706 views
Android/Java text file read problem [duplicate]
I'm currently trying to read a file from (res/raw) by using an InputStream that I dimension like such: InputStream mStream = this.getResources().openRawResource(R.raw.my_text_file_utf_8); I then put ...
144 votes
4 answers
391k views
How can I read a text file in Android? [duplicate]
I want to read the text from a text file. In the code below, an exception occurs (that means it goes to the catch block). I put the text file in the application folder. Where should I put this text ...
41 votes
3 answers
49k views
Where to put text files in directory in Android
I have a text file i want to include in my Android application, it is not a string file it is a standard text file. It contains data that defines the characteristics of a "map" that is drawn on a ...
15 votes
5 answers
32k views
Reading Android raw text file
I have a words.txt file which I have placed in my res/raw folder. The words in the file are separated by space. I'm having a hard time writing the Android/Java code to read the file word by word.
2 votes
1 answer
8k views
Can I read a local text file line by line into a string array?
The question "How to read a local (res/raw) file line by line?" deals with a similar issue but I was unable to construct a solution base on the answers provided there. I did get a very useful piece of ...
2 votes
3 answers
5k views
How can I load an HTML template into a WebView?
Imagine an HTML template that looks like this: <html> <head> <style type="text/css"> body { color: white; } </style> </head> <body&...
0 votes
3 answers
3k views
AlertDialog text properties
I show an AlertDialog on the first start-up using code I copied and don't fully understand, but it works great as a EULA. I want to show the longwinded legal text in a smaller font. Text is loaded ...
1 vote
1 answer
1k views
How to execute the query in a plain text file in Android?
I can read a text file which is in the assets folder. But now I have a DB creation query in the text file; how can I execute that query in Android? Please don't ask why I want to keep queries in a ...
0 votes
1 answer
2k views
Where to place .glb file and how get path to it in android?
I'm trying to set up ARCore scene with Sceneform. There are this piece of code: (supportFragmentManager.findFragmentById(R.id.single_player_ar_fragment) as ArFragment) ....
2 votes
1 answer
2k views
Images in android textview using fromHtml method doesn't show up
I'm trying to display images in my help file using the Html.fromHtml method. This is my java code TextView tv = (TextView)findViewById(R.id.text); tv.setText(Html.fromHtml(...
1 vote
3 answers
2k views
Why do I get question marks instead of symbols when reading from .txt with InputStream?
I know it must be obvious but can't find the answer. What should I do to get the right characteres such as ", ', etc...? This is the method I am using, public void read(Context context) { ...
2 votes
1 answer
2k views
How to Load different language html page according to device in web view as we do with string files for different language support
I want to add some html files in different languages in my application for supporting my application for different languages. I have done with string.xml file but now i want to add html pages on web ...
-1 votes
1 answer
1k views
Utils cannot be resolved in reading Raw text file [closed]
I want to read text in my raw resource folder import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.widget.TextView; public class Main extends Activity { ...
1 vote
3 answers
822 views
Unable to start Activity component info
Hello Guys this is the second time am facing this problem in last two days. So I guess there is some place in the code where in am going horribly wrong. Anyways what am trying to do here is simply ...