Code Monkey home page Code Monkey logo

flash-for-mobile's Introduction

admob for flash android
this lib enable you to add admob ad to your flash air application
to add native advertisement to your actionscript3 application you just need to do four step

1.replace  D:\Program Files\Adobe\Adobe Flash Builder 4.6\sdks\4.6.1\lib\android\lib\resources\android-res.jar   with android-res.jar

2. add this config to -app.xml
<android>
        <manifestAdditions><![CDATA[
			<manifest android:installLocation="auto">
				<uses-sdk android:targetSdkVersion="11"/>
				<uses-sdk android:minSdkVersion="8"/>
			    	<uses-permission android:name="android.permission.INTERNET"/>
			    	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
			   	 <application>
			   		<!--  <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation"/> -->
			  		 <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> 
				</application>
			</manifest>
			
		]]></manifestAdditions>
    </android>

3.add this config to -app.xml
    <extensions>
    	<extensionID>so.cuo.ane.Admob</extensionID>
    </extensions>
4. add  code to your android air application like follow
		test1();
		private function test1():void
		{
			var admob:Admob=Admob.getInstance();
			if(admob.isSupported){
				admob.setUnitId(gid);
				admob.dispatcher.addEventListener(AdEvent.onReceiveAd,this.adHandler);
				admob.dispatcher.addEventListener(AdEvent.onFailedToReceiveAd,this.adHandler);
//				admob.showRelation(AdMobAlignment.ALIGN_BOTTOM,AdType.BANNER);
				admob.show(50,100,AdType.BANNER);
			}else{
				trace("not support");
			}
		}

		protected function adHandler(event:AdEvent):void
		{
			trace("receive ad");
		}

flash-for-mobile's People

flash-for-mobile's Issues

VerifyError: Error #1014: Class so.cuo.anes.admob::Admob could not be found.

What steps will reproduce the problem?
1. Simply import the admob_demo, use AIR 3.7
2. Error appears when compile and run
3.

What is the expected output? What do you see instead?
It is expected to run smoothly, but the error message appears (as in summary)


What version of the product are you using? On what operating system?
- AIR 3.7. 
- Adobe Flash Builder

Please provide any additional information below.
- var admob:Admob = Admob.getInstance();

Original issue reported on code.google.com by [email protected] on 6 Jul 2013 at 1:55

Duplicate platform iPhone-ARM found

What steps will reproduce the problem?
1. Add ane file to project
2. Try to compile.

What is the expected output? What do you see instead?
"The content cannot be loaded because there was a problem loading an extension: 
Error: Duplicate platform iPhone-ARM found for extension so.cuo.ane.Admob"

What version of the product are you using? On what operating system?
Flash CC + AIR 3.8 + last version of admob_ios.ane.

Please provide any additional information below.
If the ane file is added to the project the aplication doesn't compile.
No code is added, just the ane.


Original issue reported on code.google.com by [email protected] on 7 Oct 2013 at 10:44

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.