Rate ANE

Many developers want their application to become popular.

But how to achieve this?

What is more important – satisfied customers, many downloads, good product or something else.
To be your app a best selling product it should have many good sides, one of them is good rating. For a user it’s hard to identify which app is cool if there is no feedback, namely there is no one who has rated for the app. The rating gives some feedback about the app to the user. This gains the users trust in the product. Using the new iOS rate ANE you can catch the user’s feedback about your app. But be careful, this is a tricky part.
Have in mind that if you ask the user, when he is in a good mood, then he probably will give you more stars. Which will reflect positively to your sales. But if the user is in a bad mood he will give you less stars (probably one). This will have a negative impact on your app in future.

Be careful in which moment you show the “rate” pop up window. Think about this and try several options. Observe the results.

Here is the code which you should use.

 action-script-3 |  copy code |? 
01
02
private var _rate:RateANE;
03
{
04
...
05
 //rate component
06
 _rate = new RateANE();
07
 //set the id of the app, which should be the same as in the app store
08
 _rate.setApplicationId("com.lancelotmobile.ane.rateane");
09
 _rate.setApplicationName("RateANEDemo");
10
 
11
 _rate.setRateButtonLabel("Rate!!!");
12
 _rate.setRemindButtonLabel("Later :?");
13
 _rate.setCancelButtonLabel("NO, no, no!");
14
 
15
 _rate.setTitleLabel("Rate this app");
16
 _rate.setMessageLabel("Please rate for this app if you like it");
17
 
18
 _rate.addEventListener(RateANE.DID_REQUEST_REMINDER, requestReminder);
19
 _rate.addEventListener(RateANE.DID_ATTEMPT_TO_RATE, didRate);
20
 _rate.addEventListener(RateANE.DID_DECLINE_TO_RATE, doesntWantToRate);
21
 }
22
 
23
 protected function doesntWantToRate(event:Event):void
24
 {
25
 trace("doesn't want to rate");
26
 }
27
 
28
 protected function didRate(event:Event):void
29
 {
30
 trace("store that the user has rated");
31
 }
32
 
33
 protected function requestReminder(event:Event):void
34
 {
35
 //user doesn't want to vote now
36
 trace("store that the user should be reminded");
37
 }
38

You can buy the RateANE for symbolic price of 10 Euros.

RateANE-ios.zip

LinkedInShare
Posted in adobe, air, ane | Tagged , | 1 Comment

PhoneGap plugins

Hello guys,
It has been a while since our last post.

Many people have decided to start using PhoneGap/Cordova instead AIR. Unfortunately PhoneGap is a technology which can’t solve all mobile problems. It has some advantages and some disadvantages (as the most technologies do).

If you want to support some native function, in PhoneGap, which is not supported yet, you need a pluging for all OS-es on which you app will run. To ease this process we are happy to make a new announcement.

We are porting some of our ANEs to PhoneGap. The process is like a breeze. We also can be contacted to develop a custom solution for you.

If you are looking for custom solution or custom PhoneGap plugin feel free to contact us here emil [at] lancelotmobile.com.

LinkedInShare
Posted in adobe, air, android, phonegap | Tagged , , , | Leave a comment

AdMob ANE [Republished]

Now you can download a new version of AdMob ANE which is compatible with the new rules of the AppsStore. The access to UDID is now forbidden and the ANE overcomes this minor problem. For those who have bought the AdMob Extra, please contact us to get your new version too.

For all people with the “not a valid ANE file” issue. Try to install the current JDK. After doing this the error is gone.

Thanks to Martin who found a solution of this odd problem.

NOTE: All comments are linked to the old version of this post. We are doing our best to fix the problem and restore them.
Update(01/2013): Read more about AdMob here.
Huge discount of all ANEslow prices.

You have struggled with how to integrate AdMob in your AIR project. Here you will find a solution. I will present you an ANE library, which we have developed and used in several projects. Here you will find the latest stable version and short explanations how to use it. The code of the ANE will be published soon.

You can see the extension in our ANE Explorer in Android Market.
Available in Android Market

AdMob ane

How to use AdMob ANE in AIR for Android?

There are several steps which you should do before start writing code.

  1. You should add the NativeAds.ane file to your flash project. (Project properties -> Flex Build Path -> Native Extensions -> Add …)
  2. You should put the following permissions in your config file (your-project-app.xml) in the tag.

 XML |  copy code |? 
