android - In-App Billing RESTORE_TRANSACTION give DEVELOPER_ERROR -
i'm implementing in-app billing in app. implemented request_purchase, confirm_notification , check_billing, , works fine.
now i'm trying implement request_transactions method, have problem, once sent request sendbillingrequest, receive response_code response result_developer_error (5).
this how make request:
log.d(tag, "action equals restore_transactions"); bundle request = makerequestbundle("restore_transactions"); request.putlong("nonce", billingsecurity.newnonce()); try { bundle response = mservice.sendbillingrequest(request); int response_code = response.getint("response_code", -1); log.d(tag, "response restore: " + response_code); restored=true; } catch (remoteexception e) { e.printstacktrace(); } i read on other questions, restore_transactions need launched when debug mode disabled. disabled manifest (i cleared field, because if put false logcat didn't show debug print), android manifest:
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="resistorcalc.main" android:versionname="3.0" android:versioncode="9"> <uses-sdk android:minsdkversion="8"></uses-sdk> <uses-permission android:name="com.android.vending.billing" /> <application android:label="@string/app_name" android:name=".app" android:icon="@drawable/resistoricon"> <activity android:name=".launchactivity" android:label="@string/app_name" android:screenorientation="portrait" android:cleartaskonlaunch="true" android:finishontasklaunch="true"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:launchmode="standard" android:label="@string/app_name" android:name="supportusactivity" android:finishontasklaunch="true" android:cleartaskonlaunch="true" android:screenorientation="portrait"></activity> <activity android:launchmode="standard" android:label="@string/app_name" android:name="ohmlawactivity" android:finishontasklaunch="true" android:cleartaskonlaunch="true" android:screenorientation="portrait"></activity> <activity android:launchmode="standard" android:label="@string/app_name" android:name="resistorsumactivity" android:finishontasklaunch="true" android:cleartaskonlaunch="true" android:screenorientation="portrait"></activity> <activity android:name="com.google.ads.adactivity" android:configchanges="keyboard|keyboardhidden|orientation" android:cleartaskonlaunch="true" android:finishontasklaunch="true"/> <service android:name=".billing.billingservice" /> <receiver android:name=".billing.billingreceiver"> <intent-filter> <action android:name="com.android.vending.billing.in_app_notify" /> <action android:name="com.android.vending.billing.response_code" /> <action android:name="com.android.vending.billing.purchase_state_changed" /> </intent-filter> </receiver> </application> <uses-permission android:name="android.permission.internet"/> <uses-permission android:name="android.permission.access_network_state"/> now questions are:
- i need put false on debuggable flag on manifest? or need run application.
- why logcat doesn't show log.* message if debuggable se false? normal behaviour (i'm using logcat inside eclipse)
- if use static requests android.test.purchased, can retrieved using restore_transactions?
- do need upload draft on market in order have method working?
thanks, ivan
the debug flag in manifest has nothing this. need sign app release key , upload draft play store. might have wait hour or activated too. , no, restore_transactions not work test items, need use own published item. of described in reference, shouldn't have problems if follow it.
Comments
Post a Comment