Page 1 of 1
File associations
Posted: 2012-03-15, 10:21 UTC
by Kedge
Hello,
I'm using TC on a tablet with ICS 4.0.3 and I like it.
The only issue I have is the file associations. Every file which should not have a associated app is linked to a video player. The players are either DICE or BS Player.
Inside the player app only the typical files are associated. When I deinstall the players the files show with plain white 'paper sheet' icon in TC as they should.
Where does TC get the default associations? Or is it a fault of the player apps? Does anybody else see this behavoir?
Kedge
Posted: 2012-03-15, 13:40 UTC
by ghisler(Author)
TC asks the system for the associations, which are defined in the manifest file of the player. I assume that there is a bug in that manifest, making TC think that the player can handle all file types. Which of the mentioned players is causing this?
Posted: 2012-03-15, 13:46 UTC
by Kedge
Thanks for the fast reply.
Infact both of the player cause this. Both are given as an option to open the file. Currently all the files have the symbol of the DICE player. If I deinstall DICE and reboot the icon is now the BS Player one.
edit: I looked at the manifests and they list only the relevant files. Unfortunately I cannot attach a file. If you would like to take a look at the files tell me how I could provide them.
Posted: 2012-03-15, 14:18 UTC
by ghisler(Author)
Can you post the manifest file? Just the <intent-filter> sections would be sufficient. Just put them in
[ code]
[ /code]
blocks (without the space ater the [.
Posted: 2012-03-15, 14:59 UTC
by Kedge
Edit: this is not the complete code. Something in the code triggered the URL posting restriction, so I deleted something.
Code: Select all
android.intent.category.LAUNCHER rtmp gopher .*m3u8 .*avi .*asf .*f4v .*flv .*mkv .*mpeg .*mpg .*mov .*mts .*m2ts .*rm .*rmvb .*ts .*vob .*webm .*wmv .*AVI .*ASF .*F4V .*FLV .*MKV .*MPEG .*MPG .*MOV .*MTS .*M2TS .*RM .*RMB .*TS .VOB .*WEBM .*WMV android.intent.action.
Posted: 2012-03-15, 20:47 UTC
by ghisler(Author)
That's the compiled manifest file. Please check the not compiled one. You can use the following tool to decompile Android APK files:
http://code.google.com/p/android-apktool/
It requires the Java runtime. Just get the package apktool-install-windows-r04-brut1.tar.bz2. Total Commander can unpack it with my .bz2 plugin.
Posted: 2012-03-15, 20:51 UTC
by Kedge
Thanks for the info. I will try to decompile.
Posted: 2012-03-16, 10:24 UTC
by Kedge
Hello,
I managed to decompile the apk's. Here are the two intent section of the player which cause the misbehavior and for comparison my 3rd video player which does not show this wrong file associations. It's quite some code...
DICE player with 'wrong' associations
Code: Select all
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="rtsp" android:host="*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="application/mp4" />
<data android:mimeType="*/rmvb" />
<data android:mimeType="*/avi" />
<data android:mimeType="*/mkv" />
<data android:mimeType="application/mpeg*" />
<data android:mimeType="application/ogg" />
<data android:mimeType="application/vnd.rn-realmedia*" />
<data android:mimeType="application/3gpp*" />
<data android:mimeType="application/vnd.3gp*" />
<data android:mimeType="application/vnd.dvb*" />
<data android:mimeType="application/vnd.dolby*" />
<data android:mimeType="application/octet-stream" />
<data android:mimeType="application/x-mpegurl" />
<data android:mimeType="audio/x-mpegurl" />
<data android:mimeType="application/vnd.apple.mpegurl" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="application/x-mpegurl" android:scheme="htp" />
<data android:mimeType="audio/*" android:scheme="htp" />
<data android:mimeType="audio/*" android:scheme="rtsp" />
<data android:mimeType="audio/*" android:scheme="file" />
<data android:mimeType="audio/*" android:scheme="content" />
<data android:mimeType="audio/*" android:scheme="mms" />
<data android:mimeType="video/*" android:scheme="htp" />
<data android:mimeType="video/*" android:scheme="rtsp" />
<data android:mimeType="video/*" android:scheme="file" />
<data android:mimeType="video/*" android:scheme="content" />
<data android:mimeType="video/*" android:scheme="mms" />
<data android:mimeType="video/*" android:scheme="htplive" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="" />
<data android:scheme="file" />
<data android:scheme="content" />
<data android:scheme="htp" />
<data android:scheme="htps" />
<data android:scheme="rtp" />
<data android:scheme="rtsp" />
<data android:scheme="rtmp" />
<data android:scheme="mms" />
<data android:scheme="gopher" />
<data android:host="*" />
<data android:pathPattern=".*m3u8" />
<data android:pathPattern=".*avi" />
<data android:pathPattern=".*asf" />
<data android:pathPattern=".*f4v" />
<data android:pathPattern=".*flv" />
<data android:pathPattern=".*mkv" />
<data android:pathPattern=".*mpeg" />
<data android:pathPattern=".*mpg" />
<data android:pathPattern=".*mov" />
<data android:pathPattern=".*mts" />
<data android:pathPattern=".*m2ts" />
<data android:pathPattern=".*rm" />
<data android:pathPattern=".*rmvb" />
<data android:pathPattern=".*ts" />
<data android:pathPattern=".*vob" />
<data android:pathPattern=".*webm" />
<data android:pathPattern=".*wmv" />
<data android:pathPattern=".*AVI" />
<data android:pathPattern=".*ASF" />
<data android:pathPattern=".*F4V" />
<data android:pathPattern=".*FLV" />
<data android:pathPattern=".*MKV" />
<data android:pathPattern=".*MPEG" />
<data android:pathPattern=".*MPG" />
<data android:pathPattern=".*MOV" />
<data android:pathPattern=".*MTS" />
<data android:pathPattern=".*M2TS" />
<data android:pathPattern=".*RM" />
<data android:pathPattern=".*RMVB" />
<data android:pathPattern=".*TS" />
<data android:pathPattern=".*VOB" />
<data android:pathPattern=".*WEBM" />
<data android:pathPattern=".*WMV" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="application/vnd.apple.mpegurl" android:scheme="htp" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
BS PLayer also 'wrong' associations
Code: Select all
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:label="Browse" android:name="com.bsplayer.bsplayeran.bsp_browse" />
<activity android:label="Playlist" android:name="com.bsplayer.bsplayeran.bsp_plist">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<action android:name="android.net.wifi.STATE_CHANGE" />
</intent-filter>
</activity>
<activity android:label="About" android:name="com.bsplayer.bsplayeran.bsp_about">ΒΈ
<intent-filter>
<action android:name="com.bsplayer.bspalyeran.SHOWABOUT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:label="@string/app_name" android:name="com.bsplayer.bsplayeran.pbcore" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="rtsp" android:host="*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="video/*" android:scheme="file" />
<data android:mimeType="audio/*" android:scheme="file" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="application/mp4" />
<data android:mimeType="*/rmvb" />
<data android:mimeType="*/avi" />
<data android:mimeType="*/mkv" />
<data android:mimeType="application/mpeg*" />
<data android:mimeType="application/ogg" />
<data android:mimeType="application/vnd.rn-realmedia*" />
<data android:mimeType="application/3gpp*" />
<data android:mimeType="application/vnd.3gp*" />
<data android:mimeType="application/vnd.dvb*" />
<data android:mimeType="application/vnd.dolby*" />
<data android:mimeType="application/octet-stream" />
<data android:mimeType="application/x-mpegurl" />
<data android:mimeType="audio/x-mpegurl" />
<data android:mimeType="application/vnd.apple.mpegurl" />
<data android:mimeType="application/vnd.apple.mpegurl" android:scheme="htp" />
<data android:mimeType="audio/*" android:scheme="htp" />
<data android:mimeType="audio/*" android:scheme="rtsp" />
<data android:mimeType="audio/*" android:scheme="content" />
<data android:mimeType="audio/*" android:scheme="mms" />
<data android:mimeType="video/*" android:scheme="htp" />
<data android:mimeType="video/*" android:scheme="rtsp" />
<data android:mimeType="video/*" android:scheme="content" />
<data android:mimeType="video/*" android:scheme="mms" />
<data android:mimeType="video/*" android:scheme="htplive" />
</intent-filter>
MX Player works fine
Code: Select all
<intent-filter android:priority="999">
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<activity android:theme="@style/NoInitialTitle" android:label="@string/app_name" android:name=".ActivityVideoList" android:launchMode="singleTop" android:configChanges="touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:windowSoftInputMode="stateAlwaysHidden" android:hardwareAccelerated="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable" android:resource="@xml/video_search_local" />
</activity>
<activity android:theme="@android:style/Theme.NoDisplay" android:label="@string/app_name" android:name="com.mxtech.videoplayer.ActivityVideoListNoStack" android:configChanges="touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable" android:resource="@xml/video_search_global" />
</activity>
<activity android:theme="@style/Playback" android:label="@string/app_name" android:name=".ActivityScreen" android:configChanges="touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="rtp" />
<data android:scheme="rtsp" />
<data android:scheme="rtmp" />
<data android:scheme="mms" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="" />
<data android:scheme="file" />
<data android:scheme="content" />
<data android:scheme="htp" />
<data android:scheme="htps" />
<data android:scheme="ftp" />
<data android:scheme="gopher" />
<data android:mimeType="video/*" />
<data android:mimeType="application/sdp" />
<data android:mimeType="application/mp4" />
<data android:mimeType="application/mpeg*" />
<data android:mimeType="application/ogg" />
<data android:mimeType="application/vnd.rn-realmedia*" />
<data android:mimeType="application/3gpp*" />
<data android:mimeType="application/vnd.3gp*" />
<data android:mimeType="application/vnd.dvd*" />
<data android:mimeType="application/x-mpegURL" />
<data android:mimeType="application/x-quicktimeplayer" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="" />
<data android:scheme="file" />
<data android:scheme="content" />
<data android:scheme="htp" />
<data android:scheme="htps" />
<data android:scheme="ftp" />
<data android:scheme="gopher" />
<data android:host="*" />
<data android:pathPattern=".*avi" />
<data android:pathPattern=".*asf" />
<data android:pathPattern=".*f4v" />
<data android:pathPattern=".*flv" />
<data android:pathPattern=".*mkv" />
<data android:pathPattern=".*mpeg" />
<data android:pathPattern=".*mpg" />
<data android:pathPattern=".*mov" />
<data android:pathPattern=".*mts" />
<data android:pathPattern=".*rm" />
<data android:pathPattern=".*rmvb" />
<data android:pathPattern=".*ts" />
<data android:pathPattern=".*vob" />
<data android:pathPattern=".*webm" />
<data android:pathPattern=".*wmv" />
<data android:pathPattern=".*AVI" />
<data android:pathPattern=".*ASF" />
<data android:pathPattern=".*F4V" />
<data android:pathPattern=".*FLV" />
<data android:pathPattern=".*MKV" />
<data android:pathPattern=".*MPEG" />
<data android:pathPattern=".*MPG" />
<data android:pathPattern=".*MOV" />
<data android:pathPattern=".*MTS" />
<data android:pathPattern=".*RM" />
<data android:pathPattern=".*RMVB" />
<data android:pathPattern=".*TS" />
<data android:pathPattern=".*VOB" />
<data android:pathPattern=".*WEBM" />
<data android:pathPattern=".*WMV" />
</intent-filter>
</activity>
<activity android:theme="@style/NoInitialTitle_14" android:name="com.mxtech.videoplayer.ActivityPreferences" android:configChanges="touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.PREFERENCE" />
</intent-filter>
</activity>
<activity android:theme="@style/NoInitialTitle_14" android:label="@string/cfg_scan_root" android:name="com.mxtech.videoplayer.ActivityScanRootSelector" android:configChanges="touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:theme="@style/NoInitialTitle_14" android:label="@string/cfg_video_file" android:name="com.mxtech.videoplayer.ActivityVideoFile" android:configChanges="touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:theme="@style/NoInitialTitle" android:label="@string/cfg_info" android:name="com.mxtech.videoplayer.ActivityAbout" android:configChanges="touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:theme="@style/NoInitialTitle" android:name="com.mxtech.videoplayer.ActivityMessenger" android:finishOnTaskLaunch="true" android:clearTaskOnLaunch="true" android:stateNotNeeded="true" android:excludeFromRecents="true" android:configChanges="touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:theme="@style/NoInitialTitle" android:name="com.mxtech.videoplayer.ActivityFFmpegInflater" android:stateNotNeeded="true" android:excludeFromRecents="true" android:launchMode="singleTask" android:configChanges="touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Re: File associations
Posted: 2012-04-07, 22:03 UTC
by amigabill
I'm uding droid4/android2.3.6 and everything seems associated with vim, which I had installed prior to tc. Even trying to open-with never asks me, it just sends the file to vim.
Posted: 2012-04-08, 10:10 UTC
by Kedge
In this topic
http://ghisler.ch/board/viewtopic.php?t=32441&postdays=0&postorder=asc&start=0&sid=ceff12ced8b2b9ea591d4f0f94480861 file associations are discussed in detail (its in german though). It seems to be aproblem with the intent filters. But it should be resolved in RC5 of TC. In RC5 only MIME types are used for file associations.