Android 上的蓝牙文件传输(甚至是受限类型) [英] Bluetooth File transfer on Android(even restricted types)
问题描述
我正在制作一个应用程序,我想在其中添加一个功能以通过蓝牙发送 apk 文件.它不允许通过传统方法,因为 apk 是受限制的文件类型,所以我使用了 BluetoothShare.java.显然它不适用于 Jellybean.我得到一个讨厌的安全异常.和这个一样.Android 蓝牙打印在 4.1 上停止工作
I was making an application in which I wanted to add a feature to send apk files via bluetooth. Its not allowed through the traditional method as apk is restricted file type so i used BluetoothShare.java. Apparently it doesn't work on Jellybean. I get a nasty security Exception. Same as this one. Android bluetooth print stopped working on 4.1
如果可能的话,我有什么办法可以做到这一点吗?
Is there any way I can go about doing this, if possible?
推荐答案
将 .apk 重命名为 .zip 并发送,然后在手机上将其重命名回 .apk.
rename the .apk to .zip and send it, then rename it back to .apk on phone.
这篇关于Android 上的蓝牙文件传输(甚至是受限类型)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!