コード例 #1
0
 public void onServiceDisconnected(ComponentName name) {
   try {
     mService.unregisterCallback(mCallback);
   } catch (RemoteException e) {
     Log.e(TAG, "RemoteException", e);
   }
   mService = null;
 }
コード例 #2
0
 public void onServiceConnected(ComponentName name, IBinder service) {
   mService = IUpdateCheckService.Stub.asInterface(service);
   try {
     mService.registerCallback(mCallback);
   } catch (RemoteException e) {
     Log.e(TAG, "RemoteException", e);
   }
 }
コード例 #3
0
 @Override
 protected Void doInBackground(Void... arg0) {
   if (mBound) {
     try {
       while (mService == null) {
         // Wait till the Service is bound
       }
       mService.checkForUpdates();
     } catch (RemoteException e) {
       Log.e(TAG, "Exception on calling UpdateCheckService", e);
     }
   }
   return null;
 }