I have an Activity A with the following intent filter
<activity
android:name="com.comp.pac.ActivityA">
<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:scheme="customapp"
android:host="show"
android:path="/"/>
</intent-filter>
</activity>
I am basically trying the custom data scheme in intent filters as explained here
To test whether the IntentUri launches the activity or not I'm trying to fire the intent using the following command through terminal :
adb shell am start intent://show/#Intent;scheme=customapp;package=com.comp.pac;end
I get the following error :
Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=intent://show/ flg=0x10000000 }
Question : Is there anything wrong with the command? If not, what is the easiest way to test whether the intent uri starts the activity?
The instructions for using the adb
command to start activity using intent uri is available here.
In general, Intents are used to progress to the next activity or come back to the previous activity. In this article, we will show you how you could start a New Activity using Intent in Android using Jetpack Compose.
The instructions for using the adb command to start activity using intent uri is available here. Note the "/" after the package name and the "." before the Activity name. $ adb shell am start -W -a android.intent.action.VIEW -d "example://gizmos" com.example.android
If you want start activity, you write code like this. And If you want launch url page, you will pass Uri with Intent.ACTION_VIEW. If you use many browser in your phone, android will show select browser view for url load. This select view is not only url also any other duplication action.
And If you want launch url page, you will pass Uri with Intent.ACTION_VIEW. If you use many browser in your phone, android will show select browser view for url load. This select view is not only url also any other duplication action. How you can see this select view?
You need to use ""
:
adb shell 'am start "intent:#Intent;scheme=customapp;package=com.comp.pac;end"'
enter code hereAnother way to open activity :
$ adb shell am start -W -a android.intent.action.VIEW -d "example://gizmos" com.example.android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With