Android receives a file through Bluetooth and opens the file from the historical transmission record. You cannot automatically select an appropriate application.

Source: Internet
Author: User

Receives files through Bluetooth and opens the file from the historical transmission record. You cannot select an appropriate application automatically.
However, to open the new received file from File Manager, you can select the corresponding application (such as video playerto open the .3gp).mp4 file)
 
The download file is opened in the historical transmission record. The MIME type passed by the recipient when receiving the file is used to select an appropriate app to open the file.
If the message "file in unsupported format" is displayed, or an incorrect app is used to open the file
The reason is that the MIME type entered when the sender sends the file has a problem.
 
The following log is the log of the MTK receiver. Note the tag in the yellow font.
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/stored ed 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. It has related standards to associate different types of files.
If the MIME type is incorrect, check the sender's problem first.
1. If the sender is a non-MTK mobile phone, you need to confirm whether the file can be opened normally by sending it to different platform comparison mobile phones.
2. the sender sends a file to the MTK mobile phone through the third-party installation APK (such as the third-party gallery sends an image). First, check the third-party installation APK problem and the MIME type of the imported intent is incorrect.
3. The sender sends a file to the MTK mobile phone through the built-in APK. Please submit eservice for processing by the MTK
 
It should be clear that some comparison recipients do not have this problem because some vendors will re-detect the file and generate a new mimetype after receiving the file.
If only some specific files have problems, you can refer to this method to convert the mimetype from the MTK receiver as an escape method.
 
\ Xintong \ packages \ apps \ Bluetooth \ profiles \ OPP \ SRC \ com \ mediatek \ Bluetooth \ OPP \ adp \ oppmanager. Java
 
Oppsstartpushactivity {
...
// Add begin
// Convert Based on unrecognized MIME type
If (mimetype. Equals ("Unrecognized mimetype ");
This. moppstask. setmimetype ("correct mimetype ");
/*
Convert the corresponding mimetype Based on the suffix
String extname = objectname. substring (objname. lastindexof ("."));
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.