Android Question Reading / Updating txt file on the cloud

AlexOfOz

Active Member
Licensed User
Firstly, I have hesitated to post this question and tried to work it out for myself. I have asked a couple of questions in the past on other subjects and received very helpful information. From those answers I've been able to dig in and learn what I've needed to learn, so thank you very much.

This new question is to do with how to read a TXT file on the cloud - OneDrive to be precise. But the fact it is OneDrive is just incidental; I'm sure the same question would be there regardless of where on the cloud the TXT file was.

I started by using the FLICKR sample code as my guide and learned a lot from that, such as using HttpJob etc. But I also learned that downloading a photo is different to reading a text file. I have asked people at work for help, from where I learned about the API's that require specific codes to use. Then I have spent days reading and trying to adjust the FLICKR sample code to do what I'm trying to do, but all to no avail. I have watched some of Eril's very helpful videos, from where I learned about the existence OkHttpUtils2, but not how to use it.

I've run out of places to look for HOW TO information, so now I come cap-in-hand to you guys'n'girls. Does anybody have any sample code they can provide to me just to enable me to read my own text file on OneDrive, and maybe some key words of wisdom? From that, based on recent history with similar questions about arrays and icons, I believe I'll be able to start the next phase of my learning process.

BTW, to give you reassurance that your help isn't being wasted, I have written a fully functional game that uses what I have learned about arrays and icons. My extended family are now hooked trying to solve the game. So your wonderful help isn't being wasted.
 

AnandGupta

Expert
Licensed User
Longtime User
Just upload the full project, which you tried to achive the text file reading. Members can give solutions based on it.

Regards

Anand
 
Upvote 0

mangojack

Well-Known Member
Licensed User
Longtime User
Just throwing another option into the pot ..

Must you read the text file directly in the cloud / onedrive. ?

Is it an option to download the file first, then read the file.... sounds like an easier path.

@DonManfred created a CloudRail lib that might be of help (have not used , so cant help there)
 
Upvote 0

AlexOfOz

Active Member
Licensed User
Mangojack, that is in essence what I want to do. Where the update occurs is not important, so long as it ends up being back on the cloud. I am taking a step-by-step approach and simply want to read the file as the first step. So downloading will achieve that.

Any assistance you can give will be of great help. Thanks.
 
Upvote 0

mangojack

Well-Known Member
Licensed User
Longtime User
Where the update occurs is not important

So just just expanding on your last post so we are all clear and able to help more precisely ..

Your end aim is to read and write changes to a OneDrive text file ( either directly , OR by downloading file first , then uploading edited file)

Correct ?
 
Upvote 0

AlexOfOz

Active Member
Licensed User
Correct mangojack. My ultimate aim is to have something where my wife and I can both read / update a common file. But because I'm still a novice, I thought it would be prudent to take it in steps, with the first one being to read, or download, the file. Keeping in mind that I'm starting from scratch with my knowledge of how to do all of this.

I started coding with basic back in the early 80's with the Commodore 64, then had a 35 year hiatus. So you can get a feeling for why accessing a file on the web is new to me. In my daily job I manage the changes to vast reams of Cobol on a mainframe; not a lot of basic or cloud involved with that, but lots of understanding for how it must all fit together. As I say, I certainly appreciate the help and will return the favour one day to others.
 
Upvote 0
Top