Yah I have tried using TextView but I am getting blank screen. Is it
correct to use the following code to access the file in /data
directory?

File file = new File(Environment.getDataDirectory(),"/data/
monitor.txt");

After which I did the reading by line and displaying using TextView
but getting blank screen

Regards,
Perumal

On Jan 22, 12:05 am, TreKing <treking...@gmail.com> wrote:
> On Wed, Jan 20, 2010 at 8:35 PM, perumal316 <perumal...@gmail.com> wrote:
> > Suppose I have a text file in /data folder, is there any way I can
> > display the textfile to user through an app?
>
> Sure. If you want to do this yourself, just read the contents of the file
> and dump it to a TextView or something you can show in an Activity or a
> Dialog.
>
> If you want to use a separate app, create an Intent with a URI created from
> the path to the file and call startActivity with that Intent. The user can
> then choose which app to use to open the file, of the ones that are capable
> of handling that file type.
>
> -------------------------------------------------------------------------------------------------
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to