0

Until now, I only develop apps for myself or for close friends.
I don't sell apps so I'm not interested in Google Play.

So, I upload for a personal site I have, give the link to my friends, and they download the APK.
Next they install the app and delete the APK for saving memory space.

How can I install directly my apps from my site without download the APK?

Thank you

  • How can you install app from the remote resource directly without downloading? – Denis Sologub May 24 '16 at 14:54
  • As I said, I download the APK and then I run the APK in my phone. Then the app is installed but I need to delete the APK because after installation is useless and I want to save memory space. If I install an app from Google play, the APK is installed without save the APK in my phone. Is this that I want to know how can I do. – Pedro Burmester May 24 '16 at 14:57
  • No you can't auto install apps on phone – Cliff May 24 '16 at 14:57
  • If you want provide some installer (app) when just write it or see existing (if they exist). – Denis Sologub May 24 '16 at 14:57
  • @Cliff, so how the process of installing from Gogle Play works? – Pedro Burmester May 24 '16 at 15:00
  • Google Play market is root app that integrates in ROM. Android based on Linux kernel and you cannot install app from another app without root access – Denis Sologub May 24 '16 at 15:01
  • It seems someone dislike my question, so the -1. Probably someone from Google :-) – Pedro Burmester May 24 '16 at 15:06
  • For my understanding: You want to remove the downloaded .apk file once it is installed. That file is probably somewhere in `/sdcard/downloads`? – 0xDEADC0DE May 24 '16 at 15:09
  • OMG -2 It seems the the whole Google Play staff is here to downvote. So, you can do the -3 if you want. – Pedro Burmester May 24 '16 at 15:21
  • Interesting post. I know it's old, but I have a similar situation, so I upvoted to get you back to 0 upvotes lol. However, I have clients insead of friends, who are installing the app. Currently, the app is running on a device I supply, but since the application is set as a system app in the firmware, I can't use device storage (as far as I know). I'm hoping I can just load the item into memory, install, then clear the memory. I'm looking into placing updates on a non-personal Google drive, then using Java with the Google drive API to store the file contents into memory. Unsure if possible yet – FoxDonut Oct 26 '22 at 01:48

1 Answers1

0

APK shouldn't be taking that much space but what you can do is this:

1) In your MainActivity, have a method where you search for APK file in the phone external storage. (the example searches for ".pdf", change the extension to ".apk")

2) Then use a APK parser library to get the package name of the APKs found.

3) If the package name equals to your package name, delete that file.

Make sure to call that method on your onCreate() of your main activity.
Hope this helps.

Community
  • 1
  • 1
ᴛʜᴇᴘᴀᴛᴇʟ
  • 4,466
  • 5
  • 39
  • 73