How to have Android Service communicate with Activity

前端 未结 13 1875
说谎
说谎 2020-11-22 02:54

I\'m writing my first Android application and trying to get my head around communication between services and activities. I have a Service that will run in the background an

13条回答
  •  伪装坚强ぢ
    2020-11-22 03:24

    Use LocalBroadcastManager to register a receiver to listen for a broadcast sent from local service inside your app, reference goes here:

    http://developer.android.com/reference/android/support/v4/content/LocalBroadcastManager.html

提交回复
热议问题