Android developers want to make money overseas, access to Google Play is the right choice, but a bunch of English documents for English like me four-level wood has been the most distressed. The entire process of unity's access to Google Play has been studied in recent times due to work needs. Special record down the experience and communicate with you.
Google officially provided the Android native IAB documentation, but it was a test for my low-English proficiency, but he was free and would rather study this than the Prime31 IAB plugin I Used (70 knives). Blogspot This article details how to use native Google Play in-app-billing to complete the in-built functionality in unity, http://phardera.blogspot.com/2013/03/ Unity-3d-google-play-in-app-billing-iab.html (need to turn over the wall). PS: According to this great God's method I did not succeed, because will not Java, also do not know what is wrong, ask the great God guidance.
1. Download Prime31 Google Play in-app-billing Plugin (http://download.csdn.net/detail/geniusdhc/6043227)
2. The import package is automatically added to the appropriate folder.
3. After the import will have the following several files, the red box files can be deleted do not.
4. Open Unitymanifest and add the following statement to the Application tab: <service android:name= "Com.prime31.billing.BillingService" ></ Service>, the aim is to start the billingservice of Prime31. After saving, rename the file to Androidmanifest so that the Android system is fully aware of the app to be published. (This is something that Android should understand more than I do). That would be the end of the preparatory work. The next step is to write the code.
Since this is a company project, the code is not easy to post, and Prime31 do a very comprehensive, almost no need to write how much code, directly call on it. I'll tell you about something special to note:
- PublicKey is the service and API provided by Google in developer console, which can be copied (be sure to note that there are no spaces).
- Be sure to note the ID (string), the product ID and the ID set in Developer console must be consistent. The product list management of Google play is a CSV file that can be identified by individuals who think it is better to read file information.
- If you want to do a test, you need to find a publishing country's Google account (generally Google Play is published overseas bar).
- Note KeyStore fill in, be sure to remember the password, in the update version will be required. In this link may encounter can not install the problem, the workaround: http://blog.csdn.net/sy_bz/article/details/7204569.
Data Link: 1.http://phardera.blogspot.com/2013/03/unity-3d-google-play-in-app-billing-iab.html
2.http://download.csdn.net/detail/geniusdhc/6043227
3.http://blog.csdn.net/sy_bz/article/details/7204569