Well I've made some progress. The below function replaces my existing one:
public Bundle SendBillingRequest(Bundle bundle)
{
Parcel _data = Parcel.Obtain();
Parcel reply = Parcel.Obtain();
bool bRes = false;
try
{
_data.WriteInterfaceToken(DESCRIPTOR);
_data.WriteBundle(bundle);
bRes =
mRemote.Transact(BillingServiceStub.TRANSACTION_checkBilling, _data, reply,
TransactionFlags.None);
reply.ReadException();
var replyBundle = reply.ReadBundle();
return replyBundle;
}
catch (Java.Lang.IllegalArgumentException e)
{
}
finally
{
_data.Recycle();
reply.Recycle();
}
}
My reply bundle is no longer null, but instead it contains an
IllegalArgumentException. The details are:
{Java.Lang.IllegalArgumentException: Exception of type
'Java.Lang.IllegalArgumentException' was thrown.
at Android.Runtime.JNIEnv.CallVoidMethod (IntPtr jobject, IntPtr jmethod)
[0x00000] in <filename unknown>:0
at Android.OS.Parcel.ReadException () [0x00000] in <filename unknown>:0
at com.android.vending.billing.BillingServiceStub+Proxy.SendBillingRequest
(Android.OS.Bundle bundle) [0x00053] in
C:\Projects\Billing\IMarketBillingService.cs:117
--- End of managed exception stack trace ---
java.lang.IllegalArgumentException
at android.os.Parcel.readException(Parcel.java:1331)
at android.os.Parcel.readException(Parcel.java:1281)
at billing.BillingService.n_onServiceConnected(Native Method)
at billing.BillingService.onServiceConnected(BillingService.java:48)
at
android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1068)
at
android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1085)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4507)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
}
The logging has:
08-28 07:24:10.055 E/Bundle ( 3648): readBundle: bad magic number
08-28 07:24:10.055 E/Bundle ( 3648): readBundle: trace =
java.lang.RuntimeException
08-28 07:24:10.055 E/Bundle ( 3648): at
android.os.Bundle.readFromParcelInner(Bundle.java:1643)
08-28 07:24:10.055 E/Bundle ( 3648): at
android.os.Bundle.<init>(Bundle.java:83)
08-28 07:24:10.055 E/Bundle ( 3648): at
android.os.Parcel.readBundle(Parcel.java:1464)
08-28 07:24:10.055 E/Bundle ( 3648): at
android.os.Parcel.readBundle(Parcel.java:1449)
08-28 07:24:10.055 E/Bundle ( 3648): at
android.os.Bundle$1.createFromParcel(Bundle.java:1575)
08-28 07:24:10.055 E/Bundle ( 3648): at
android.os.Bundle$1.createFromParcel(Bundle.java:1573)
08-28 07:24:10.055 E/Bundle ( 3648): at
com.android.vending.billing.IMarketBillingService$Stub.onTransact(IMarketBillingService.java:50)
08-28 07:24:10.055 E/Bundle ( 3648): at
android.os.Binder.execTransact(Binder.java:338)
08-28 07:24:10.055 E/Bundle ( 3648): at
dalvik.system.NativeStart.run(Native Method)
Back to more research.....
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Binding-Services-casting-interface-on-service-connection-fails-tp5711549p5711572.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