I have my own custom website where my Android app will receive data.
Lets call him example.com.
My Android app can transfer links through other apps like WhatsApp. When a link is shared, a type link is created http://example.com/my/path/to/information.
I want to open my application when this link is clicked. In my file, AndroidManifestI added these lines of code for my purposes:
<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:host="example.com" android:pathPattern="/.*" android:scheme="http"/>
</intent-filter>
My Activity processes its intent as follows:
Intent intent = getIntent();
Log.d("My_intent", intent.toString());
mainNewsId = intent.getStringExtra("news_info");
Log.d("News_result", mainNewsId);
When I use other applications in which the link is shared and click on it, she should offer me applications that can open this link.
, .
? meta - Android?
======================== UPDATE =================== ==============
. , android:host - , Android, , .. p >
, - -?