Android Question Read txt file and store the content in a string

Ricardo Bunschoten

Active Member
Licensed User
Longtime User
is it possible to read the content of a txt file thats stored online ?


I want to create a function that compares the context of a txt file with the content of a txt file on the device

like online txt has the text 11-4-2017

The txt file on the device has the text 10-4-2017

I want to compare the both and popup a message that a update is available

I guess the content of the files can be stored in a string to compare ?
 

DonManfred

Expert
Licensed User
Longtime User
Download the file with okHTTP, save the file to disc, compare whatever you want.

I suggest using a php-script in between which will return the content of the file after it get called by a okHTTPjob.
In JobDone you then can get the content and compare it to a local filecontent.
 
Upvote 0
Top