Thanks to that Java file my C# function now works perfectly. Thanks for
that!! As such I don't need to plug in the jar file. I can't believe I had
to do a _data.WriteInt(1) to make it work.
public Bundle SendBillingRequest(Bundle bundle)
{
Parcel _data = Parcel.Obtain();
Parcel reply = Parcel.Obtain();
Bundle replyBundle = null;
bool bRes = false;
try
{
_data.WriteInterfaceToken(DESCRIPTOR);
if (bundle!=null)
{
_data.WriteInt(1);
bundle.WriteToParcel(_data,
ParcelableWriteFlags.None);
}
else
_data.WriteInt(0);
bRes =
mRemote.Transact(BillingServiceStub.TRANSACTION_checkBilling, _data, reply,
TransactionFlags.None);
reply.ReadException();
if (reply.ReadInt() != 0)
replyBundle =
Android.OS.Bundle.Creator.CreateFromParcel(reply) as Bundle;
return replyBundle;
}
catch (RemoteException e)
{
var aaa = e.Message;
throw;
}
catch (Java.Lang.IllegalArgumentException e)
{
var aaa = e.Message;
throw;
}
finally
{
_data.Recycle();
reply.Recycle();
}
}
My purchaseObserver is now going nuts with all the hits and is working well.
Can do purchases but I have to iron out some JSON bugs. Too tired to do it
now.
Thanks again. I'm hoping it will be finished soon.
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Binding-Services-casting-interface-on-service-connection-fails-tp5711549p5711657.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid