扫码关注,一起学习
Android系统蓝牙支持接收的文件类型在Constants.java中设置:
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/Constants.java
static final String[] ACCEPTABLE_SHARE_INBOUND_TYPES = new String[]{"image/*","video/*","audio/*","text/x-vcard","text/x-vcalendar","text/calendar","text/plain","text/html","text/xml","application/zip","application/vnd.ms-excel","application/msword","application/vnd.ms-powerpoint","application/pdf","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/x-hwp",};
如果想要支持传输 apk ,需要加上"application/vnd.android.package-archive"
。