Linked Questions

0 votes
0 answers
797 views

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 ...
David Campbell's user avatar
1 vote
1 answer
706 views

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 ...
While-E's user avatar
  • 1,565
144 votes
4 answers
391k views

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 ...
user1635224's user avatar
  • 1,683
41 votes
3 answers
49k views

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 ...
John's user avatar
  • 3,807
15 votes
5 answers
32k views

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.
George N's user avatar
  • 161
2 votes
1 answer
8k views

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 ...
Yak Attack's user avatar
2 votes
3 answers
5k views

Imagine an HTML template that looks like this: <html> <head> <style type="text/css"> body { color: white; } </style> </head> <body&...
Christopher Pickslay's user avatar
0 votes
3 answers
3k views

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 ...
paulpo's user avatar
  • 29
1 vote
1 answer
1k views

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 ...
S.Basnagoda's user avatar
0 votes
1 answer
2k views

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) ....
Yonshoku's user avatar
  • 117
2 votes
1 answer
2k views

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(...
orelzion's user avatar
  • 2,572
1 vote
3 answers
2k views

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) { ...
eskalera's user avatar
  • 1,092
2 votes
1 answer
2k views

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 ...
unflagged.destination's user avatar
-1 votes
1 answer
1k views

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 { ...
eggblade's user avatar
1 vote
3 answers
822 views

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 ...
D'yer Mak'er's user avatar
  • 1,642

15 30 50 per page