HELP! Cannot launch sub activity

by Jennifer » Fri, 23 Apr 2010 08:05:47 GMT


Sponsored Links
 Hi y'all,

I'm working on making an application that requires me to populate a
contact list.

My code works when the intent-filter for the activity is set to:

<activity android:name=".ContactPicker"
                  android:label="Contact Picker">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
</activity>

However, I do not want this activity to start right at the launch of
the emulator. My program has a menu page where once you click on a
button, this contact picker (basically a contact list) will show up.
What are the manifest attributes that I need for this to happen?

Thanks!

Jennifer

--



HELP! Cannot launch sub activity

by Kumar Bibek » Fri, 23 Apr 2010 12:43:35 GMT


 Then you should have another activity with the same intent filter.
Remove the intent filter from this Activity.

And from the other activity, on button click event you need to start
this Activity.

<activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
</activity>
<activity android:name=".ContactPicker"
                  android:label="Contact Picker"/>

Thanks and Regards,
Kumar Bibek



>


Sponsored Links


Other Threads

1. Strange Exception

In my application, the user selects an image from the sdcard. I
launch  Intent.ACTION_GET_CONTENT action for  "image/*" type. This
displays the com.android.camera/.ImageGallery2 activity. When the user
makes a selection, I create a Bitmap Object using Media.createBitmap
(..).

However, when the user was trying to open an image from the SD card
the app ran into strange errors.

Stack dump :

10-29 08:51:35.536: ERROR/IMemory(18142): binder=0x191868 transaction
failed fd=-2147483647, size=0, err=-2147483646 (Unknown error:
2147483646)
10-29 08:51:35.536: ERROR/IMemory(18142): cannot dup fd=-2147483647,
size=0, err=-2147483646 (Bad file number)
10-29 08:51:35.536: ERROR/IMemory(18142): cannot map BpMemoryHeap
(binder=0x191868), size=0, fd=-1 (Bad file number)
10-29 08:51:35.555: ERROR/Surface(18142): Couldn't map Surface's heap
(binder=0x191868, heap=0x1918c0)
10-29 08:51:35.555: DEBUG/AndroidRuntime(18142): Shutting down VM
10-29 08:51:35.555: WARN/dalvikvm(18142): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
10-29 08:51:35.585: ERROR/AndroidRuntime(18142): Uncaught handler:
thread main exiting due to uncaught exception
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):
java.lang.IllegalArgumentException
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
android.view.Surface.lockCanvasNative(Native Method)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
android.view.Surface.lockCanvas(Surface.java:196)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
android.view.ViewRoot.draw(ViewRoot.java:1175)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
android.view.ViewRoot.performTraversals(ViewRoot.java:1030)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
android.os.Handler.dispatchMessage(Handler.java:99)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
android.os.Looper.loop(Looper.java:123)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
java.lang.reflect.Method.invokeNative(Native Method)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
java.lang.reflect.Method.invoke(Method.java:521)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
10-29 08:51:35.675: ERROR/AndroidRuntime(18142):     at
dalvik.system.NativeStart.main(Native Method)

Strangely, I was not able to recreate this, but it has got me
worrying.
What does this error mean? What are the possible scenarios that can
lead to this error?

Thanks.

--~--~---------~--~----~------------~-------~--~----~

2. Power Management on Android

I'm grappling with this:
if one has a device driver that's to be "ported" to Android, are there
any specific steps / guidelines that need to be followed to be
"Android-compliant"?
Or is it just the "usual" Linux driver stuff?

I would imagine some callbacks for PM can/should be hooked into...I
found some doc stating that the callbacks are:
android_register_early_suspend(android_early_suspend_t *handler)
android_register_early_resume(android_early_resume_t *handler)

However these don't even seem to exist in a recent 2.6.29 Android
kernel tree. ?? Are they outdated?

Do we use wake_[un]lock? Is there documentation/guidelines to state
how exactly we're expected to hook into PM stuff in *kernel* space?
(I know abt the PowerManager etc classes in userland).

Would appreciate any help!

TIA,
-kaiwan.

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: 

3. Building kernel for ADP1

4. gdbserver android patch

5. :Training on Advance C and Linux System Programming from Expert

6. What does the "Home" button do?

7. security enforcemen