Root Folder

Highlighted
Occasional Contributor

Root Folder

I guess everyone is ignoring my posts because I'm so obviously inept, but I'll try again.  What I want to do should be very simple; once I authenticate via an Android app, I want to upload and download files from the app.  I've accomplished the authentication, and following the loadRootFolder() method, I see that mFolder is:

com.box.androidsdk.content.BoxApiFolder@dd4497a

 

Is that the folder where I can use the Kotlin Storage Access Framework to store and retrieve files?  If not, how do I programmatically find the https://folderID?  

 

Thanks in advance,

         Tom

2 REPLIES 2
Highlighted
Box Employee

Re: Root Folder

@TPark_RL hi there, yes you can upload and download files to any folder you have write access to, and your root folder should pass that criteria in most cases. 

 

The question really though is if that is what you want. I'd recommend creating a new folder and then uploading files into there, as you can then invite other users to that folder as well if that's ever needed. 

 

Could you provide me with some more background on what your bigger picture goal is?


---
Developer Advocate @ Box
Highlighted
Occasional Contributor

Re: Root Folder

     Thanks for the reply.  So is the mFolder info I posted related to the URI of the root folder in some way?  Add https:// to the front of it or something?

 

     I have several Android apps I'm currently working on, but they share a common requirement; they need to share data between various devices.  As an example, one app controls and monitors ESP8266 based devices that turn on lights, monitor temperatures and motion detectors, open greenhouse windows, monitor the water depth of a shallow well, ring buzzers when the dogs want to come in... not exactly the next Angry Birds, but very useful for my home.  I originally implemented this with Python on a R-Pi, but have since ported it to a different R-Pi now running Android 9.0.  The same app running on my phone can also access all the data, with a slight wrinkle; each ESP8266 has a unique ID, so I use a device table to store each device location/function/ID.  I also developed a free-form macro language that can be used to easily control and monitor everything.  So I have device.conf and macro.conf files that provide the same abilities for any Android device running the app.  Each need to be able to alter the device.conf file for example, and this updated data needs to be available to all others.

 

   Complicating this process, at least for me, is that I'm also in the early stages of learning Kotlin.  Initially I thought I'd use Google Docs because I used it in the past with a Python application, but that implementation was deprecated years ago when Google decided to make access feel like hacking into the Pentagon.  Box seems more straightforward, and it feels like I'm close to being able to use it, but keep running into hurdles.  Being able to share files isn't an essential part of the app, just a feature that makes them easier to use.

 

   As I mentioned in my note, I can accomplish the authentication process and get to the guts of my app, but can't figure out what Box folder I'm allowed access to.  I simply need a folder that I can add files to and then easily access them.  You say that I can use any folder I have access to... but what is the URL of these folders?  

 

   I apologize for being such a novice, but please know that I didn't just hit a snag and post a question; I've spent many hours getting this far, something I'm sure is laughable to accomplished programmers.  I just need a nudge in the right direction.

 

Thanks in advance,

                Tom