Reputation: 5152
I follow the android documentation to write an application with search widget.
But I found that two ACTION_SEARCH
intents are sent to the SearchActivity
. So, I doubt that is that my fault.
And then I try the Google Play app. I enter keyword to search app and I still capture two intents! Here is the logcat. So, how should be handle this? Even I override onNewIntent with singleTop Activity, it need to search twice to handle one search operation!
04-18 22:26:19.007: I/ActivityManager(389): START u0 {act=android.intent.action.SEARCH flg=0x10000000 cmp=com.android.vending/.AssetBrowserActivity (has extras)} from pid 1721 04-18 22:26:19.007: I/ActivityManager(389): START u0 {act=android.intent.action.SEARCH flg=0x10000000 cmp=com.android.vending/.AssetBrowserActivity (has extras)} from pid 1721
Upvotes: 0
Views: 623
Reputation: 409
This is a bug in the emulator when using the hardware keyboard.
You can disable the hardware keyboard in the emulator by going to Settings -> Language & input and selecting Default.
When using the soft keyboard in the emulator I only get one intent.
Upvotes: 6