Android Question APK-Download is renamed from .apk to .zip

Michael Müller Anywhere

Member
Licensed User
Longtime User
I have an app that I can't publish on the Playstore because of a GPS policy.

When I point the user to the private downloadlink with a qrcode-scanner, in most cases the file is converted from ".akp" to ".zip".
The customer has to rename it.
This is too complicated for some customers.

To make it easy for my customers I want to publish a special (second) download app in the Google-Playstore.
This allows the first app to be loaded and installed. This works fine.
The biggest part of code comes from here (install unknown apps):


It has only a Buton to download and install my main-app. But google reject this app from the store.
Reason:
"Apps that cause users to download or install applications from unknown sources outside of Google Play are prohibited."

Alternatively, I created an app with a webview.
On the webpage ist a downloadlink.
But here the download doesn't start when you click the link.


Does anyone know a customer friendly way to load a main-app from the web without the customer having to manually rename the downloaded file?
Or is the a legal way to publish a download-app that won't be rejected from the google-playstore.


Thank you!!!
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 1

agraham

Expert
Licensed User
Longtime User
You can not publish such apps on Playstore. Playstore apps must use the Playstore-Update-Function.
In general that is so as Google tries hard to protect users from downloading malware. However B4ABridge, which is installed from the store, manages to install Release compiled APKs, perhaps because they are signed with a debug key - I don't know the details but maybe Erel could enlighten us. Perhaps there is a way using a B4ABridge variant to download and install the APK.
 
Upvote 0

Ivica Golubovic

Active Member
Licensed User
WebView with the ability to download files:
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
To me the best solution is to find out why are the APK files being renamed to ZIP files - your web server (or the users browser) should not be doing that.

So, are you saying that the file that you have on your web server (that users can download) ends with the ".APK" extension?

And are you saying that when users download that file (that ends in .apk on your server), it somehow gets renamed to ".zip" after their browser downloads it into their device?

If so, then the only thing that I can think of that might be causing this problem is that maybe the MIME type for ".apk" files is missing (or the MIME type is setup wrong for ".apk" files) on your website/server.

I have the ".APK" files setup as a "application/vnd.android.package-archive" in my MIME type of my Windows IIS server settings, and APK files download properly.
 
Last edited:
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
When I shared an apk file via Whatsapp, few user got message 'can not extract zip file' or 'zip file support not found' or similar.
So I think something OS specific is there. Hope any solution here, may also help me solve mine.
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
When I point the user to the private downloadlink with a qrcode-scanner, in most cases the file is converted from ".akp" to ".zip".
The customer has to rename it.
This is too complicated for some customers.
I keep my app on my server with myapp.APK then send the link to the client..

you should make your app like: example.APK
And send the link to your client..
 
Last edited:
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
When I shared an apk file via Whatsapp, few user got message 'can not extract zip file' or 'zip file support not found' or similar.
So I think something OS specific is there. Hope any solution here, may also help me solve mine.
It's because that apk file is like zip file and some system can mistakenly treat it as zip. You can open apk with either WinZip or total commander as any zip file.
 
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
When I shared an apk file via Whatsapp, few user got message 'can not extract zip file' or 'zip file support not found' or similar.
So I think something OS specific is there. Hope any solution here, may also help me solve mine.

When you send apk file through Whatsapp, before your users can download it, they must make sure they grant WHATSAPP permission to install from unknown sources. Other than that, the person should use the File manager, even that, they have to grant unknown sources permission
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
When you send apk file through Whatsapp, before your users can download it, they must make sure they grant WHATSAPP permission to install from unknown sources. Other than that, the person should use the File manager, even that, they have to grant unknown sources permission
This is more likely the reason as it installs for some users and show as zip for others. I can understand now.
Can giving a link of GDrive will help those, whose 'unknown sources permission' is not granted ?
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
I found out that if we share from GDrive, then Android prompts for 'enabling install from other sources'
So we can share apk through GDrive.
 
Upvote 0

Michael Müller Anywhere

Member
Licensed User
Longtime User
@AnandGupta
I have upload my apk to GDrive with the direct link creator for google drive to get a downloadlink.
Here is the QR-Code for the gdrive-link

1643146717238.png



I tested it and it seems to work on my huawei smartphone. I'm just prompted to install apps from unknown sources.

I copied the QR code here so anyone who wants it can try it for themselves.

I don't want to ask anyone to install it. But when you get to the point where you can choose to cancel the installation, then this solution seems good.
If you want to test it yourself, please select "cancel" if you get that far.

If this solution doesn't work for someone, I'd appreciate feedback.


If you are interested and want to know which app you are testing here, you can have a look here:
http://www.lunasoft.de/index.php/menu-produkte/produkt-meinstatus-app


This should only be a test here to offer other developers a solution if it works.
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
I have upload my apk to GDrive with the direct link creator for google drive to get a downloadlink.
Yes, I have created website from GSites and put the drive folder there, which has all apk required.

Point is Android prompts for 'install from other sources' if downloading from GDrive.
This will help us as we do not have to guide user to how to do it.

So instead of sharing in Whatsapp message, better give GDrive link.
 
Upvote 0
Top