I added this in my manifest to give the user the ability to open a xml file with my app. But when i click on a xml file and say "open with..." my app does not show up in the list! I also removed and installed the app new! The name of the file I test with is Test.xml
<activity
android:name=".activities.MainActivity"
android:label="mainAcitivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file"
android:host="*"
android:pathPattern=".*\\.xml"
android:mimeType="*/*" />
</intent-filter>
</activity>
However, since a component can have multiple intent filters, an intent that does not pass through one of a component's filters might make it through on another. An <intent-filter> element in the manifest file lists actions as <action> subelements. For example: <intent-filter . . . >
The Intent is not deprecated the problem is with your itemClickable. class because it is not recognized. Either you have somehow enabled extra warnings that identify Intent as deprecated or something is really stack at your machine.
An intent filter is an expression in an app's manifest file that specifies the type of intents that the component would like to receive. For instance, by declaring an intent filter for an activity, you make it possible for other apps to directly start your activity with a certain kind of intent.
An intent filter declares the capabilities of its parent component — what an activity or service can do and what types of broadcasts a receiver can handle. It opens the component to receiving intents of the advertised type, while filtering out those that are not meaningful for the component.
In this case, the right schema doesn't work, so delete your data tags and try this:
<data android:mimeType="text/xml"/>
<data android:scheme="content" android:mimeType="text/*" android:pathPattern=".*\\.xml"/>
<data android:scheme="file" android:mimeType="text/*" android:pathPattern=".*\\.xml"/>
<data android:scheme="http" android:mimeType="text/*" android:pathPattern=".*\\.xml"/>
<data android:scheme="https" android:mimeType="text/*" android:pathPattern=".*\\.xml"/>
Let me know
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With