Android Question File Association

Gearcam

Active Member
Licensed User
Longtime User
I am trying to use the following manifest edited:

B4X:
'*****************************************************
'*** FILTER INTENTS BASED ON CLICKING A BROWSED FILE
'*****************************************************
'Handle intent from a file click simply based on file extensionAddActivityText(Main,
<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="file" />
<data android:host="*" />
<data android:pathPattern=".*\\.des1" />
<data android:mimeType="*/*" />
</intent-filter>)

It changes the manifest and installs the app

But if imake a *.des1 file clicking it does not open the app but asks "Open as ...."
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
In the upper right of the thread you find a popup where you can change the thread title. Here you can change the prefix too.
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
'*****************************************************
'*** FILTER INTENTS BASED ON CLICKING A BROWSED FILE
'*****************************************************
'Handle intent from a file click simply based on file extension
AddActivityText(Main,
<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="file" />
<data android:host="*" />
<data android:pathPattern=".*\\.des1" />
<data android:mimeType="*/*" />
</intent-filter>)
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
Still not working this is the editor now I have also tried another extention"D11" as the "des" extension opens A360

B4X:
'Handle intent from a file click simply based on file extension
AddActivityText(Main,
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:host="*" />
<data android:pathPattern=".*\\.D11" />
</intent-filter>)
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
Hi Erel I don't understand then
I have only run it through the bridge does it have to be installed through play store ?
I have a file in both the root directory of the mem card and the phone also in a sub directory of the phone mem none work.
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
will it mater what version of Java JDK v7 or v8 I am using ?

Also any specific libraries etc.

I must be using something that is out of date ?
 
Upvote 0
Top