1

Here is a partial list of an AndroidManifest.xml of interest. This declares an Activity of SendCoinsActivity class in de.schildbach.wallet.ui.send package. Using ADB(Android Debug Bridge), I tried to launch this activity by

  • adb shell am start -n de.schildbach.wallet.ui.send/.SendCoinsActivity -a android.intent.action.VIEW
  • or by something similar to this by changing action and category options.

But I met the following error

Error type 3 Error: Activity class{de.schildbach.wallet.ui.send/de.schildbach.wallet.ui.send.SendCoinsActivity} does not exists.

I do not understand why.

=====

xmlns:tools="http://schemas.android.com/tools"

package="de.schildbach.wallet_test"

android:installLocation="internalOnly"

android:versionCode="175"

android:versionName="3.54-test" >




<uses-sdk

    android:minSdkVersion="10"

    android:targetSdkVersion="11"

    tools:ignore="OldTargetApi" />




<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.NFC" />

<uses-permission android:name="android.permission.CAMERA" />

<uses-permission android:name="android.permission.VIBRATE" />

<uses-permission android:name="android.permission.WAKE_LOCK" />

<uses-permission android:name="android.permission.BROADCAST_STICKY" />

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<uses-permission android:name="android.permission.BLUETOOTH" />




<uses-feature

    android:name="android.hardware.touchscreen"

    android:required="false" />

<uses-feature

    android:name="android.hardware.nfc"

    android:required="false" />

<uses-feature

    android:name="android.hardware.camera"

    android:required="false" />

<uses-feature

    android:name="android.hardware.camera.front"

    android:required="false" />

<uses-feature

    android:name="android.hardware.camera.autofocus"

    android:required="false" />

<uses-feature

    android:name="android.hardware.camera.flash"

    android:required="false" />

<uses-feature

    android:name="android.hardware.screen.landscape"

    android:required="false" />

<uses-feature

    android:name="android.hardware.bluetooth"

    android:required="false" />




<supports-screens

    android:anyDensity="true"

    android:largeScreens="true"

    android:normalScreens="true"

    android:smallScreens="true"

    android:xlargeScreens="true" />




<application

    android:name="de.schildbach.wallet.WalletApplication"

    android:allowBackup="false"

    android:hardwareAccelerated="true"

    android:icon="@drawable/app_icon"

    android:label="@string/app_name"

    android:theme="@style/My.Theme" >

    <activity

        android:name="de.schildbach.wallet.ui.WalletActivity"

        android:configChanges="keyboard|keyboardHidden"

        android:launchMode="singleTask" />




    <activity-alias

        android:name="de.schildbach.wallet.WalletActivity"

        android:targetActivity="de.schildbach.wallet.ui.WalletActivity" >

        <intent-filter>

            <action android:name="android.intent.action.MAIN" />




            <category android:name="android.intent.category.LAUNCHER" />

        </intent-filter>

        <intent-filter>

            <action android:name="android.nfc.action.NDEF_DISCOVERED" />




            <data android:mimeType="application/x-btctx" />




            <category android:name="android.intent.category.DEFAULT" />

        </intent-filter>

    </activity-alias>




    <activity

        android:name="de.schildbach.wallet.ui.send.SendCoinsActivity"

        android:configChanges="keyboard|keyboardHidden"

        android:label="@string/send_coins_activity_title"

        android:screenOrientation="behind"

        android:windowSoftInputMode="adjustResize" >

        <intent-filter android:label="@string/send_coins_activity_title" >

            <action android:name="android.intent.action.VIEW" />




            <data android:scheme="bitcoin" />




            <category android:name="android.intent.category.DEFAULT" />

            <category android:name="android.intent.category.BROWSABLE" />

        </intent-filter>

        <intent-filter android:label="@string/send_coins_activity_title" >

            <action android:name="android.nfc.action.NDEF_DISCOVERED" />




            <data android:scheme="bitcoin" />




            <category android:name="android.intent.category.DEFAULT" />

        </intent-filter>

        <intent-filter android:label="@string/send_coins_activity_title">

            <action android:name="android.intent.action.VIEW" />




            <data android:mimeType="application/bitcoin-paymentrequest" />




            <category android:name="android.intent.category.DEFAULT" />

        </intent-filter>

        <intent-filter android:label="@string/send_coins_activity_title" >

            <action android:name="android.nfc.action.NDEF_DISCOVERED" />




            <data android:mimeType="application/bitcoin-paymentrequest" />




            <category android:name="android.intent.category.DEFAULT" />

        </intent-filter>

    </activity>
user3509406
  • 389
  • 1
  • 10

1 Answers1

0

It looks like your package name is de.schildbach.wallet_test. Following this syntax, the command should be something like:

adb shell am start -n de.schildbach.wallet_test/de.schildbach.wallet.ui.send.SendCoinsActivity
Community
  • 1
  • 1
aQuigs
  • 347
  • 2
  • 7
  • Great!. Your suggestion is working perfectly! Thanks!!! What I didn't know is that the former package name (de.schildbach.wallet_test) can be different from the latter one (de.schildbach.wallet.ui.send). The AndroidManifest file declares the former name in the begining, but the latter package name is the one that SendCoinsActivity class does belong to. I thought that the former and latter package names are always the same, which not true as the example in this question shows. Then why are we allowed to distinguish the two names? what for? – user3509406 Nov 15 '14 at 11:26