Ich habe in App-Kauf in meiner App implementiert Ich habe "TrivialDrive" Beispiel für Version 3 der In-App-Abrechnung verwendet, ich habe App mit statischen Antworten getestet funktioniert alles wie erwartet.Android In-App-Kauf Absturz nach Zahlung
Aber wenn ich App-Markt, Anwendung abstürzt auf erfolgreichen Kauf herunterladen,
Mein Code ist von erfolgreichem Kauf
IabHelper.OnIabPurchaseFinishedListener mPurchaseFinishedListener = new IabHelper.OnIabPurchaseFinishedListener() {
public void onIabPurchaseFinished(IabResult result, Purchase purchase) {
Log.d(TAG, "Purchase finished: " + result + ", purchase: " + purchase);
if (result.isFailure()) {
complain("Error purchasing: " + result);
}
if (purchase != null) {
if (purchase.getSku().equals(Constants.IN_APP_PURCHASE_PRODUCT_ID)) {
// bought the premium upgrade!
String message = getResources().getString(R.string.app_purchase_successful_msg);
mIsPremium = true;
updateUi(mIsPremium);
successAlert(message);
}
}
}
};
Ich habe Meldung über die erfolgreichen Kauf der Einrichtung, aber ich kann diese Meldung sehen, (bedeutet, dass llinse nicht ausgeführt wird), wenn ich erfolgreich von ihm gekauft habe, stürzt Anwendung nach erfolgreicher Zahlung ab.
Wenn Relaunch App und versuchen, Artikel zu kaufen, sagt es bereits gekauft.
Ich habe einen Absturzbericht von der Entwicklerkonsole erhalten.
02-09 02:01:13.181: E/AndroidRuntime(11530): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=10001, result=-1, data=Intent { (has extras) }} to activity {com.eknathkadam.grammaruplite/com.webrich.base.ui.GoogleInAppPurchaseActivity}: java.lang.NullPointerException
02-09 02:01:13.181: E/AndroidRuntime(11530): at android.app.ActivityThread.deliverResults(ActivityThread.java:3141)
02-09 02:01:13.181: E/AndroidRuntime(11530): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3184)
02-09 02:01:13.181: E/AndroidRuntime(11530): at android.app.ActivityThread.access$1100(ActivityThread.java:130)
02-09 02:01:13.181: E/AndroidRuntime(11530): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1243)
02-09 02:01:13.181: E/AndroidRuntime(11530): at android.os.Handler.dispatchMessage(Handler.java:99)
02-09 02:01:13.181: E/AndroidRuntime(11530): at android.os.Looper.loop(Looper.java:137)
02-09 02:01:13.181: E/AndroidRuntime(11530): at android.app.ActivityThread.main(ActivityThread.java:4745)
02-09 02:01:13.181: E/AndroidRuntime(11530): at java.lang.reflect.Method.invokeNative(Native Method)
02-09 02:01:13.181: E/AndroidRuntime(11530): at java.lang.reflect.Method.invoke(Method.java:511)
02-09 02:01:13.181: E/AndroidRuntime(11530): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
02-09 02:01:13.181: E/AndroidRuntime(11530): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
02-09 02:01:13.181: E/AndroidRuntime(11530): at dalvik.system.NativeStart.main(Native Method)
**02-09 02:01:13.181: E/AndroidRuntime(11530): Caused by: java.lang.NullPointerException
02-09 02:01:13.181: E/AndroidRuntime(11530): at com.google.billing.Base64.decode(Base64.java:434)**
02-09 02:01:13.181: E/AndroidRuntime(11530): at com.google.billing.Security.generatePublicKey(Security.java:87)
02-09 02:01:13.181: E/AndroidRuntime(11530): at com.google.billing.Security.verifyPurchase(Security.java:66)
02-09 02:01:13.181: E/AndroidRuntime(11530): at com.google.billing.IabHelper.handleActivityResult(IabHelper.java:437)
02-09 02:01:13.181: E/AndroidRuntime(11530): at com.webrich.base.ui.GoogleInAppPurchaseActivity.onActivityResult(GoogleInAppPurchaseActivity.java:238)
02-09 02:01:13.181: E/AndroidRuntime(11530): at android.app.Activity.dispatchActivityResult(Activity.java:5192)
02-09 02:01:13.181: E/AndroidRuntime(11530): at android.app.ActivityThread.deliverResults(ActivityThread.java:3137)
02-09 02:01:13.181: E/AndroidRuntime(11530): ... 11 more
02-09 02:02:20.610: E/JavaBinder(250): !!! FAILED BINDER TRANSACTION !!!
02-09 02:02:20.638: E/MountService(250): Listener dead
02-09 02:02:20.638: E/MountService(250): Listener dead
02-09 02:02:22.028: E/InputDispatcher(250): channel '41f313f0 com.android.vending/com.android.vending.AssetBrowserActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
02-09 02:03:59.884: E/PowerManagerService(250): Excessive delay setting brightness: 198ms, mask=2
Sein werfen Null Pointer Ausnahmen in onActivityResult() -Methode auf dieser Zeile wie diese
if (!mHelper.handleActivityResult(requestCode, resultCode, data))
Methode
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.d(TAG, "onActivityResult(" + requestCode + "," + resultCode + "," + data);
// Pass on the activity result to the helper for handling
if (!mHelper.handleActivityResult(requestCode, resultCode, data)) {
// not handled, so handle it ourselves (here's where you'd
// perform any handling of activity results not related to in-app
// billing...
super.onActivityResult(requestCode, resultCode, data);
} else {
Log.d(TAG, "onActivityResult handled by IABUtil.");
}
}
ist es funktioniert völlig in Ordnung, auf statische Reaktion aber stürzt auf, wenn ich Kauf vom Markt.
Ich habe das gleiche Problem seit gestern. Ich hoffe, ich werde hier eine Lösung erhalten. –
Ich habe auch dieses Problem seit gestern, weiß nicht warum – Goofy
@MehulJoisar Wann haben Sie Ihre App hochgeladen? – Goofy