1. Are you ready for the Galaxy S20? Here is everything we know so far!

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

Discussion in 'Android Devices' started by Developer743643, Mar 21, 2019.

  1. Developer743643

    Thread Starter

    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.
     


Loading...
Similar Threads - Set application app
  1. greg8334
    Replies:
    7
    Views:
    147
  2. AndroidGUIIsComplicated
    Replies:
    1
    Views:
    447
  3. MoodyBlues
    Replies:
    17
    Views:
    1,241
  4. Petecc
    Replies:
    0
    Views:
    158
  5. Charles Lee
    Replies:
    5
    Views:
    417
  6. ETtrailrunner
    Replies:
    7
    Views:
    488
  7. dvhttn
    Replies:
    2
    Views:
    298
  8. UndefinedN00B
    Replies:
    7
    Views:
    541
  9. Kamal14042015
    Replies:
    0
    Views:
    413
  10. RahmanBookeey
    Replies:
    1
    Views:
    414

Share This Page

Loading...