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>

<activity android:name="Test2"
android:theme="@android:style/Theme.Dialog">
<action android:name="android.intent.action.SEARCH_LONG_PRESS"/>
<category android:name="android.intent.category.DEFAULT"/>
</activity>

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. VM aborted and Framework disconnected

Hi:
  I have implement a an AP to test device. The AP is an Alarm, it
wakes up every 30 secons and wake up the whole system though wakelock.
After a period about 3 hours, log out the error message.

WARN/dalvikvm(1063): Last 10 entries in JNI global reference table:
01-06 07:45:07.734: WARN/dalvikvm(1063):  1991: 0x2e456b38 cls=[B
(1044 bytes)
01-06 07:45:07.734: WARN/dalvikvm(1063):  1992: 0x2e6add70
cls=Landroid/database/ContentObserver$Transport; (28

bytes)
01-06 07:45:07.734: WARN/dalvikvm(1063):  1993: 0x2e6addc0 cls=Ljava/
lang/ref/WeakReference; (28 bytes)
01-06 07:45:07.744: WARN/dalvikvm(1063):  1994: 0x2e6adf08 cls=Ljava/
lang/ref/WeakReference; (28 bytes)
01-06 07:45:07.744: WARN/dalvikvm(1063):  1995: 0x2e6adfd0

cls=Landroid/content/ContentService$ObserverNode$ObserverEntry; (20
bytes)
01-06 07:45:07.744: WARN/dalvikvm(1063):  1996: 0x2e6ae078 cls=Ljava/
lang/ref/WeakReference; (28 bytes)
01-06 07:45:07.754: WARN/dalvikvm(1063):  1997: 0x2e681fe0 cls=Ljava/
lang/ref/WeakReference; (28 bytes)
01-06 07:45:07.754: WARN/dalvikvm(1063):  1998: 0x2e682058 cls=Ljava/
lang/ref/WeakReference; (28 bytes)
01-06 07:45:07.754: WARN/dalvikvm(1063):  1999: 0x2e682688
cls=Landroid/database/CursorToBulkCursorAdaptor; (44

bytes)
01-06 07:45:07.754: WARN/dalvikvm(1063):  2000: 0x2e682688
cls=Landroid/database/CursorToBulkCursorAdaptor; (44

bytes)
01-06 07:45:07.814: WARN/dalvikvm(1063): JNI global reference table
summary (2001 entries):
01-06 07:45:07.834: WARN/dalvikvm(1063):    90 of Ljava/lang/Class;
164B (50 unique)
01-06 07:45:07.844: WARN/dalvikvm(1063):     1 of Ljava/lang/String;
28B
01-06 07:45:07.844: WARN/dalvikvm(1063):     1 of [B 532B
01-06 07:45:07.844: WARN/dalvikvm(1063):     1 of [B 1044B
01-06 07:45:07.854: WARN/dalvikvm(1063):   934 of Ljava/lang/ref/
WeakReference; 28B (934 unique)
01-06 07:45:07.874: WARN/dalvikvm(1063):    33 of Ljava/lang/ref/
WeakReference; 36B (33 unique)
01-06 07:45:07.874: WARN/dalvikvm(1063):     1 of Landroid/os/Binder;
20B
01-06 07:45:07.874: WARN/dalvikvm(1063):     1 of Ldalvik/system/
VMRuntime; 12B
01-06 07:45:07.884: WARN/dalvikvm(1063):     1 of Landroid/server/
BluetoothDeviceService; 76B
01-06 07:45:07.884: WARN/dalvikvm(1063):     2 of Landroid/server/
BluetoothA2dpService; 60B (1 unique)
01-06 07:45:07.884: WARN/dalvikvm(1063):     1 of Landroid/content/
ContentProvider$Transport; 28B
01-06 07:45:07.884: WARN/dalvikvm(1063):    15 of Landroid/database/
CursorToBulkCursorAdaptor; 44B (14 unique)
01-06 07:45:07.884: WARN/dalvikvm(1063):     1 of Lcom/android/server/
HardwareService; 68B
01-06 07:45:07.884: WARN/dalvikvm(1063):     1 of Lcom/android/server/
AlarmManagerService; 100B
01-06 07:45:07.884: WARN/dalvikvm(1063):     1 of Lcom/android/server/
BatteryService; 124B
01-06 07:45:07.884: WARN/dalvikvm(1063):     1 of Lcom/android/server/
SensorService; 28B
01-06 07:45:07.884: WARN/dalvikvm(1063):     1 of Lcom/android/server/
am/ActivityManagerService; 468B
01-06 07:45:07.884: WARN/dalvikvm(1063):     1 of Lcom/android/server/
EntropyService; 28B
01-06 07:45:07.884: WARN/dalvikvm(1063):     1 of Lcom/android/server/
PowerManagerService; 300B
01-06 07:45:07.894: WARN/dalvikvm(1063):     1 of Lcom/android/server/
am/BatteryStatsService; 28B
01-06 07:45:07.894: WARN/dalvikvm(1063):     1 of Lcom/android/server/
am/UsageStatsService; 76B
01-06 07:45:07.894: WARN/dalvikvm(1063):     1 of Lcom/android/server/
TelephonyRegistry; 84B
01-06 07:45:07.894: WARN/dalvikvm(1063):     1 of Lcom/android/server/
PackageManagerService; 212B
01-06 07:45:07.894: WARN/dalvikvm(1063):     1 of Lcom/android/server/
AccessibilityManagerService; 76B
01-06 07:45:07.894: WARN/dalvikvm(1063):     4 of Lcom/android/server/
am/HistoryRecord; 268B (4 unique)
01-06 07:45:07.894: WARN/dalvikvm(1063):     1 of Lcom/android/server/
WindowManagerService; 380B
01-06 07:45:07.894: WARN/dalvikvm(1063):   413 of Landroid/content/
ContentService$ObserverNode$ObserverEntry; 20B

(413 unique)
01-06 07:45:07.894: WARN/dalvikvm(1063):     5 of Landroid/content/
ContentService$ObserverNode$ObserverEntry; 28B (5

unique)
01-06 07:45:07.894: WARN/dalvikvm(1063):     3 of Lcom/android/server/
am/PendingIntentRecord; 52B (3 unique)
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
WallpaperService; 44B
01-06 07:45:07.914: WARN/dalvikvm(1063):    18 of Lcom/android/server/
am/ActivityManagerService$AppDeathRecipient;

28B (18 unique)
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
ConnectivityService; 60B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Landroid/media/
AudioService; 124B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
FallbackCheckinService; 28B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
AppWidgetService; 68B
01-06 07:45:07.914: WARN/dalvikvm(1063):   405 of Landroid/database/
ContentObserver$Transport; 28B (405 unique)
01-06 07:45:07.914: WARN/dalvikvm(1063):     5 of Landroid/database/
ContentObserver$Transport; 36B (5 unique)
01-06 07:45:07.914: WARN/dalvikvm(1063):    12 of Lcom/android/server/
am/ServiceRecord; 172B (12 unique)
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
NetStatService; 20B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Landroid/server/
search/SearchManagerService; 44B
01-06 07:45:07.914: WARN/dalvikvm(1063):     6 of Lcom/android/server/
WindowManagerService$Session; 76B (3 unique)
01-06 07:45:07.914: WARN/dalvikvm(1063):     2 of Landroid/app/
ActivityThread$ProviderRecord; 28B (2 unique)
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
LocationManagerService; 124B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
ClipboardService; 28B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
DeviceStorageMonitorService; 108B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
status/StatusBarService; 284B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
MountService; 76B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
WifiService; 116B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Landroid/content/
ContentService; 44B
01-06 07:45:07.914: WARN/dalvikvm(1063):     4 of

Lcom/android/server/WindowManagerService$WindowState$DeathRecipient;
12B (4 unique)
01-06 07:45:07.914: WARN/dalvikvm(1063):     2 of

Landroid/app/ActivityThread$PackageInfo$ServiceDispatcher
$DeathMonitor; 20B (2 unique)
01-06 07:45:07.914: WARN/dalvikvm(1063):     3 of Lcom/android/server/
InputMethodManagerService$MethodCallback; 28B

(3 unique)
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of

Lcom/android/server/am/ActivityManagerService$PermissionController;
28B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
am/ActivityManagerService$ProvidersBinder; 28B
01-06 07:45:07.914: WARN/dalvikvm(1063):     2 of Landroid/os/
RemoteCallbackList$Callback; 20B (2 unique)
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
NotificationManagerService; 124B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
am/ActivityManagerService$SendersBinder; 28B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
am/ActivityManagerService$ServicesBinder; 28B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
InputMethodManagerService; 172B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
am/ActivityManagerService$BroadcastsBinder;

28B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
am/ActivityManagerService$CpuBinder; 28B
01-06 07:45:07.914: WARN/dalvikvm(1063):     1 of Lcom/android/server/
am/ActivityManagerService$MemBinder; 28B
01-06 07:45:07.914: WARN/dalvikvm(1063): Memory held directly by
native code is 65800 bytes
01-06 07:45:07.914: ERROR/dalvikvm(1063): Excessive JNI global
references (2001)
01-06 07:45:07.914: ERROR/dalvikvm(1063): VM aborting

-- 

2. Accessories HTC Desire, Google Nexus One, Motorola Milestone - Motorola Droid, Samsung Galaxy Spica, Universal USB Car Charger

Accessories HTC Desire, Google Nexus One, Motorola Milestone -
Motorola Droid, iPhone 3G and 3Gs, Samsung Galaxy Spica, Car Charger.

****Mohon diperhatikan, barang semua belum sampe di rumah saya, semua
masih dalam perjalanan ke rumah saya (Berdasarkan Info paling cepat
barang sampe 7 July 2010 dan paling telat barang sampe 27 July 2010)
Barang bisa di booking terlebih dahulu "MAU LUNASIN DULU BOLEH" ato
"MAU LUNASIN SETELAH BARANG DATENG JUGA BOLEH"

*format pemesanan
Nama Lengkap :
Alamat Lengkap :
No Telp :
Id Kaskus or Id Milis :
Email :
Barang Yang Dipesan :

Untuk Fast Response :
SMS : 08 565 99 888 15

Email : reza.iransj...@gmail.com

Or Post-Reply HERE

*Yang duluan konfirmasi booked, akan di booked terlebih dahulu (Siapa
cepat dia dapat) :D

*Para pemesan akan di posting sedikit datanya di thread kaskus

*Barang yang tersedia hanya yang tertera diatas

*Barang belum termasuk ONGKOS KIRIM ---->>>> www.jne.co.id

*Lokasi saya di Bandung, bagi yang mau COD hanya Bandung saja.

*Foto Tersedia

Barang yang tersedia :

1. Accessories GOOGLE NEXUS ONE - HTC

Nexus Gel {*filter*} Skin Case Black = Rp. 105.000 (Stock Yang Akan Tiba =
2 Item)
 http://www.***.com/ 

Nexus Hard {*filter*} Back Case Black n White = Rp. 95.000 (Stock Yang
Akan Tiba = 2
Item White/2 Item Black)
 http://www.***.com/ 

Nexus Hard {*filter*} Case Black = Rp. 125.000 (Stock Yang Akan Tiba = 3
Item)
 http://www.***.com/ 

Nexus Leather Case Black = Rp. 145.000 (Stock Yang Akan Tiba = 2 Item)
 http://www.***.com/ 

Nexus Silicone White = Rp. 85.000 (Stock Yang Akan Tiba = 2 Item)
 http://www.***.com/ 

2. Accessories MOTOROLA MILESTONE - MOTOROLA DROID

Milestone - Droid Hard {*filter*} Case Black = Rp. 135.000 (Stock Yang
Akan Tiba = 2
Item - SISA 1 ITEM LAGI)
 http://www.***.com/ 

Milestone - Droid Hard {*filter*} Case Transparant = Rp. 125.000 (Stock
Yang Akan
Tiba = 2 Item)
 http://www.***.com/ 

3. Accessories HTC DESIRE

Desire And Nexus Pouch Black = Rp. 105.000 (Stock Yang Akan Tiba = 1
Item)
 http://www.***.com/ 

Desire Hard {*filter*} Case Black = Rp. 125.000 (Stock Yang Akan Tiba = 3
Item)
 http://www.***.com/ 

5. Accessories Samsung Galaxy Spica

Spica Crystal Clear Cover = Rp. 55.000 (Stock Yang Akan Tiba = 2 Item)
 http://www.***.com/ 

4. Accessories iPhone 3G and 3Gs

iPhone 3G n 3Gs Plastic Case = Rp. 85.000 (Stock Yang Akan Tiba = 2
Item)
 http://www.***.com/ 

iPhone 3G n 3Gs Silicone Black = Rp. 85.000 (Stock Yang Akan Tiba = 2
Item)
 http://www.***.com/ 

6. Universal USB Car Charger

Car Charger = Rp. 55.000 (Stock Yang Akan Tiba = 2 Item)
 http://www.***.com/ 

Bila mau cek langsung di :  http://www.***.com/ 

-- 
"Indonesian Android Community [id-android]" 

Join:  http://www.***.com/ 
Moderator: id.andr...@gmail.com
ID Android Developer:  http://www.***.com/ 
ID Android Surabaya:  http://www.***.com/ 
ID Android on FB:  http://www.***.com/ 

3. Getting user input and turning it into int,double,float

4. Ga bs masuk pa trafic tnggi

5. How do the DivX players render the video?

6. Which Applications are most famous on Android

7. Getting Unlocked Android phones