public void OnServiceConnected(ComponentName name, IBinder service) { Binder = (LocalBinder)service; Player = Binder.GetService(); Player.Init(); IsConnected = true; Player.SetListener(m_MainActivity); // force play state update (UI sometimes tries to check it while service not bound - this make sure it gets updated once we are bound) m_MainActivity.OnPlayStateChanged(Player); }
public LocalBinder(SnapclientService player) { m_Instance = player; }