Create two files: name_without_dots.ext and name.with.dots.ext
Tap name_without_dots.ext and you will see context menu from TC4A (Open with, Open as etc.).
Ignore it and tap name.with.dots.ext now. TC4A passes the action to Android system and you will see menu "Open in application" from system "Files" application.
Tested on Redmi Note 8T, Android 11, MIUI 12, TC4A 3.60b2d for "Files" apk with and without updates.
There is another topic which mentions similar behavior, but with no solution given:
https://www.ghisler.ch/board/viewtopic.php?t=76783
Different behavior for filenames with and without dots
Moderators: Hacker, petermad, Stefan2, white
Different behavior for filenames with and without dots
Last edited by Usher on 2024-06-30, 19:09 UTC, edited 1 time in total.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Different bahavior for filenames with and without dots
There are various ways to define file associations in Android:
1. Via MIME type. For example, Text files have type "text/plain". An app can tell Android that it can handle "text/plain", and when you tap on a txt file, Android will include the app in the list of available targets.
2. Via wildcards. This is done via "android:pathPattern" parameter of the intent filter. Example:
android:pathPattern="/.*\\.txt"
Unfortunately this only matches a name with a single dot in it.
You can find a discussion on Stack Overflow.
So in your case, an app has only defined android:pathPattern="/.*\\.ext" for the affected extension.
1. Via MIME type. For example, Text files have type "text/plain". An app can tell Android that it can handle "text/plain", and when you tap on a txt file, Android will include the app in the list of available targets.
2. Via wildcards. This is done via "android:pathPattern" parameter of the intent filter. Example:
android:pathPattern="/.*\\.txt"
Unfortunately this only matches a name with a single dot in it.
You can find a discussion on Stack Overflow.
So in your case, an app has only defined android:pathPattern="/.*\\.ext" for the affected extension.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Different behavior for filenames with and without dots
Thanks for your explanation. I understand that there may be different actions defined for different associations, but there is no association defined for .ext at all. You can observe the same difference in behavior for any unknown file type. It is TC that makes different actions.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator