私はアンドロイドアプリで働いています。私はwhatsapp共有機能を追加しました。私はそれを成功させました。ユーザーが共有しているリンクをクリックすると、アンドロイドアプリケーションの特定のアクティビティを開きたいと思います。リンクは運がない、私はsomebuddyがこれで私を助けることを願っています。リンクをクリックして特定のアクティビティを開くにはどうすればよいですか?
は、マニフェスト
<activity
android:name=".ProductDescriptionActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="com.abc.allaboutcity.MESSAGE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"
android:host="http://allaboutcity.in"
android:pathPrefix="/allaboutcity" />
</intent-filter>
<intent-filter >
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "example://gizmos” -->
<data android:scheme="allaboutcity"
android:host="allaboutcity" />
</intent-filter>
</activity>
マニフェストとセットに必要なインテントフィルタと、必要なスキームにあなたの活動を追加開きたいという活動にマニフェストファイル内のインテントフィルタを追加する必要がありますその中に! – Xenolion
これをチェック:https://stackoverflow.com/questions/20791482/start-activity-intent-on-clicking-text-inside-webview –
https://developer.android.com/studio/write/app -link-indexing.html –