LoginSignup
9
8

More than 5 years have passed since last update.

アプリ独自のURIを簡単にテストする方法

Posted at
<activity android:name=".MyActivity">
  <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="myscheme" android:host="example"  />
  </intent-filter>
</activity>

のような<intent-filter>指定をしたときに簡単に動作を確認する方法。
下記コマンドを実行するだけ!

adb shell am start -a android.intent.action.VIEW -c android.intent.category.DEFAULT -d "myscheme://example"
  • -a: アクション
  • -d: データ(URI)
  • -c: カテゴリ

をそれぞれ指定できます。

9
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
8