Read text file and search contents

by CompuCor » Tue, 14 Apr 2009 00:58:41 GMT


Sponsored Links
 Greetings,

I am new to Java and Android.  I have a flat file (pipe-delimited)
stored in R.raw called wordlist.txt.  I want to open this file and
quickly search for a word I pass into my procedure.

I've been searching for a simple way to do this but not having much
luck.

Can anyone share some code on how to do this?

Thanks SO much for any help!

--~--~---------~--~----~------------~-------~--~----~



Read text file and search contents

by Charlie Collins » Tue, 14 Apr 2009 02:06:43 GMT


 Here is a basic example of reading a raw resource:
 http://unlocking-android.googlecode.com/svn/chapter5/trunk/FileStorage/src/com/msi/manning/chapter5/filestorage/ReadRawResourceFile.java. 





--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Handling Android device without Menu button

Hi All,

I have a couple of apps currently in the marketplace and they follow
the Android design guidelines as close as possible.  One of the people
who purchased my app says he's using it on a device without a 'menu'
button.  The device is  a Eken M0002, a 7" tablet running Android 1.6

I know that tablets are not officially supported yet.  My question is,
has anyone started dealing with this potential issue, and if so how?

Thanks,
Stephen

-- 

2. Guidelines on using Webview to render UI - getting approval for Market

Hi,

I'd like to use a webview to render teh whole UI by pointing it to an
external site - basically point it to mob.mysite.com.
Are there rules regarding this regarding getting approval for the
Android market?
I think iPhone apps aren't allowed to do this?
If there's no network connection I will render an html page bundled in
the assets to handle this gracefully.

Many thanks
Russ

--

3. Stopping activity problem

4. Custom view in gallery

5. changes to Android Market

6. Java awt package in android

7. Using html in WebView to build UI