I added an intent filter to my activity for a specific type of mime and extension, so when I click on that file it opens the activity that is supposed to open.
Thats awesome, and its working!
But how can I get the file that I clicked? I guess that its possible.
Can someone give me some hints? Thanks alot in advance ;)
EDIT:
I Have this on my AndroidManifest.xml
<activity
android:name="com.activities.omega1.SlaveLoadConfig"
android:label="@string/title_activity_slave_load_config"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.sso" />
<data android:host="*" />
</intent-filter>
</activity>
And I already have files with extension .sso opening the SlaveLoadConfig activity, but I would like to have an handler to get the content of the file, how ?
Found the solution :P
Intent intent = getIntent();
intent.getData().toString();
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