Code example for IBinder

Methods: transact

0
                if (screenshot != null) {
                    screenshot.writeToParcel(parcel, 0);
                } 
 
                // Send the screenshot (if any) to the service 
                service.transact(1, parcel, null, 0);
            } 
            catch (RemoteException e) {
                Log.e(TAG, "Error connecting to bug report service", e);
                mActivity.unbindService(this);
            } 
            catch (Throwable t) {
                mActivity.unbindService(this);
            } 
        } 
 
        @Override 
        public void onServiceDisconnected(ComponentName name) {
            // Nothing to do here 
        } 
    }