I have implemented the OneDrive picker in my app to allow the user to easily select a file from the OneDrive cloud storage. My app then gets the weblink that points to the file. I would now like to download (make a copy) of the file to the local storage on the Android device.
I would have thought this would be simple (As Dropbox made downloading a local copy part of their picker function) but it seems OneDrive has not. I've done some searches to find out how to download a file give the weblink, but they either seem way to complicated or have not worked.
Below is the code for the onactivity result from the OneDrive picker. Now that I have the Uri, please help me with how to get a local copy of the file so that I can use it. Thanks!
if (requestCode == ONEDRIVE_CHOOSER_REQUEST)
{
// Get the results from the picker
IPickerResult result = mPicker.getPickerResult(requestCode, resultCode, data);
// Handle the case if nothing was picked
if (result != null) {
// Do something with the picked file
Uri fileUri = result.getLink();