I am trying to test in-app-billing application(i use in app billing version 2). For that i follow guide as per link http://developer.android.com/google/play/billing/billing_testing.html .
i upload my signed apk to google market as draft, publish item. But when i am going to test in app billing it gives me error "An error occurred. please try again".
I am testing it on Sony experia U with Android 2.3.7 and my google play store version 3.4.7
please suggest me.......
Thanks..
Check are u added the internet permission in AndroidManifest.xml file.
You must add internet and billing permission in androidmanifest.xml file.
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.BROADCAST_STICKY" /> <uses-permission android:name="com.android.vending.BILLING" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" />
and add below billing service after activity close
<service android:name=".BillingService" />
<receiver android:name=".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>
And must keep public key in security.java class
String base64EncodedPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA09UpyecYDEoQTTp+MCZmJGuRtphynUhGzRvl/jiCPRbdfzrt649RB5j8OmADlkB2pu3TiN/wxKoqol0Gadw7W+BhkTgptog2ZkRrFqnVq+DJSbL1cXbQAc549VmSTEhMSRA0FkpiEg/eqBjyDKiFsMHlmO21WwYyXGvNj5b4qt6OUrbYZYUuO0RHbOJeaJEfoYWuGpxHHUVf0jmQG/+UWOkfNzesRmzAwlz2fPIxchE8k0kSV7dHWP4XaIt7f0tMzny3GsXTBJEJpqXydoCjRWJeOUZX9BjK6U/yPCoTikxA3V7NaSCZ0ofZMJeXsuxhy1TEmW88q6ayhOx/wEKDBwIDAQAB";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.