Android: how to transfer an application from one application to another Android phone

I am creating an Android application where I want to transfer my .apk application to another Android phone via Bluetooth. I set the options menu called "Share App", when I click on it, my .apk file application will be transferred to the phone whose Bluetooth is on. It worked very well when creating the same application in J2ME, now I am trying to use it in Android and it does not work. So is there a way to do this ??? Any answers would be helpful to me.

+6
source share
3 answers

Applications are usually stored in / data / app, but you can only access this folder if your phone is rooted.

So AFAIK, the only way to do this is to possibly include your apk in the resource folder and then copy it to the SDCard before you can share it. But then the resulting apk cannot be split, because it does not have another apk inside the assets. Therefore, forget about this decision.

The cleanest way is to direct the user to the market.

+4
source

I do not think this is possible, apk cannot share itself, however apk can share a file (which may be a different apk), which is packaged in apk as a resource.

You can also think about it easier by sharing the link on the Android Market where another person can install apk, or if you do not want to use the market, you can share the apk link on the website somewhere.

+3
source

If the application’s APK file is available on the SD card, it should not fail.

You simply transfer the file (APK or any other) from your SD card to another device via Bluetooth. If a failure means your code contains an error. So check your code first, it will work definitely.

+1
source

Source: https://habr.com/ru/post/903902/


All Articles