(APK) File is not downloaded completely (from Google Drive) but a few Kbytes (using Android 10)

Hello everyone,
I have always used these blocks to download apk files from google drive with public link ...

Suddenly this problem is occurring: the file is not downloaded completely but a few Kbytes
If instead I zip the file and put it on google drive, it is downloaded correctly ...
how can i solve?

I think yes to some google security restrictions ...

Help please...

I noticed that you do not check if the file downloaded in your Get Block (the file responseCode should be 200 when the file downloads completely).

if responseCode = 200 then
call TinyDB
call ready

might work.

If that check does not work, load the aia file you are making regularly that last loaded the file correctly and see if using that code works properly. If it does download completely, you changed your code somewhere and that change may be the problem

thanks for the kind reply ...
I checked the responce code even though it is 200 the file is incomplete ...

But I repeat until recently everything worked regularly ... same app same apk file to download ...

Problem: download file from Google Drive might contain some useful advice.

ASD (app-specific directory)
where is this directory located ... i have android 10

/storage/emulated/0/Android/data/<package_name>/files

this will be visible to other programs on Android 10, but not on Android 11.

special case, when running in companion:

/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files

also with this solution the same thing happens, that is that the apk files are downloaded only a few kbytes ...
while with other files, for example zip everything ok ...

Is this with companion, compiled, or both ?

the thing happens in both cases ...
but I repeat the same app I have always used it, and until recently it downloaded apk files from google drive without problems ...
it seems that google drive has changed something on the download of the apk files .. but there must be a solution ...?

It seems to be no longer possible with Google Drive, since Google classifies the APK as a potential virus.

See also here:

So upload the APK to another server / hosting platform / your own server and download the APK from there.

ok I imagined ...
can you suggest another server, like google drive?

You could probably still use google drive if you use the custom webview extension downloading blocks to download the file, this would provide the user with the "Google can't Scan for Viruses" message and the "Download Anyway" button. Might scare 'em off though....

There is also Cloudinary, and a recent extension available for cloudinary (uploading)

Yes,

and I don't see this message.

You should in a browser...

image

Ok, of course, but you said:

Oh, maybe that won't work then if you can't capture the download url generated by the button

hello, but I would like an alternative that works with the same procedure as google drive, that is, I generate the shareable link and insert it in my app together with the name of the file to download ...

This is for compatibility with users who already use my app ...

can you kindly give me an example?

I have my apk on google drive all the time and I can download and update from it.