Android Question Unable to share .apk file

Ohanian

Active Member
Licensed User
Longtime User
Hi,

i'm trying to share an apk file (with email or bluetooth), i'm using these codes :

B4X:
Dim share As MESShareLibrary

share.sharebinary("file://" & File.DirRootExternal & "/com.xxx.yyy.zip", "application/zip", "Share with", "")


B4X:
Dim share As MESShareLibrary

share.sharebinary("file://" & File.Combine(File.DirRootExternal, "com.xxx.yyy.apk"), "application/vnd.android.package-archive", "Share with", "")

the first code works fine, but the second failed, the only difference is the file extension.

any suggestion?
 

Ohanian

Active Member
Licensed User
Longtime User
no error, just got a "File not sent." message.

is there any restriction for apk files?
 
Upvote 0

Ohanian

Active Member
Licensed User
Longtime User
Hi,

when i call the share function it opens the device share dialog, then i select bluetooth, then slelect the target device, i it show a "sending file to ..." msg, the i got "file not sent" msg.
if i choose gmail for example, then i can fill the to, title and message fields, but after sending the email there's no attachment with it.
as i said before the problem is with apk files, if i change the ext to zip everything works fine.
 
Upvote 0
Top