Android Question Is it possible to programmically change the mimeType of a manifest intent-filter?

JohnC

Expert
Licensed User
Longtime User
If I have the below statement in my apps manifest:

B4X:
<intent-filter>
  <action android:name="android.intent.action.GET_CONTENT" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.OPENABLE" />
  <data android:mimeType="image/*" />
</intent-filter>

Is it possibly to either change the mimeType to "audio/*" using code?

Or, is there a way that I could have both mimeTypes in the manifest:

B4X:
<intent-filter>
  <action android:name="android.intent.action.GET_CONTENT" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.OPENABLE" />
  <data android:mimeType="image/*" />
  <data android:mimeType="audio/*" />
</intent-filter>

But programmically disable one of them?
 
Top