Thanks for the explanation. I found the files there alright so the
code is working which is great. Now I need to access the files in the
device to display their contents in a TextView in a screen. I've been
trying to do something like this:
String text = new String(istr);
murphy wrote:
Thanks for the explanation. I found the files there alright so the
code is working which is great. Now I need to access the files in the
device to display their contents in a TextView in a screen. I've been
trying to do something like this:
String text = new
I'm using the code in this fashion:
try{
URL myURL = new URL(http://www.indulec.ie/weather.txt;);
URLConnection conn = myURL.openConnection();
conn.connect();
BufferedReader is = new BufferedReader(new InputStreamReader
I've added in also the line FileInputStream fIn = openFileInput
(news.txt); but I don't know what to do with it once I open it to be
able to display it in my TextView in a new screen.
On Mar 22, 3:59 pm, murphy howt...@hotmail.com wrote:
I'm using the code in this fashion:
try{
murphy wrote:
I've added in also the line FileInputStream fIn = openFileInput
(news.txt); but I don't know what to do with it once I open it to be
able to display it in my TextView in a new screen.
http://www.exampledepot.com/egs/java.io/ReadLinesFromFile.html
--
Mark Murphy (a Commons Guy)
I've got it working now, I used this code to finish it:
FileInputStream fIn = openFileInput(news.txt);
InputStreamReader isr = null;
char[] inputBuffer = new char[255];
String data = null;
try{
isr = new
Hi, you should try something like
URL myURL = new URL(http://lol.com/lol.txt;);
URLConnection conn = myURL.openConnection();
conn.connect();
BufferedReader is = new BufferedReader(new InputStreamReader
(conn.getInputStream(), UTF8));
FileOutputStream fOut =
Your use of HttpGet is good.
However, you cast an InputStream to a char-sequence when calling
tv.setText((CharSequence)input);.
This will give you a class-cast exception. Read char-data from the
InputStream instead.
Also, try to find out if 'entity' has some methods to get a String
back that has
Hi, I used the code you suggested Simon in this way,
try{
URL myURL = new URL(http://www.indulec.ie/weather.txt;);
URLConnection conn = myURL.openConnection();
conn.connect();
BufferedReader is = new BufferedReader(new
Hi, I used the code you suggested Simon in this way,
try{
URL myURL = new URL(http://www.indulec.ie/weather.txt;);
URLConnection conn = myURL.openConnection();
conn.connect();
BufferedReader is = new BufferedReader(new
I'm not receiving any error. Its just that when I click the button in
my application which should call a function to go online and download
data to the news.txt file, nothing happens.
My Manifest reads as follows:
?xml version=1.0 encoding=utf-8?
manifest
I'm not receiving any error.
Ah, sorry. I was sifting through earlier messages in the thread and
thought you were getting an error.
Its just that when I click the button in
my application which should call a function to go online and download
data to the news.txt file, nothing happens.
The
2009/3/22 Mark Murphy mmur...@commonsware.com:
I'm not receiving any error.
Ah, sorry. I was sifting through earlier messages in the thread and
thought you were getting an error.
Its just that when I click the button in
my application which should call a function to go online and download
I can't find /data/data/my.package.here/files. I don't seem to have a
data folder.
On Mar 22, 12:42 am, Simon Depiets sdepi...@gmail.com wrote:
2009/3/22 Mark Murphy mmur...@commonsware.com:
I'm not receiving any error.
Ah, sorry. I was sifting through earlier messages in the thread
I can't find /data/data/my.package.here/files. I don't seem to have a
data folder.
Are you working on the emulator, or the device?
If it's the device, you probably cannot browse to the location using DDMS
due to security restrictions. However, you should be able to use adb pull
to pull the
2009/3/22 Mark Murphy mmur...@commonsware.com:
I can't find /data/data/my.package.here/files. I don't seem to have a
data folder.
Are you working on the emulator, or the device?
Be sure you look in the InternalMemory, not the SDCard aswell
--
Lliane aka Simon Depiets
Epita Promo 2011,42
I'm working on the emulator using eclipse. I have a workspace for the
project on my desktop. When I go into my application's folder my
options are other folders like .setting, assets, res, bin and src. I
don't know where to go to find the news.txt file.
On Mar 22, 12:56 am, Mark Murphy
I'm working on the emulator using eclipse. I have a workspace for the
project on my desktop. When I go into my application's folder my
options are other folders like .setting, assets, res, bin and src. I
don't know where to go to find the news.txt file.
Ah!
You're looking in your project,
Okay, I went to the Device's menu, selected Dev Tools, then went to
Package Browser and found my package, selected it and was then brought
to a screen displaying details. Under Data is written /data/data/
my.package.name. Don't know what any of it means. Couldn't see any
sign of the text file.
murphy wrote:
Okay, I went to the Device's menu
Sorry. Back up.
You said you use Eclipse.
Eclipse, with the Android plugin, has a perspective called DDMS. If you
cannot find it, run the ddms program from the tools/ folder in your SDK,
then select your running emulator in the table on the
20 matches
Mail list logo