从我的客户端应用程序内部,我想访问OneDrive文件和文件夹。我的设计方式是,最初用户可以按一个按钮登录他的onedrive帐户(app重定向到网页进行登录,然后重定向回应用程序)。
在此之后,我想显示一个选择框,其中包含该用户的所有文件和文件夹,并单击任何文件,它应该在我的应用程序中打开(现在我希望它适用于图像)。
从我的应用程序,登录工作正常,但我找不到在我的应用程序内显示所有文件和文件夹的方法,而无需下载OneDrive应用程序。
由于我的应用适用于Android电视,因此无法在电视上下载OneDrive应用。
感谢您的帮助
基于Dominik4142建议,我实施并获得了json回复:
这是我发送的网址:
" https://apis.live.net/v5.0/me/skydrive/files?pretty=false&access_token=xyz"
{"数据":[{" ID":" folder.d01bec024f17580d.D01BEC024F17580D 106""从":{& #34;名称":" xxxx比利时"," id":" d01bec024f17580d"},"名称":"文件""描述":""" PARENT_ID":" folder.d01bec024f17580d""大小&#34 ;:0," upload_location":" https://apis.live.net/v5.0/folder.d01bec024f17580d.D01BEC024F17580D!106/files/"" comments_count":0," comments_enabled":假,& #34; is_embeddable":真,"计数":0,"连结":" https://onedrive.live.com/redir.aspx?cid=d01bec024f17580d&page=browse&resid=D01BEC024F17580D!106&parId=D01BEC024F17580D!103""类型&# 34;:"文件夹"," shared_with":{"访问":"只是我"}," created_time" :" 2014-05-27T11:38:30 + 0000"" updated_time":" 2014-05-27T11:38:30 + 0000"&# 34; client_updated_time":" 2014-05-27T11:38:30 + 0000"},{" ID":" folder.d01bec024f17580d.D01BEC024F17580D 104&#34 ;,"来自":{" name":" xxxx belgium"," id":" d01bec024f17580d"}, "名称":"图片""描述":&#34 ;"" PARENT_ID":" folder.d01bec024f17580d""大小":1279592," upload_location":" https://apis.live.net/v5.0/folder.d01bec024f17580d.D01BEC024F17580D!104/files/"" comments_count":0," comments_enabled":假," is_embeddable":真,"计数&#34 ;:1,"连结":" https://onedrive.live.com/redir.aspx?cid=d01bec024f17580d&page=browse&resid=D01BEC024F17580D!104&parId=D01BEC024F17580D!103""类型":"专辑"" shared_with& #34;:{"访问":"只是我"}," created_time":" 2014-05-27T11:38:29 + 0000&# 34;," updated_time":" 2014-05-27T11:39:00 + 0000"" client_updated_time":" 2014-05-27T11: 38:29 + 0000"},{" ID":" folder.d01bec024f17580d.D01BEC024F17580D 105""从":{"名称& #34;:" xxxx比利时"," id":" d01bec024f17580d"},"名称":"公共" "描述":""" PARENT_ID":" folder.d01bec024f17580d""大小":16775184, " upload_location":" https://apis.live.net/v5.0/folder.d01bec024f17580d.D01BEC024F17580D!105/files/"" comments_count":0," comments_enabled":真," is_embeddable& #34;:真,"计数":2"连结":" https://onedrive.live.com/redir.aspx?cid=d01bec024f17580d&page=browse&resid=D01BEC024F17580D!105&parId=D01BEC024F17580D!103""类型":"夹"" shared_with" {&#34 ;访问":"公共"}" CREATED_TIME":" 2014-05-27T11:38:29 + 0000"" updated_time&# 34;:" 2014-05-27T11:42:06 + 0000"" client_updated_time":" 2014-05-27T11:38:29 + 0000"} ,{" ID":" folder.d01bec024f17580d.D01BEC024F17580D 112""从":{"名称":" XXXX比利时"" ID":" d01bec024f17580d"}"名称":"苏希尔""描述" :""" PARENT_ID":" folder.d01bec024f17580d""大小":212738," upload_location&#34 ;: " https://apis.live.net/v5.0/folder.d01bec024f17580d.D01BEC024F17580D!112/files/"" comments_count":0," comments_enabled":假," is_embeddable":真,&#34 ;计数":1,"连结":" https://onedrive.live.com/redir.aspx?cid=d01bec024f17580d&page=browse&resid=D01BEC024F17580D!112&parId=D01BEC024F17580D!103""类型":"专辑",& #34; shared_with":{"访问":"只是我"}," created_time":" 2014-10-16T15:04: 21 + 0000"" updated_time":" 2014-10-16T15:05:21 + 0000"" client_upd ated_time":" 2014-10-16T15:05:21 + 0000"}]}
答案 0 :(得分:1)
您需要使用适用于Android的OneDrive API。在这里下载外部Android应用程序中文件列表的确切链接:http://msdn.microsoft.com/en-us/library/dn659727.aspx