1
<application>
2
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
3
</application>

Here is what you should add to your main application mxml file.

 ActionScript 3 |  copy code |? 
01
02
protected function onAppDeactivate(event:Event):void
03
{
04
 NativeAds.deactivateAd();
05
}
06
 
07
protected function onAppActivated(event:Event):void
08
{
09
 NativeAds.restoreAd();
10
}
11
 
12
protected function onAppPreinitialized(event:FlexEvent):void
13
{
14
        NativeAds.setUnitId(admobId);
15
 NativeAds.setAdMode(true);//put the ads in real mode
16
 //initialize the ad banner with size compatible for phones, it's applicable to iOS only
17
 NativeAds.initAd(0,0, 320, 50);
18
}

To display an ad in particular view add the following handlers:

 MXML |  copy code |? 
01
02
<?xml version="1.0" encoding="utf-8"?>
03
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
04
 xmlns:s="library://ns.adobe.com/flex/spark" 
05
 viewActivate="onViewActivate(event)"
06
 viewDeactivate="onViewDeactivate(event)" 
07
 >
08
 <fx:Script>
09
 <![CDATA[
10
 import com.hdi.nativeExtensions.NativeAds;
11
 import com.hdi.nativeExtensions.NativeAdsEvent; 
12
 protected function onViewActivate(event:ViewNavigatorEvent):void
13
 {
14
 NativeAds.dispatcher.addEventListener(NativeAdsEvent.AD_RECEIVED,onAdReceived);
15
 NativeAds.showAd(0,DPIUtil.appHeight - 75,480,75);
16
 }
17
 
18
 protected function onViewDeactivate(event:ViewNavigatorEvent):void
19
 {
20
 //hide ads
21
 NativeAds.hideAd();
22
 }
23
 
24
 protected function onAdReceived(event:Event):void
25
 {
26
 //Anything behind the ad will be hidden, update your layout to handle this edge case.
27
 trace("update ui's size and position");
28
 }
29
 ]]>
30
 </fx:Script>
31
</s:View>
32

Some notes: The ad will be fetched when the view is activated. If there is an ad to be displayed then the event AD_RECEIVED will be dispatched. When the view is deactivated the ad will be hidden.

How to use it in AIR for iOS ?

Keep in mind:

The vertical positioning of the ad banner should be from 0 to 480 , if you are developing for iPhone. In case you want to show the ads at the bottom of your app and you are developing for iPhone 4, you should use the following code:

 ActionScript 3 |  copy code |? 
1
2
//Usage: NativeAds.showAd(x, y, widthOfTheBanner, heightOfTheBanner); 
3
NativeAds.showAd(0,480 - 50,320,50); 
4

This code will work fine for iPhone 3Gs too.

This is a simple demo how to integrate the AdMob in your mobile AIR application.

Note: If you are not using Flash Builder 4.6 to build your AIR project, then you should add the following lines in your app-descriptor.xml file.

 XML |  copy code |? 
1
2
<extensions>
3
        <extensionID>com.hdi.nativeExtensions.NativeAds</extensionID>
4
</extensions>
5

Update: You can find some documentation of the ANE classes. It’s not ready yet, but many have asked.

LinkedInShare
Posted in adobe, air, android, ane | Tagged , , , , | 127 Comments

Smaato ANE

Update: New version of the ANE was pushed. Everyone who has purchased it can contact us to receive the new version.

Many of our readers liked AdMob native extension. It was downloaded many many times. In short the interest was high, so we decided to create native extensions for a few other ad providers.

One of the first is Smaato (http://www.smaato.com/) – a strong ad network, which supports both major mobile platforms.

Our implementation of this native extension supports Android and iOS.

In addition to that the iOS version can be configured to show Apple iAd. If iAd fails and can’t be fetched then iSmaato banned is displayed.

Here are some screen shots, how this ANE looks on real devices. (Nexus S and the new iPad)

smaato ane iossmaato native extension android

You can get this native extension(iOS and Android) only for 25 euros. Both versions in a single file.

The package which you will receive contains an AIR project. It demos how the native extension should be used.

Very soon we will publish the AdMarvel native extension. Everyone who is interested in implementing any other mobile ad provider can add a comment below.

We hope you will boost your revenue stream with this native extension.

LinkedInShare
Posted in air, android, ane | Tagged , , , | 7 Comments