-1

I am working in an Android application where i need to share data between two applications.

I achieved the same using Content Provider, Shared Preferences, Intents .

But is there a way to execute the same using Deep linking in Android?

What i am trying to ask is, upon button click in app 1, app 2 needs to be opened.

The code which i use for deeplinking is

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="myapp" />
        </intent-filter>

in manifest and we will get the intent in Activity.

Can anyone please guide me regarding this?

Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
KarthikKPN
  • 653
  • 12
  • 22

1 Answers1

0

You can retrieve the Uri associated with the Intent using

Uri uri = getIntent().getData();

you can then using one of the getter available to retrieve your id, if you provide one. E.g. myapp://wallet/test?id=100

String id = data.getQueryParameter("id");

should give you 100

Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142