Original address: http://blog.csdn.net/dingxiaowei2013/article/details/26842177
- First, run the routines.
- Download the routine (csdn points not enough to upload, can only use Baidu Network disk): Http://pan.baidu.com/s/1gd7PrxD
- Open Unity Engineering Mm_pay_unity
- Build APK package to project directory \assets\plugin_pay_mm\tools\androidmultitool\program_files\app_temp.apk (note APK package name)
- Run Pack.bat under the \assets\plugin_pay_mm\tools\androidmultitool\program_files\ directory
- Get the final package app_signed.apk
- Embed in a project
- Copy all the contents of the plugins and Streamingassets directories in the routines (mm_pay_unity) to the project
- Modify the Pack ID (com.easygame.paymmSample) in Assets\plugins\androidmanifest.xml for your project.
(Total three places)
- Opening a routine with Eclipse (Mm_pay_eclipse)
- Rename the package to your project's pack ID
- Modify the Appid,appkey,lease_paycode in the paywrapper_mm file
- Export the jar package (also check customunityplayeractivity,paywrapper_mm) to the Unity directory
- Build by routine, then execute pack.bat to
- Precautions
- Pack identification is important and must be unified everywhere.
1) in Unity, the playersetting
2) Unity project in Assets\plugins\androidmanifest.xml (three places, mentioned earlier)
3) When referencing Java classes
4) package name in Eclipse Project
- The Gameobject name used Sample_pay_mm.cs in unity must be paywrapper_mm_handler, so MM-SDK can
callback handler_paysucceed,handler_payfailed function.
- MM-SDK dynamic link library files must be put into armeabi-v7a (such as put Armeabi error, the official has confirmed 2.3 of the bug, pay attention to see)
- The number of game resources can not exceed a certain number, the technical group is said to be about 800 (and size unrelated, 2.3 known bugs).
- This article is intended to be shared, without any malicious code or program, please rest assured.
http://blog.csdn.net/lihandsome/article/details/11919113