Пример #1
0
        public void OnServiceConnected(ComponentName name, IBinder service)
        {
            Binder           = (BroadcastService.LocalBinder)service;
            BroadcastService = Binder.GetService();
            BroadcastService.Init();
            IsConnected = true;
            BroadcastService.SetListener(m_MainActivity);

            //// force broadcast state update (UI sometimes tries to check it while service not bound - this make sure it gets updated once we are bound)
            m_MainActivity.OnBroadcastStateChanged(BroadcastService);
        }
Пример #2
0
 public LocalBinder(BroadcastService broadcastService)
 {
     m_Instance = broadcastService;
 }