SoFunction
Updated on 2025-04-09

Android cannot automatically select the appropriate application when receiving files through Bluetooth.

Receive files via Bluetooth, open from historical transfer records, unable to automatically select the appropriate application
However, if you open this newly received file from the file manager, you can select the corresponding application (such as video player to open .3gp and .mp4 files)

The history transfer record opens the download file. It selects the appropriate APP to open the file by selecting the appropriate APP through the mime type transmitted by the other party when receiving the file.
If the prompt "File with format is not supported", or the wrong APP is used to open the file
The reason is that there is a problem with the mime type when the sender sent the file

The following log is the log of the mtk receiver. Please note the tag of the yellow font
(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 file types, and has its own relevant standards to associate different types of files.
If there is a mistake in mime type, you need to check the sender's problem first.
1. The sender is a non-mtk mobile phone. You need to confirm whether the comparison mobile phones sent to different platforms can open the file normally.
2. The sender is an mtk mobile phone. If you install the APK through a third-party installation (such as sending pictures by a third-party gallery), you need to first check the problem of installing the APK by the third-party. The mime type brought by the transmitted intent is incorrect.
3. The sender is mtk mobile phone. Send files through the built-in APK. Please submit the service to mtk to process

It should be clear that some comparison recipients do not have this problem because some manufacturers practice it to re-detect the file and generate a new mimetype after receiving it.
If only certain specific files have problems, you can refer to this method to do mimetype conversion from the mtk receiver as an evasion method

\xintong\packages\apps\Bluetooth\profiles\opp\src\com\mediatek\bluetooth\opp\adp\
Copy the codeThe code is as follows:

oppsStartPushActivity {
...
//add begin
//Convert based on unrecognized mime type
if( ("unrecognized mimetype");
("Correct mimetype");
/*
Convert the corresponding mimetype according to the suffix name
String extname = (("."));
if((".xxx"))
("Correct mimetype");
*/
else
//add end
(mimeType);