Trouble with starting an activity with long press of search key

by 濂囪抗鐨勯緳 » Mon, 11 Oct 2010 05:41:45 GMT

Sponsored Links
 There are two activities in my app,they are declared like this :

<activity android:name="Test1">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>

<activity android:name="Test2"
<action android:name="android.intent.action.SEARCH_LONG_PRESS"/>
<category android:name="android.intent.category.DEFAULT"/>

the problem is:when I was in the activity Test1 and pressed the home
key,then I took a long press of search key,activity Test2 didn't
show,and activity Test1 was taken to the foreground,but I can see
activity Test1 was started in logcat.   I was really confused , anyone
can help me


Other Threads

1. Random Crash in App

Hello, im developing a SMS unlocker. Its an app that lets you run a
game as a demo and give the option of unlocking it via sms messaging.
The problem is that im having a chash that occurs unexpectedly and i
suspect that it can be because of the way that im managing the flow
Instead of using different activities for the different interfaces,
and switch between activities each time the user choose an option, I
use just one activity and i set
different layouts.

e.g. main menu -> unlock game, play demo, help, about. If the user
chooses about, a new activity is not created, intead of that i set an
about_layout to
the activity that was already running.
When the user (in about section) chooses back option, i set the
main_menu_layout again.

Im having this problem in the emulator as well as in the phone (HTC
G1 (dream))

What I want to know is if the phone (or emulator) is having any
problem by setting different layouts at any time.

The exact error that Im getting is:
The application XXXX (process has stopped
unexpectedly. Please try again.


2. Errors while building a Standalone tool chain.

Hello Everybody,

I got the answer for my Question.

The Solution is *bash ./build/tools/ --build-out=
(path to <ANDROID_PRODUCT_OUT>**)*

The PATH for ANDROID_PRODUCT_OUT has to be set correctly..!



3. Google Map API limitations for Android

4. Cannot see my HTC Magic via DDMS to take screenshot

5. Inserting large volumes of data into SQLite - speed issues

6. Remote services question

7. How to draw a circle in GL?