BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/index.php)
-   Developer Forum (http://www.blackberryforums.com/forumdisplay.php?f=15)
-   -   read .txt file from URL (http://www.blackberryforums.com/showthread.php?t=261583)

fajriym 09-18-2012 10:53 PM

read .txt file from URL
 
hi advance, i'm newbie here ;-)
could you please to help me :cry:
my ex. case is:
i've uploaded .txt file to server
how can i read the .txt file from server URL and retrieve it to the app :oops:
thanks before

hrbuckley 09-19-2012 11:53 AM

Re: read .txt file from URL
 
You will simply need to open a connection to the server with the appropriate URL and read the text file from the input stream.

If you are targeting BlackBerry OS 5.0 or later you may use the ConnectionFactory. For OS versions before that you will have to use the HttpConnection.

fajriym 09-20-2012 09:10 PM

Re: read .txt file from URL
 
thanks before, but could you mind giving me an example code
i use blackberry OS 5

hrbuckley 09-21-2012 08:53 AM

Re: read .txt file from URL
 
There is example code in the API documentation for HttpConnection.


All times are GMT -5. The time now is 04:15 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.