I have Drive Id of selected file and I am able to get Url of that file using
MetadataResult mdRslt;
DriveFile file;
file = Drive.DriveApi.getFile(mGoogleApiClient,driveId);
mdRslt = file.getMetadata(mGoogleApiClient).await();
if (mdRslt != null && mdRslt.getStatus().isSuccess()) {
link = mdRslt.getMetadata().getWebContentLink();
if(link==null){
link = mdRslt.getMetadata().getAlternateLink();
Log.e("LINK","FILE URL After Null: "+ link);
}
Log.e("LINK","FILE URL : "+ link);
}
How to download file from url and save in to SD card? Please help me regarding this. Thanks.