Android cannot automatically select the appropriate application when it is opened via Bluetooth receive file _android

Source: Internet
Author: User
Receive files via Bluetooth, open from history transfer record, unable to automatically select the appropriate application
However, to open this newly received file from File Manager, you can select the corresponding application (such as video player open. 3gp,. mp4 file)

History transfer record opens the download file by selecting the appropriate app to open the file by receiving the MIME type from the file
If you are prompted for files that are not supported in format, or if you use the wrong app to open the file
The reason is that there is a problem with the MIME type that was filled in when the sender sent the file

The following log is the log of the MTK receiver, please note the yellow font of the tag
Bluetooth.opp (299): Opps newtask: [total=801728][result=null][_id=1][peer_addr=00:23:af:d5:f6:8b][done=0][name= Eternal blue.mp3][data=/mnt/sdcard/received file/eternal blue.mp3][state=0][mime=audio/mpeg][type=11][uri=null][ PEER_NAME=XT502]

MIME type is a description of the file type, with its associated criteria for associating different types of files
Incorrect MIME type requires troubleshooting of sender issues first
1. The sender is not MTK mobile phone, need to confirm send to the different platform contrast mobile phone, whether all can open the file normally
2. The sender is MTK mobile phone, through the third party installation apk (such as third party gallery send pictures) to send files, you need to first troubleshoot Third-party installation apk problem, passed out of the intent with MIME type wrong
3. The sender for MTK mobile phone, through the APK send the file, please submit eservice by MTK Processing

It is important to be clear that some of the recipients of the comparisons do not have this problem because some vendor practice is to re-examine the file and generate a new mimetype after the file has been received
If only some specific files have problems, refer to this method to do mimetype conversion from MTK receiver as a circumvention method

\xintong\packages\apps\bluetooth\profiles\opp\src\com\mediatek\bluetooth\opp\adp\oppmanager.java
Copy Code code as follows:

oppsstartpushactivity {
...
//add begin
//Converts the
if (mimetype.equals ("Unrecognized MimeType") based on an unrecognized MIME type;
This.mOppsTask.setMimeType ("correct mimetype");
/*
converts the corresponding mimetype
String extname = objectname.substring (Objname.lastindexof (".") according to the suffix name;
if (extname.equals (". xxx"))
This.mOppsTask.setMimeType ("correct mimetype");
*/
Else
//add end
This.mOppsTask.setMimeType (mimetype);
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.