I'm trying to build a basic music player but right now I'm stuck at making widget for it. Can someone tell me how do I connect widget to the background service? I'm using MediaBrowser,MediaController on the client side and MediaBrowserService,MediaSession in the background service. So, to create a instance of MediaController, I require activity which isn't available in widget class if I'm not wrong and if I try to bind widget class to service using bindService and returning an instance of the background service class method I'm getting error (which is resolved once I comment the onBind method in the service)
How do I proceed?