http://hunterwang.diandian.com/post/2012-11-23/40042217286
Recently has been struggling with unity for Android app to add ads, with Unity3d do Android I still the first time, after several twists and ends finally fix, share the general flow of advertising, for your reference.
First step: Create an Android app with Eclipse. In the Androidmanifest.xml file, add the following permissions, the permissions function is not much to say. The ad's SDK description should be clear.
Then add ads to the label, like this also in the Advertising SDK has explained
Then the Androidmanifest.xml file has been completed.
Step two: The Import SDK is first imported to the SDK that provides you with an advertising platform, followed by the SDK to import the advertisers you have loaded. The third is to join the Unity Android class file package in the Unity installation file to find Date->playbackengines->androidplayer->bin->class.jar The file is imported into your eclipse inside the bin of the Android app and, build path.
Step three: How to add ads dynamically. Write the following code under the Jara file that you applied to the SRC folder
This is where the Android code has been written.
Fourth step: Build your current Eclipse project. All the files in the code are in the Bin folder. You can export the current project directly to a jar file. Then remove all files in the jar file except COM unexpectedly and then go to name your jar file as COM. Name of the project. I believe that the people who build the game with unity are not strangers. Our Bundleid is named this way.
Fifth Step: We open the original project of our Android unity. Then create a new Android folder in plugins (which is the folder where we often put the plugins) file. Then put a total of four items (files and folders) under the Android folder. The first one is our Androidmanifest.xml file. The second puts the entire folder of RES in your app just in Eclipse. The third new Libs folder contains the SDK package that was originally imported. The fourth one is to create a new bin folder. Inside, put the new fourth step jar file in. The following pattern.
That's it. You can build into an apk and try the effect. Very cumbersome I mainly refer to a few two blog blog, this is the Momo of the Rain Pine Blog:
http://www.xuanyusong.com/archives/667;
There is also a blog shared by a friend:
http://blog.csdn.net/dlnuchunge/article/details/7926603
And there are a lot of friends around to help. I'm finally getting it done, thank you.
Unity 3D process for adding ads to APK packages