Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

ads in either iOS or Android

New Here ,
Apr 22, 2011 Apr 22, 2011

Are there examples of any AIR apps in the market or app store that display ads of any kind?

There needs to be a (simple) way to display iAds, Adwords or similar in these apps.

TOPICS
Development
2.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 22, 2011 Apr 22, 2011

I don't know of any usable solution at this time. However, there looks like there maybe an announcement at GoogleIO about this. This question has been raised within various public and private forums, so I know Adobe is aware of the need for a solution. But part of the problem is it relies on third companies to provide mobile/touch friendly ads.

Chris

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 26, 2011 Apr 26, 2011

I don't know about examples but I know many people that are already doing this. The answer is actually very simple.

1) go signup with admob

2) create an html page somewhere that can host the ad (preferably on a server you can control somewhere)

3) include a StageWebView component and call your html page into your app

4) profit.

This works perfectly and you'll be getting ad revenue very soon.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 27, 2011 Apr 27, 2011

Hi flashrelif

Here is code and example of an actual ad working on the air for android platform. Enjoy.

http://pixelpaton.com/?p=3313

regards Mike

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 02, 2011 May 02, 2011

here is the same technique descibed by adobe

Displaying HTML content in mobile apps

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 13, 2011 May 13, 2011

You will probably not get iAds in an Air for iOS app.  You would need to install the iOS code from Apple into your Air app.

cheers-

Dustin

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 22, 2011 Aug 22, 2011

After a lot of trouble (account canned on ADMOB ) and research, I have gotten Ads to work in all my Android Apps. This will work on a lot of AD networks, but most will ban you click fraud. Only one network allows this method and they provide support for it too.

I have over 100 games apps. with this method implemented and working. Here is a link to one of them for you to see how it will look in game. I am using multiple ads in this to force the user to click and make me some money: https://market.android.com/details?id=air.GraffitiCityMarketFree&feature=search_result

Does LeadBolt offer HTML integration for banner ads?

LeadBolt does allow banner ads to be integrated into your app using HTML, rather than using our SDK. To create a HTML banner ad after adding an app to the LeadBolt portal, simply click “Add Ad” and select “App Banner (HTML)” from the drop down box. The HTML snippet can then be added directly into your app’s HTML framework.

So far my eCPM is $6.15

I have created this guide to show my appreciation:

Publisher Code:

STEP I:

Get an Account: http://leadboltapps.com/web/publishers/signup.php?ref=10022842

STEP II:

Click on the “APPS” tab and “Create New APP” to create an AD. Remember to change content unlocker to HTML Banner. While in the process.

STEP III:

Get the HTML AD Code and keep it safe. That is all we need from the site. How simple was that?

AD HTML FILE:

Create an HTML File and Load it to your site. Remember to replace your HTML Code from above step with where I have put: ****ENTER HTML AD CODE HERE****

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>

<title>Untitled Document</title>

<style type="text/css">

body,td,th {

     color: #FFF;

}

body {

     background-color: #000;

     margin-left: 0px;

     margin-top: 0px;

     margin-right: 0px;

     margin-bottom: 0px;

     text-align: center;

     position: relative;

}

</style>

</head>

<body>

****ENTER HTML AD CODE HERE****

</body>

</html>

Action Script Code:

STEP I:

Credit: I found this on another site and would like to give credit to the author of pixelpaton.com

The only change you need to make is to enter your website html url where you have placed the AD HTML FILE in the space where I have put : "****ENTER COMPLETE HTML URL HERE****". Where ever you want the AD, place the following code:

// imports

import flash.events.Event;

import flash.events.LocationChangeEvent;

import flash.geom.Rectangle;

import flash.media.StageWebView;

import flash.net.navigateToURL;

import flash.net.URLRequest;

import flash.events.MouseEvent;

// setup variables

var _stageWebView:StageWebView;

var myAdvertURL:String = "****ENTER COMPLETE HTML URL HERE****";

//

                {

                // check that _stageWebView doersn't exist

                if (! _stageWebView) {

                                _stageWebView = new StageWebView () ;

                                // set the size of the html 'window'

                                _stageWebView.viewPort = new Rectangle(0,0, 800, 100);

                                // add a listener for when the content of the StageWebView changes

                                _stageWebView.addEventListener(LocationChangeEvent.LOCATION_CHANGE,onLocationChange);

                                // start loading the URL;

                                _stageWebView.loadURL(myAdvertURL);

                }

                // show the ad by setting it's stage property;

                _stageWebView.stage = stage;

}

function toggleAd(event:MouseEvent):void {

                trace("toggling advert",_stageWebView);

                // check that StageWebView instance exists

                if (_stageWebView) {

                                trace("_stageWebView.stage:"+_stageWebView.stage);

                                if (_stageWebView.stage == null) {

                                                //show the ad by setting the stage parameter

                                                _stageWebView.stage = stage;

                                } else {

                                                // hide the ad by nulling the stage parameter

                                                _stageWebView.stage = null;

                                }

                } else {

                                // ad StageWebView doesn't exist - show create it

               

                }

}

function destroyAd(event:MouseEvent):void {

                // check that the instace of StageWebView exists

                if (_stageWebView) {

                                trace("removing advert");

                                // destroys the ad

                                _stageWebView.stage = null;

                                _stageWebView = null;

                }

}

function onLocationChange(event:LocationChangeEvent):void {

                // check that it's not our ad URL loading

                if (_stageWebView.location != myAdvertURL) {

                                // destroy the ad as the user has kindly clicked on my ad

                                destroyAd(null);

                                // Launch a normal browser window with the captured  URL;

                                navigateToURL( new URLRequest( event.location ) );

                }

}

// setup button listeners

Hope this works and helps you. If you have questions, let me know. Enjoy.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 04, 2011 Nov 04, 2011
LATEST

I have written a sample for iAd native extension. You can give it a try its shared at http://code.google.com/p/iad-air-ios/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines