ServiceConnection::onServiceConnected not called even though Context::bindService returns true?

后端 未结 1 1894
感情败类
感情败类 2021-01-06 06:14

I\'ve been trying to bind a service that was started on boot from an activity. The code for starting on boot was mostly taken from the instant messenger.

This is the

1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-06 06:37

    Also, when I start the service from the activity it works as expected (ServiceConnection::onServiceConnected is called).

    startService() does not involve a ServiceConnection object.

    Get rid of both the android:process="android.process.lifestylepp" lines from your manifest. That may be the source of your difficulty, and more importantly it is very unlikely you really need two processes and all the overhead that requires.

    0 讨论(0)
提交回复
热议问题