views:

46

answers:

1

I writing player, it has main activity that runs localservice. I can't find how bind localservice to widget. When i trying to bind it like in activity it fails.

Plz help me.

Adding #1 How can I contact with background service when? http://www.developer.com/ws/data/article.php/10944_3843561_1/Handling-Lengthy-Operations-with-Android-App-Widgets.htm

here i found something, but it doen't work for me.

A: 

You cannot bind to a service from an AppWidgetProvider.

CommonsWare
how i can resolve my problem then?
Spin7ion
@Spin7ion: that is impossible to answer in the abstract. You need to redesign your application such that you do not need to try to bind to a service from an `AppWidgetProvider`. For example, you could use `startService()` to send an `Intent` from your `AppWidgetProvider` to your service's `onStart()` method.
CommonsWare
thank you, that's what i need
Spin7ion