Unity Access Mobile mm (3.1.10)

Source: Internet
Author: User
After four days, finally moved the MM connected to the heart and refreshed. Write an article to record the process now.

There are many articles on the internet about unity access moving mm, there are basically two kinds of access methods:

Create a new Android project, connect to the mobile mm SDK in your project, export your project as a jar package with Eclipse, import it into unity as a plugin, invoke the Android code in unity, and then export the Android package with unity. You may think that the export of the Android package is successful, but the following is the place to spit slot.
The exported package needs to be recompiled, re-packaged, and re-signed with the androidmultitool tool. Because I am not going to talk about this way, so I will not say more, we can refer to the following link http://www.07net01.com/2015/04/835496.html

I have a problem here that has not been solved , I use Unity to play an empty apk (only an empty scene), with Androidmultitool to build the file, but the progress bar is always going to be re-packaged with Androidmultitool, But after 20 minutes there were no errors or correct hints. I know that unity-derived apk is not compiled with Androidmultitool, can compile or know the reason of the please enlighten. Thank.

This is what I am using now, first create an empty Unity project, an empty scene, a scene with a GUI to draw a button, when the button is clicked to call the Android code, and then call the mobile mm payment. Unity is structured as follows:

Remember to attach the above two files to the Maincamera. Then choose Android Platform to publish Android project. Remember to add the scene before publishing and set your own bundle Identifier.

If everything works, you'll get one of the following Android projects

Then you open it with Eclipse, and the next thing you do is just like the SDK that you normally pick up with Android.
First, copy the so file and the jar bundle under the libs of the mobile mm to the Android project you exported with unity.
Next, modify the Androidmanifest file to add permissions.
Finally, according to the mobile mm to write the corresponding code of the demo is OK.
Here's a place to note that after the Android project is exported with unity, there is no Armeabi folder under the Libs of the project, and we need to create one manually and copy the so file in. The directory under Libs is as follows:

OK, then you can use Eclipse to connect to the real machine for debugging.

Here are the examples I wrote, Unity version 5.3.4, mobile mm version is 3.1.10

Http://pan.baidu.com/s/1hrZekyo Password: g24o

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.