Android IBinder - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android IBinder class.

This code example shows how to use the following methods:queryLocalInterface
public static com.giantrabbit.nagare.INagareService asInterface(android.os.IBinder obj)
{ 
if ((obj==null)) {
return null; 
} 
com.giantrabbit.nagare.INagareService in = (com.giantrabbit.nagare.INagareService)obj.queryLocalInterface(DESCRIPTOR);
if ((in!=null)) {
return in;
} 
return new com.giantrabbit.nagare.INagareService.Stub.Proxy(obj);
} 
public android.os.IBinder asBinder()
{ 
return this;
} 
public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{ 
switch (code)
{ 
case INTERFACE_TRANSACTION:
6
CodeRank
This code example shows how to use the following methods:queryLocalInterface
public static com.android.vending.licensing.ILicensingService asInterface(android.os.IBinder obj)
{ 
if ((obj==null)) {
return null; 
} 
android.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);
if (((iin!=null)&&(iin instanceof com.android.vending.licensing.ILicensingService))) {
return ((com.android.vending.licensing.ILicensingService)iin);
} 
return new com.android.vending.licensing.ILicensingService.Stub.Proxy(obj);
} 
public android.os.IBinder asBinder()
{ 
return this;
} 
public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{ 
switch (code)
{ 
case INTERFACE_TRANSACTION:
6
CodeRank
This code example shows how to use the following methods:transact
		try { 
			//Send a random number to the service 
			android.os.Parcel data = android.os.Parcel.obtain(); 
			data.writeInt(mRandom.nextInt());
			android.os.Parcel reply = android.os.Parcel.obtain(); 
			service.transact(1, android.os.Parcel.obtain(), reply, 0);
			if (data.readInt() == reply.readInt()) //Check if the service returns us this number
			{ 
				final String _openUDID = reply.readString();
				if (_openUDID != null) { //if valid OpenUDID, save it
					if (LOG) Log.d(TAG, "Received " + _openUDID);
 
					if (mReceivedOpenUDIDs.containsKey(_openUDID)) mReceivedOpenUDIDs.put(_openUDID, mReceivedOpenUDIDs.get(_openUDID) + 1);
					else mReceivedOpenUDIDs.put(_openUDID, 1);
						 
				} 
			} 
		} catch (RemoteException e) {if (LOG) Log.e(TAG, "RemoteException: " + e.getMessage());}		    	    			
		mContext.unbindService(this);
		 
6
CodeRank
This code example shows how to use the following methods:queryLocalInterface
public static com.android.vending.licensing.ILicenseResultListener asInterface(android.os.IBinder obj)
{ 
if ((obj==null)) {
return null; 
} 
android.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);
if (((iin!=null)&&(iin instanceof com.android.vending.licensing.ILicenseResultListener))) {
return ((com.android.vending.licensing.ILicenseResultListener)iin);
} 
return new com.android.vending.licensing.ILicenseResultListener.Stub.Proxy(obj);
} 
public android.os.IBinder asBinder()
{ 
return this;
} 
public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{ 
switch (code)
{ 
case INTERFACE_TRANSACTION:
6
CodeRank
This code example shows how to use the following methods:queryLocalInterface
		public static com.ratalaika.spiller.plugin.google.licensing.ILicensingService asInterface( 
				android.os.IBinder obj) {
			if ((obj == null)) {
				return null; 
			} 
			android.os.IInterface iin = (android.os.IInterface) obj
					.queryLocalInterface(DESCRIPTOR);
			if (((iin != null) && (iin instanceof com.ratalaika.spiller.plugin.google.licensing.ILicensingService))) {
				return ((com.ratalaika.spiller.plugin.google.licensing.ILicensingService) iin);
			} 
			return new com.ratalaika.spiller.plugin.google.licensing.ILicensingService.Stub.Proxy( 
					obj);
		} 
 
		public android.os.IBinder asBinder() {
			return this;
		} 
 
		public boolean onTransact(int code, android.os.Parcel data,
				android.os.Parcel reply, int flags)
5
CodeRank
This code example shows how to use the following methods:transact
This code example shows how to use the following methods:queryLocalInterface
public static uk.co.md87.android.contextanalyser.rpc.ContextAnalyserBinder asInterface(android.os.IBinder obj)
{ 
if ((obj==null)) {
return null; 
} 
android.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);
if (((iin!=null)&&(iin instanceof uk.co.md87.android.contextanalyser.rpc.ContextAnalyserBinder))) {
return ((uk.co.md87.android.contextanalyser.rpc.ContextAnalyserBinder)iin);
} 
return new uk.co.md87.android.contextanalyser.rpc.ContextAnalyserBinder.Stub.Proxy(obj);
} 
public android.os.IBinder asBinder()
{ 
return this;
} 
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{ 
switch (code)
{ 
case INTERFACE_TRANSACTION:
5
CodeRank
This code example shows how to use the following methods:queryLocalInterface
public static org.andnav.osm.services.IOpenStreetMapTileProviderService asInterface(android.os.IBinder obj)
{ 
if ((obj==null)) {
return null; 
} 
android.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);
if (((iin!=null)&&(iin instanceof org.andnav.osm.services.IOpenStreetMapTileProviderService))) {
return ((org.andnav.osm.services.IOpenStreetMapTileProviderService)iin);
} 
return new org.andnav.osm.services.IOpenStreetMapTileProviderService.Stub.Proxy(obj);
} 
public android.os.IBinder asBinder()
{ 
return this;
} 
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{ 
switch (code)
{ 
case INTERFACE_TRANSACTION:
5
CodeRank
This code example shows how to use the following methods:queryLocalInterface
public static com.beust.android.translate.ITranslate asInterface(android.os.IBinder obj)
{ 
if ((obj==null)) {
return null; 
} 
com.beust.android.translate.ITranslate in = (com.beust.android.translate.ITranslate)obj.queryLocalInterface(DESCRIPTOR);
if ((in!=null)) {
return in;
} 
return new com.beust.android.translate.ITranslate.Stub.Proxy(obj);
} 
public android.os.IBinder asBinder()
{ 
return this;
} 
public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{ 
switch (code)
{ 
case INTERFACE_TRANSACTION:
5
CodeRank
This code example shows how to use the following methods:queryLocalInterface
public static org.andnav.osm.services.IOpenStreetMapTileProviderCallback asInterface(android.os.IBinder obj)
{ 
if ((obj==null)) {
return null; 
} 
android.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);
if (((iin!=null)&&(iin instanceof org.andnav.osm.services.IOpenStreetMapTileProviderCallback))) {
return ((org.andnav.osm.services.IOpenStreetMapTileProviderCallback)iin);
} 
return new org.andnav.osm.services.IOpenStreetMapTileProviderCallback.Stub.Proxy(obj);
} 
public android.os.IBinder asBinder()
{ 
return this;
} 
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{ 
switch (code)
{ 
case INTERFACE_TRANSACTION:
5
CodeRank

Related Android IBinder Questions & Answers:

Other Android IBinder Examples

74:	
75:		@Override
76:		public IBinder onBind(Intent arg0) {
77:			return null;
78:		}

Read More

199:	
200:		@Override
201:		public IBinder onBind(Intent arg0) {
202:			return null;
203:		}

Read More

195:	
196:		@Override
197:		public IBinder onBind(Intent arg0) {
198:			return null;
199:		}

Read More

See Code Examples for Android IBinder Methods: