Sushil
Sushil

Reputation: 8488

Opening a picker in Android client app without downloading OneDrive aap

From inside my client app, I want to access OneDrive files and folders. The way I am designing it is, that initially the use can press a button to login into his onedrive account (app redirects to web for login and then redirects back to app).

After this, I want to show a chooser box with all files and folders for that user and clicking on anyone of the files, it should open up in my app (Right now I want it to work for images).

From my app, login works fine now but I cannot find a way to show all files and folders inside my app without downloading OneDrive App.

As my app is for Android Tv, so OneDrive app is not available for download on TV.

Thanks for any help

Based on Dominik4142 advice, I implemented and getting following json reply:

This is the URL I am sending:

"https://apis.live.net/v5.0/me/skydrive/files?pretty=false&access_token=xyz"

{"data":[{"id":"folder.d01bec024f17580d.D01BEC024F17580D!106","from":{"name":"xxxx belgium","id":"d01bec024f17580d"},"name":"Documents","description":"","parent_id":"folder.d01bec024f17580d","size":0,"upload_location":"https://apis.live.net/v5.0/folder.d01bec024f17580d.D01BEC024F17580D!106/files/","comments_count":0,"comments_enabled":false,"is_embeddable":true,"count":0,"link":"https://onedrive.live.com/redir.aspx?cid=d01bec024f17580d&page=browse&resid=D01BEC024F17580D!106&parId=D01BEC024F17580D!103","type":"folder","shared_with":{"access":"Just me"},"created_time":"2014-05-27T11:38:30+0000","updated_time":"2014-05-27T11:38:30+0000","client_updated_time":"2014-05-27T11:38:30+0000"},{"id":"folder.d01bec024f17580d.D01BEC024F17580D!104","from":{"name":"xxxx belgium","id":"d01bec024f17580d"},"name":"Pictures","description":"","parent_id":"folder.d01bec024f17580d","size":1279592,"upload_location":"https://apis.live.net/v5.0/folder.d01bec024f17580d.D01BEC024F17580D!104/files/","comments_count":0,"comments_enabled":false,"is_embeddable":true,"count":1,"link":"https://onedrive.live.com/redir.aspx?cid=d01bec024f17580d&page=browse&resid=D01BEC024F17580D!104&parId=D01BEC024F17580D!103","type":"album","shared_with":{"access":"Just me"},"created_time":"2014-05-27T11:38:29+0000","updated_time":"2014-05-27T11:39:00+0000","client_updated_time":"2014-05-27T11:38:29+0000"},{"id":"folder.d01bec024f17580d.D01BEC024F17580D!105","from":{"name":"xxxx belgium","id":"d01bec024f17580d"},"name":"Public","description":"","parent_id":"folder.d01bec024f17580d","size":16775184,"upload_location":"https://apis.live.net/v5.0/folder.d01bec024f17580d.D01BEC024F17580D!105/files/","comments_count":0,"comments_enabled":true,"is_embeddable":true,"count":2,"link":"https://onedrive.live.com/redir.aspx?cid=d01bec024f17580d&page=browse&resid=D01BEC024F17580D!105&parId=D01BEC024F17580D!103","type":"folder","shared_with":{"access":"Public"},"created_time":"2014-05-27T11:38:29+0000","updated_time":"2014-05-27T11:42:06+0000","client_updated_time":"2014-05-27T11:38:29+0000"},{"id":"folder.d01bec024f17580d.D01BEC024F17580D!112","from":{"name":"xxxx belgium","id":"d01bec024f17580d"},"name":"sushil","description":"","parent_id":"folder.d01bec024f17580d","size":212738,"upload_location":"https://apis.live.net/v5.0/folder.d01bec024f17580d.D01BEC024F17580D!112/files/","comments_count":0,"comments_enabled":false,"is_embeddable":true,"count":1,"link":"https://onedrive.live.com/redir.aspx?cid=d01bec024f17580d&page=browse&resid=D01BEC024F17580D!112&parId=D01BEC024F17580D!103","type":"album","shared_with":{"access":"Just me"},"created_time":"2014-10-16T15:04:21+0000","updated_time":"2014-10-16T15:05:21+0000","client_updated_time":"2014-10-16T15:05:21+0000"}]}

Upvotes: 0

Views: 462

Answers (1)

dominik4142
dominik4142

Reputation: 576

You need to use OneDrive API for Android. Exact link for downloading file list in external android apps here: http://msdn.microsoft.com/en-us/library/dn659727.aspx

Upvotes: 1

Related Questions