• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Set my application at app list, available to open Json file.

Hi!

What I want to do: Set my application at app list, available to open Json file.

Description: Json file is in file manager. When I click on him, appears app list trying to open file. I must get data from this Json. At this moment I using sharing. I use long click on file, choose share and choose my application. And that work, but not directly how i want.This won't comfortable for future users.

My actually settings for receive data.

Manifest


<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="application/json"/>
</intent-filter>

Next I use, in onCreate method

Class

Intent intent = getIntent();
if(intent.getAction().equals(Intent.ACTION_SEND)){
Uri uri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
.
.
.

I dont know how deal with this.
 
Back
Top Bottom