3

i have some trouble with android app. I have 5 activity, broadcast receiver and service with many thread. When i pass between activities, i have some error in my logcat:

10-25 11:22:20.255     448-3949/? E/ActivityManager﹕ Activity Manager Crash
java.lang.IllegalArgumentException: Unknown service start result: 15
        at com.android.server.am.ActiveServices.serviceDoneExecutingLocked(ActiveServices.java:1412)
        at com.android.server.am.ActivityManagerService.serviceDoneExecuting(ActivityManagerService.java:11398)
        at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:830)
        at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1737)
        at android.os.Binder.execTransact(Binder.java:388)
        at dalvik.system.NativeStart.run(Native Method)

What is that? Hope somebody will telling me!

4

1 回答 1

2

May this help you:

Points to Keep in Mind for onStartCommand():

intent The Intent supplied to startService(Intent), as given. This may be null if the service is being restarted after its process has gone away, and it had previously returned anything except START_STICKY_COMPATIBILITY.

flags Additional data about this start request. Currently either 0, START_FLAG_REDELIVERY, or START_FLAG_RETRY.

startId A unique integer representing this specific request to start. Use with stopSelfResult(int) Returns.

  • The return value indicates what semantics the system should use for the service's current started state. It may be one of the constants associated with the START_CONTINUATION_MASK bits

So you need to return START_STICKY, or one of the values from Click Here

于 2013-10-25T09:03:58.617 回答