我正在创建一个应用程序,使我可以从OneDrive抓取图像,然后使用毕加索或glide将其下载到图库中。我目前正在使用OneDrive File Picker,但是DownloadLinks仅持续一个小时,而WebViewLinks不适用于Picasso或Glide。
谁能想到解决方案或更好的解决方案?我目前很茫然。
case R.id.nav_OneDrive:
authenticationAdapter.login(MainActivity.this, new ICallback<Void>() {
@Override
public void success(Void aVoid) {
Log.d("logs", "success");
mPicker = Picker.createPicker(ONEDRIVE_APP_ID);
mPicker.startPicking((Activity)context, LinkType.WebViewLink);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
IPickerResult result = mPicker.getPickerResult(requestCode, resultCode, data);
// Handle the case if nothing was picked
if (result != null) {
// Do something with the picked file
Log.d("logs", "Link to file " + result.getName() + ": " + result.getLink());
return;
}