

If i try to open it, the device (and pc) gives me a format error. The download is done successfully, but the file is corrupted. Using a simple Broadcast Receiver to manage the download result (ACTION_DOWNLOAD_COMPLETE). Profile is a simple object class that hold the user data taken from sign Google, like token, name, email, etcc d is the document object, that contains url, file name, etcc Request.addRequestHeader("Authorization", "OAuth " + profile.getToken()) Request.addRequestHeader("Cookie",cookie) I receive a notification with google drive file url and i pass it to the DownloadManager, passing to it the token: String cookie = CookieManager.getInstance().getCookie(d.getURL()) requestIdToken(AppConfig.getInstance().get("google_client_id")) I get the sign in token from Google like following: GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) Make sure the Enable Policy option is selected and click Confirm and then Save.I'm trying to download a file stored in Google Drive using android DownloadManager.

*You should change these based on your organizational needs.

However, this only works for the web version of Google Drive not the desktop application. To restrict the user from downloading and uploading documents in Google Drive, you can create a category and add it to a policy in the Smoothwall Filter and Firewall.
