I have an app (CirelDiagrams) that analyses data provided in a specialist binary file with file extension .crl.
On my Lenovo TB3-710F tablet running Android 5.0.1 I can navigate to a file using the File Manager app, click on a file and, if it has the .crl extension, Android will open my app. I have the following code as part of the Manifest
I have yet to write the code in the app actually to open the file, read it and deal with the data, but at least the app opens.
On my moto g(9) play running Android 11 I can navigate to a file using the File Manager + app but if I click on a file that has the .crl extension I get a message 'App not found'. If I click on a file with, say, .cti extension I am offered a choice of apps to run, but CirelDiagrams is not listed. (It wouldn't be able to open a .cti file, but why isn't it listed along with all the other apps?)
It seems that the system is recognising the file type but cannot find my app. My app installs OK and performs other functions correctly.
On my Google Pixel 6A, running Android 16 I get the same as for my g(9) if I use File manager + to navigate to a file.
If I use Google Files to navigate to a .crl file I get the message "None of your apps can open this file"
If a click on a .cti file I am offered just three possible apps to open the file.
I have arrived at the intent filter code by mashing together stuff from other threads on this forum, so it's all a bit of a mystery! One particular question I have about the code is why the pathPattern ".*.crl" works. What does the initial . do?
Many thanks,
Martin
On my Lenovo TB3-710F tablet running Android 5.0.1 I can navigate to a file using the File Manager app, click on a file and, if it has the .crl extension, Android will open my app. I have the following code as part of the Manifest
XML:
AddActivityText(Main,
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.OPENABLE" />
<data android:scheme="file" />
<data android:host="*" />
<data android:pathPattern=".*.crl" />
<data android:mimeType="*/*" />
</intent-filter>)
I have yet to write the code in the app actually to open the file, read it and deal with the data, but at least the app opens.
On my moto g(9) play running Android 11 I can navigate to a file using the File Manager + app but if I click on a file that has the .crl extension I get a message 'App not found'. If I click on a file with, say, .cti extension I am offered a choice of apps to run, but CirelDiagrams is not listed. (It wouldn't be able to open a .cti file, but why isn't it listed along with all the other apps?)
It seems that the system is recognising the file type but cannot find my app. My app installs OK and performs other functions correctly.
On my Google Pixel 6A, running Android 16 I get the same as for my g(9) if I use File manager + to navigate to a file.
If I use Google Files to navigate to a .crl file I get the message "None of your apps can open this file"
If a click on a .cti file I am offered just three possible apps to open the file.
I have arrived at the intent filter code by mashing together stuff from other threads on this forum, so it's all a bit of a mystery! One particular question I have about the code is why the pathPattern ".*.crl" works. What does the initial . do?
Many thanks,
Martin