One week after my first ANE release comes my first update !
While writing a sample AIR app, I noticed some bugs mainly related to the ANE's context.
Following doc and tutorials, I made a wonderful error : using a static context
On Ads4AIR case, using a static context is an error because if you ask for interstitial ad THEN a banned ad, the banner ad request won't work...because it's stil initialized with interstitial context.
I fixed a lot of others memory leak and was able to code some workaround on Adfonic's limits.
Now it's time to work on the Blackberry !
Be free to
- download the new version (v1.0.1)
- make some tests on your Android device
- check the source of the sample AIR app
Showing posts with label AIR mobile. Show all posts
Showing posts with label AIR mobile. Show all posts
19 April 2013
10 April 2013
My first ANE Ads4AIR : Ads from Admob, Adfonic, Inmobi and some others...
Today I release my first AIR Native Extension.
While only for Android for now, the next release should include BlackBerry support.
What is Ads4AIR ?
This group of ANE offers you alternative to Admob.
Some ANE already exist which give you access to Admob ads on Android and iPhone, my goal was to let you choose.
First, because Admob doesn't support Blackberry.
Second, because choice is the key and Google isn't the only one.
It also allows you to use the ads network you want anytime you want : when your user is from india, when admob returns no ads, when your user is on wifi....It's up to you !
Which are the ads networks supported ?
Adfonic
Adiquity
Admob
Inmobi
Inneractive
Madvertise
Smaato
I tried to support banner and interstitial for the most of them.
Unfortunatly, some SDK are buggy or work only on native Android app.
If you need another one, just ask me !
What's the licence ?
I tried another way to earn money : success sharing.
In fact, it's really simple : if you earn money with Ads4AIR, I'll earn too.
10% of the ads shown are from my own Adfonic account.
Since I understand developers could be afraid to not control every ad shown, it's still possible to register.
And since I'm a nice guy, YOU define the price.
Contact me for my paypal account, transfert the fund and I'll send you a serial id.
Where could I find it ?
On http://www.willna.com/extensions/
More ANE will come if this one is a success so...hurry up, use it and give me your feedback !
While only for Android for now, the next release should include BlackBerry support.
What is Ads4AIR ?
This group of ANE offers you alternative to Admob.
Some ANE already exist which give you access to Admob ads on Android and iPhone, my goal was to let you choose.
First, because Admob doesn't support Blackberry.
Second, because choice is the key and Google isn't the only one.
It also allows you to use the ads network you want anytime you want : when your user is from india, when admob returns no ads, when your user is on wifi....It's up to you !
Which are the ads networks supported ?
Adfonic
Adiquity
Admob
Inmobi
Inneractive
Madvertise
Smaato
I tried to support banner and interstitial for the most of them.
Unfortunatly, some SDK are buggy or work only on native Android app.
If you need another one, just ask me !
What's the licence ?
I tried another way to earn money : success sharing.
In fact, it's really simple : if you earn money with Ads4AIR, I'll earn too.
10% of the ads shown are from my own Adfonic account.
Since I understand developers could be afraid to not control every ad shown, it's still possible to register.
And since I'm a nice guy, YOU define the price.
Contact me for my paypal account, transfert the fund and I'll send you a serial id.
Where could I find it ?
On http://www.willna.com/extensions/
More ANE will come if this one is a success so...hurry up, use it and give me your feedback !
Labels:
AIR mobile,
ane,
monetizing,
willna
14 January 2013
Blackberry effort to get a store full for BB10 launch
This week end, I spent most of my 2 nights to port Dari AlefBe and Temporary Mail to BB10.
Why did I choose to not sleep much this week end ? Because I took part to Blackberry's Android-a-thon and All port-a-thon.
This 2 events have one and only goal : fill Blackberry store (BB App World) before launch of BB10.
They so bought 15000 app at 100$ .
Some people released 20 apps and more on 2 days. I don't know what's the overall quality of all these app, we'll see how many of them RIM really approve.
And it seems, it's not enought : RIM announced a Last Chance Port-A-Thon for this week end. I'll personally try to port Poulpytris and Penguinoid this week so they'll be ready for saturday.
The only thing bugging me is I don't know the habits of a typical BB user : ready to pay for an app (like on iphone) or looking for free apps only, ads based or in-app purchase based (like on android).
So I tried the 2 methods : Dari AlefBe is still ads based while Temporary Mail is a 1$ app.
Why did I choose to not sleep much this week end ? Because I took part to Blackberry's Android-a-thon and All port-a-thon.
This 2 events have one and only goal : fill Blackberry store (BB App World) before launch of BB10.
They so bought 15000 app at 100$ .
Some people released 20 apps and more on 2 days. I don't know what's the overall quality of all these app, we'll see how many of them RIM really approve.
And it seems, it's not enought : RIM announced a Last Chance Port-A-Thon for this week end. I'll personally try to port Poulpytris and Penguinoid this week so they'll be ready for saturday.
The only thing bugging me is I don't know the habits of a typical BB user : ready to pay for an app (like on iphone) or looking for free apps only, ads based or in-app purchase based (like on android).
So I tried the 2 methods : Dari AlefBe is still ads based while Temporary Mail is a 1$ app.
Labels:
AIR mobile,
android,
BB10,
Blackberry
06 November 2012
Framework linkage configuration for ANE library
When you create a Flex library project, the default configuration is to mark framework linkage as external.
This make sense if you add the library project on another project, since this project will include the framework classes the library will use.
Three reasons to mark framework linkage as merged into code are
1/ framework-independant SWC, to avoid future changes in framework which could break code
2/ code loaded as module
3/ AIR Native Extension
On previous versions of Flash Builder, you had to link on ANE's SWC and to make the magic works, you had to use external link type.
So, I assume it's still doing the same behind the scene on Flash Builder 4.6+
If it uses external linking, the SWC will work as a standalone library so you need to include any (sub)classes used ...hence the framework classes used must be included.
This make sense if you add the library project on another project, since this project will include the framework classes the library will use.
Three reasons to mark framework linkage as merged into code are
1/ framework-independant SWC, to avoid future changes in framework which could break code
2/ code loaded as module
3/ AIR Native Extension
On previous versions of Flash Builder, you had to link on ANE's SWC and to make the magic works, you had to use external link type.
So, I assume it's still doing the same behind the scene on Flash Builder 4.6+
If it uses external linking, the SWC will work as a standalone library so you need to include any (sub)classes used ...hence the framework classes used must be included.
Labels:
AIR mobile,
ane
04 November 2012
Understand Flex Build Packaging : Native Entensions message
After a bad experience with WP8, I came back to my current experiment : Native Extension.
I won't explain you what is an AIR Native Extension, look at the dedidacted page from Adobe but more how to read the message on the Native Extension property page.
I almost lost 2 hours because I didn't understand why the default and not the native extension was used so let me share with you how I fixed it and what I discovered at the same time.
When you want to include an ANE on your mobile/desktop AIR project, you first had to include it on Flex Build Path / Native extensions
Doing this, Flex checks the targets (at least 2 : default and 1 native) and the AIR version needed.
If it's ok, it adds the extension ID on the app.xml even if, from what I read on the net but didn't check by myself) it seems it sometimes failed to do it...
On my current ANE, I only did default and android native at the moment.
So, Android Native will be used for Android deployment and Android on device debug while the default will be used for android simulator debug, desktop and any other devices deployment.
Well...it's what I thought (and read)...but in fact, there is another step to check.
I don't know if it's because I updated a lot my ANE or it wasn't done by default but, in fact, doing thing tell Flex to use the default (actionscript) extension anywhere.
So ALWAYS open the Flex Build Packaging property of your project and check the Native Extensions page.
By default, I discover the Package checkbox wasn't checked (again, I don't why and when it was unchecked but not by me !)
I so checked the Package checkbox and it finally used my native code, not my actionscript code.
I then wanted to check the iOS, using only actionscript code.
According asdoc, default is used for any platform without native code.
I checked the Package checkbox on the iOS part and got an strange red cross icon
I compared with Android part
If you read carefully, you'll see this on the iOS part
This ANE does not support iOS platform in red with a red cross icon (which usually means ERROR)
but, 4 lines after, you could also read
Apple iOS Supported : Yes
Errr...Supported or not ?!! Probably not since I have one big red cross icon !
In fact, you should read the first line as
This ANE does not support iOS platform NATIVELY
and the 4th line is correct.
In this case, the ANE doesn't include iOS native code but, since there is a valid default platform, iOS is supported.
Adobe added an Microsoft error (you know, error which is not an error)
So, always check if the Package checkbox is selected and don't take care of the icon.
I won't explain you what is an AIR Native Extension, look at the dedidacted page from Adobe but more how to read the message on the Native Extension property page.
I almost lost 2 hours because I didn't understand why the default and not the native extension was used so let me share with you how I fixed it and what I discovered at the same time.
When you want to include an ANE on your mobile/desktop AIR project, you first had to include it on Flex Build Path / Native extensions
Doing this, Flex checks the targets (at least 2 : default and 1 native) and the AIR version needed.
If it's ok, it adds the extension ID on the app.xml even if, from what I read on the net but didn't check by myself) it seems it sometimes failed to do it...
On my current ANE, I only did default and android native at the moment.
So, Android Native will be used for Android deployment and Android on device debug while the default will be used for android simulator debug, desktop and any other devices deployment.
Well...it's what I thought (and read)...but in fact, there is another step to check.
I don't know if it's because I updated a lot my ANE or it wasn't done by default but, in fact, doing thing tell Flex to use the default (actionscript) extension anywhere.
So ALWAYS open the Flex Build Packaging property of your project and check the Native Extensions page.
By default, I discover the Package checkbox wasn't checked (again, I don't why and when it was unchecked but not by me !)
I so checked the Package checkbox and it finally used my native code, not my actionscript code.
I then wanted to check the iOS, using only actionscript code.
According asdoc, default is used for any platform without native code.
I checked the Package checkbox on the iOS part and got an strange red cross icon
I compared with Android part
If you read carefully, you'll see this on the iOS part
This ANE does not support iOS platform in red with a red cross icon (which usually means ERROR)
but, 4 lines after, you could also read
Apple iOS Supported : Yes
Errr...Supported or not ?!! Probably not since I have one big red cross icon !
In fact, you should read the first line as
This ANE does not support iOS platform NATIVELY
and the 4th line is correct.
In this case, the ANE doesn't include iOS native code but, since there is a valid default platform, iOS is supported.
Adobe added an Microsoft error (you know, error which is not an error)
So, always check if the Package checkbox is selected and don't take care of the icon.
Labels:
AIR mobile,
android,
ane
07 March 2012
92% of Market users can launch AIR apps
According to last Android Market Google Play stats, only 7.8% of the users are still using an Android OS version less than 2.2
It's a good news for AIR and its 2.2 requirement !
It's a good news for AIR and its 2.2 requirement !
Labels:
AIR mobile,
android
05 January 2012
Generate your own PKCS12 certificate for AIR
I know... it's another one about certificate but perhaps you'll need this like I did.
If you follow this blog, you know I'm in need for a +30years certificate.
Problem
Flash Builder wizard generate 25 years certificate only
Solution
generate the certificate myself!
Again, thanks to keytool :
Enter your password when requested only and fill the questions to complete
Note the -validity value is waiting for a number of days (not years!) so 12000 is about 32 years
If you follow this blog, you know I'm in need for a +30years certificate.
Problem
Flash Builder wizard generate 25 years certificate only
Solution
generate the certificate myself!
Again, thanks to keytool :
keytool.exe -genkey -keyalg RSA -storetype pkcs12 -alias <your_key_alias> -keystore <certificate_file>.p12 -validity 12000
Enter your password when requested only and fill the questions to complete
Note the -validity value is waiting for a number of days (not years!) so 12000 is about 32 years
Labels:
AIR mobile
28 December 2011
Check the certificate of an APK
Following previous post, if you lost your certificate file, you have 2 problems
1/ you won't be able to update your APK on the market anymore
2/ you are unable to retrieve details about the certificate used
While there is NOTHING to do for the first problem, there is a way to retrieve the certificate information.
Coming with jdk, you should use jarsigner :
For each file of the apk, it will give you something similar to
this is the certicate details available.
1/ you won't be able to update your APK on the market anymore
2/ you are unable to retrieve details about the certificate used
While there is NOTHING to do for the first problem, there is a way to retrieve the certificate information.
Coming with jdk, you should use jarsigner :
jarsigner.exe -verify -certs -verbose <app>.apk
For each file of the apk, it will give you something similar to
X.509, CN=WillNa, OU=, O=, C=FR
[certificate is valid from 19/12/10 08:38 to 19/12/35 08:38]
this is the certicate details available.
Labels:
AIR mobile,
android
Retrieve information from your p12 certificate
Some days ago, one of my distributors asked me a package with a 30 years long certificate. I was pretty sure my current package was long enought but I didn't remember how much so I looked for a way to get it from this cryptic p12 file.
Be sure you have a jdk and not a jre installed else keytool won't be available.
The command to read information from a .p12 certificate is
the magic option is -v
This way you could see the full informations
My p12 was 25 years long, it seems Google asks 30 years long now
Warning : it's not possible to update the certificate, the only way is to create a new one with the same informations and 30 years validity.
Sadly, doing this cancels the update system of Android.
Current users won't be able to update your app with the previous certificate, they have to delete and redownload it.
So backup and double backup your certificate !
Be sure you have a jdk and not a jre installed else keytool won't be available.
The command to read information from a .p12 certificate is
keytool -list -keystore <certificate_file>.p12 -storetype pkcs12 -v
the magic option is -v
This way you could see the full informations
My p12 was 25 years long, it seems Google asks 30 years long now
Warning : it's not possible to update the certificate, the only way is to create a new one with the same informations and 30 years validity.
Sadly, doing this cancels the update system of Android.
Current users won't be able to update your app with the previous certificate, they have to delete and redownload it.
So backup and double backup your certificate !
Labels:
AIR mobile,
android
10 September 2011
Learn Dari on Android thanks to AIR
Some weeks again, I finished an app I personnaly use : Dari AlefBe
This app help you to learn the Dari's alphabet.
What is Dari ? Wrongly called Farsi or persian, tt's one of the 2 main languages in Afghanistan.
Mainly in the north part of Afghanistan, including Kabul.
This app was made using Flex 4.5 and its mobile version.
It's my first app using Flex for mobile since my games use pure AS3.
I must say I'm not totally happy with Flex 4.5 Mobile.
The way they defined the skins according dpi, the default navigator, the buggy BACK key handling are some of the reasons why I not totally like it. I probably blog about these soon.
You could also add the fact they changed the defaut mobile skin from the beta : it is no longer Android-like, so I had to redefine almost every skin of the component I used.
Hopefully, gesture and effects are working very well. It was easy to make the Flash Cards !
This app help you to learn the Dari's alphabet.
What is Dari ? Wrongly called Farsi or persian, tt's one of the 2 main languages in Afghanistan.
Mainly in the north part of Afghanistan, including Kabul.
This app was made using Flex 4.5 and its mobile version.
It's my first app using Flex for mobile since my games use pure AS3.
I must say I'm not totally happy with Flex 4.5 Mobile.
The way they defined the skins according dpi, the default navigator, the buggy BACK key handling are some of the reasons why I not totally like it. I probably blog about these soon.
You could also add the fact they changed the defaut mobile skin from the beta : it is no longer Android-like, so I had to redefine almost every skin of the component I used.
Hopefully, gesture and effects are working very well. It was easy to make the Flash Cards !
Labels:
AIR mobile,
willna
How to (not) win money with AIR for mobile
Last week, I analized the ads fill rate for my games on several market.
I was very surprised to find a poor 8% max for my Android games while almost 25% for the WillNa website and Poulpytris Flash Lite.
So I tried to find the difference, using my own ads request log....and found it:
This is the UserAgent I receive from some guys on Poulpytris
mozilla/5.0 (android; u; en-us) applewebkit/531.9 (khtml, like gecko) adobeair/2.7
When you look first, nothing strange...but then I looked at my log about WillNa.com and found this one
Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
Well, it seems there is a lot of differences, no ?
For whatever reason, AIR use its own UserAgent.
It wouldn't be a problem if it didn't use a partial UserAgent!
In AIR default UserAgent, no android version, no device ID.
These 2 points are a MAJOR problem when you monetize your app throught ads : Ads network use these info to give you the ads ! No info, no ads or a basic one times to times.
Hopefully, there is a solution : you can override the defaut UserAgent with URLRequestDefaults.userAgent = newUA;
Now, we need to find a solution to detect the AndroidOS version and device ID.
And again, AIR failed to help us to make money : there is NO way to get these values using AS3 !
After some googleing, I find someone who made a fantastic discovery : these values are available on an .ini file !
Using his NativeDeviceInfo class, I updated my apps everywhere, hoping users will update them quickly.
It's been a week and about half of them update it.
For them, I saw a BIG increase of the ads fill rate which confirm the problem's origin : user agent !
A big thanks to Sidney for his class so !
and another buggy feature for AIR to report, helas ...
I was very surprised to find a poor 8% max for my Android games while almost 25% for the WillNa website and Poulpytris Flash Lite.
So I tried to find the difference, using my own ads request log....and found it:
This is the UserAgent I receive from some guys on Poulpytris
mozilla/5.0 (android; u; en-us) applewebkit/531.9 (khtml, like gecko) adobeair/2.7
When you look first, nothing strange...but then I looked at my log about WillNa.com and found this one
Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
Well, it seems there is a lot of differences, no ?
For whatever reason, AIR use its own UserAgent.
It wouldn't be a problem if it didn't use a partial UserAgent!
In AIR default UserAgent, no android version, no device ID.
These 2 points are a MAJOR problem when you monetize your app throught ads : Ads network use these info to give you the ads ! No info, no ads or a basic one times to times.
Hopefully, there is a solution : you can override the defaut UserAgent with URLRequestDefaults.userAgent = newUA;
Now, we need to find a solution to detect the AndroidOS version and device ID.
And again, AIR failed to help us to make money : there is NO way to get these values using AS3 !
After some googleing, I find someone who made a fantastic discovery : these values are available on an .ini file !
Using his NativeDeviceInfo class, I updated my apps everywhere, hoping users will update them quickly.
It's been a week and about half of them update it.
For them, I saw a BIG increase of the ads fill rate which confirm the problem's origin : user agent !
A big thanks to Sidney for his class so !
and another buggy feature for AIR to report, helas ...
Labels:
AIR mobile,
bug,
monetizing,
willna
16 June 2011
AIR for Android (almost) on SD
From Alessandro, AIR 2.7 for Android was released 2 days ago...
The main changement I quickly jumped to was the ability to AT LAST move the runtime to the SD Card.
I was about to post about the real problem of this runtime : its size.
I made a quick stats on the french Android Market and about half of the comment are something like "too heavy and don't know what it is needed for so... deleted!"
On the other half, half (so 1/4 of the total comment) claimed they use a custom ROM (the infamous Cyanogen) to move the runtime on the SD.
You see the point : about 3/4 of the comments are talking about the size of the runtime. It also means 1/2 of users deleted the runtime...and so won't install it anymore even if you publish an awesome (air) app/game.
Note I don't know if it's the same in US or UK, I only talk about France.
So, I was more than happy when reading the news 2 days ago!
Hélàs, my happiness was equal to my sadness when I finally updated AIR on my Desire : of the 16Mo of the runtime, ONLY 5Mo are moveable to the SD card....
Come on! It's better but far to solve the "too heavy" criticism!
I think you could argue Google Maps is almost the same size...but I think you can't compare this because Google Maps is Google Maps (people want it) where AIR is ... what? (1/3 of people don't even know what the need for!)
16Mo for the runtime plus x Mo for any basic app generated with Flex 4.5
The more I use this solution, the more I think it's not the good way....
AIR shouldn't be needed and the apk generated should be (translated) native code.
I finally found a middleware which do so... I'll give it a try next month I think.
Note Adobe is able to do this, look at Wallaby (Flash to HTML5) for example....
The main changement I quickly jumped to was the ability to AT LAST move the runtime to the SD Card.
I was about to post about the real problem of this runtime : its size.
I made a quick stats on the french Android Market and about half of the comment are something like "too heavy and don't know what it is needed for so... deleted!"
On the other half, half (so 1/4 of the total comment) claimed they use a custom ROM (the infamous Cyanogen) to move the runtime on the SD.
You see the point : about 3/4 of the comments are talking about the size of the runtime. It also means 1/2 of users deleted the runtime...and so won't install it anymore even if you publish an awesome (air) app/game.
Note I don't know if it's the same in US or UK, I only talk about France.
So, I was more than happy when reading the news 2 days ago!
Hélàs, my happiness was equal to my sadness when I finally updated AIR on my Desire : of the 16Mo of the runtime, ONLY 5Mo are moveable to the SD card....
Come on! It's better but far to solve the "too heavy" criticism!
I think you could argue Google Maps is almost the same size...but I think you can't compare this because Google Maps is Google Maps (people want it) where AIR is ... what? (1/3 of people don't even know what the need for!)
16Mo for the runtime plus x Mo for any basic app generated with Flex 4.5
The more I use this solution, the more I think it's not the good way....
AIR shouldn't be needed and the apk generated should be (translated) native code.
I finally found a middleware which do so... I'll give it a try next month I think.
Note Adobe is able to do this, look at Wallaby (Flash to HTML5) for example....
Labels:
AIR mobile,
android
05 April 2011
All you need to know about icons
If you plan to use AIR to generate Iphone or Android apps, you should bookmark this page ! It will help you to find which size of icons is needed for which version.
Labels:
AIR mobile
10 March 2011
AIR for Android, Market and Motorola Droid X
Thanks to great guy at FlashGameLicense.com, I discovered my games weren't available to Droid X users.
Why ? Thanks to a small tweet of suzalex from Motorola in October, I found the culprit :
Lesson learned : only set configuration, requirement, permission you REALLY need ;)
Beware, Burrito fills some you don't really need while Flash CS5 don't.
Why ? Thanks to a small tweet of suzalex from Motorola in October, I found the culprit :
a <uses-configuration> tag with android:reqFiveWayNav set true market filters your app off
Lesson learned : only set configuration, requirement, permission you REALLY need ;)
Beware, Burrito fills some you don't really need while Flash CS5 don't.
Labels:
AIR mobile,
android
06 March 2011
BUG : changing stage.displayState break key listener
If you ever call
I tried to re-add it listening to FullScreen event, without success...
It's not needed on AIR app, but I share the same code for Web and AIR version.
It's handy when you're online and the player get back to game.
So... only call it if (Capabilities.playerType=="PlugIn") !!
stage.displayState = StageDisplayState.FULL_SCREENon your game, this will break any listener you added throught
NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN,
onKeyPress);
I tried to re-add it listening to FullScreen event, without success...
It's not needed on AIR app, but I share the same code for Web and AIR version.
It's handy when you're online and the player get back to game.
So... only call it if (Capabilities.playerType=="PlugIn") !!
Labels:
AIR mobile,
bug
Really Intercept Back key
Following previous post, it seems this way is not fully working on Flex app
It works on AS mobile project but not fully on Flex mobile project.
To make it works, you need to follow the steps defined in SWFHead's post
To resume, you have to override backKeyHandler and provide your own back handling (throught popView)
Grrr.....
It works on AS mobile project but not fully on Flex mobile project.
To make it works, you need to follow the steps defined in SWFHead's post
To resume, you have to override backKeyHandler and provide your own back handling (throught popView)
Grrr.....
Labels:
AIR mobile
08 February 2011
NEVER use Count with SQLite
Let be honest, Flex on Android isn't synonym with "Speed"
Even with a paged array (I won 10sec with it), I was fighting for 2hours with a 15 sec(!) delay before filling a list.
FYI, I'm using a 3000 rows table and id is a key...
If i use
(sql) SELECT COUNT(id) as count FROM mytable
and
(as3) return stmt.getResult().data[0]["count"];
this tooks 15 sec...
If I use
(sql) SELECT id FROM mytable
and
(as3) return stmt.getResult().data.lenght
this tooks 0.4 sec
so NEVER use COUNT!
Google it, you'll find COUNT isn't optimized at all on SQLite
Even with a paged array (I won 10sec with it), I was fighting for 2hours with a 15 sec(!) delay before filling a list.
FYI, I'm using a 3000 rows table and id is a key...
If i use
(sql) SELECT COUNT(id) as count FROM mytable
and
(as3) return stmt.getResult().data[0]["count"];
this tooks 15 sec...
If I use
(sql) SELECT id FROM mytable
and
(as3) return stmt.getResult().data.lenght
this tooks 0.4 sec
so NEVER use COUNT!
Google it, you'll find COUNT isn't optimized at all on SQLite
Labels:
AIR mobile,
android
20 December 2010
Intercept key event on Android
To exit your AIR android application, you need to call
NativeApplication.nativeApplication.exit();
when user press the BACK button
I see a lot of post on blog/forum which give this line of code
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);
I must say it doesn't work on every use case.
For example, when I change screen, I remove my main sprite then add a new sprite.
If I do that, I 'lost' the input focus. I had to touch the screen to give the focus back.
Unless someone could tell me how to give the focus back (post a comment!), the solution is to use this line of code:
NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);
EDIT : this works for AS Mobile project only.
You need to make it like this on Flex mobile project.
NativeApplication.nativeApplication.exit();
when user press the BACK button
I see a lot of post on blog/forum which give this line of code
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);
I must say it doesn't work on every use case.
For example, when I change screen, I remove my main sprite then add a new sprite.
If I do that, I 'lost' the input focus. I had to touch the screen to give the focus back.
Unless someone could tell me how to give the focus back (post a comment!), the solution is to use this line of code:
NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);
EDIT : this works for AS Mobile project only.
You need to make it like this on Flex mobile project.
Labels:
AIR mobile,
android
28 October 2010
Flash Builder Burrito available
At last, a Flash builder dedicated to mobile !
This week, Adobe released the beta 1 of Flash Builder Burrito....just when I finished my ANT script to handle Android publication on Flahs Builder 4 ;)
I must say a "Flex mobile project" is very easy to create !
I can't wait to test the "Actionscript mobile project".
They still included their boring help system using AIR but else, you'll be surprising how easy it is the make an AIR for Android application : this article on DevNet will help you (don't miss the videos at the end!)
Note this one is dedicated to FP10.1 output, not Flash Lite so...no Device Central!
It currently supports Android but Iphone/IPad & BBery will be added in a future release.
This week, Adobe released the beta 1 of Flash Builder Burrito....just when I finished my ANT script to handle Android publication on Flahs Builder 4 ;)
I must say a "Flex mobile project" is very easy to create !
I can't wait to test the "Actionscript mobile project".
They still included their boring help system using AIR but else, you'll be surprising how easy it is the make an AIR for Android application : this article on DevNet will help you (don't miss the videos at the end!)
Note this one is dedicated to FP10.1 output, not Flash Lite so...no Device Central!
It currently supports Android but Iphone/IPad & BBery will be added in a future release.
Labels:
AIR mobile,
android
21 October 2010
How to produce an app for iPhone/iPad
If you ever want to make a Flash game/app for iPhone/iPad, this post is the main one !
All you need to know in 6 links.
All you need to know in 6 links.
Labels:
AIR mobile,
iphone
Subscribe to:
Posts (Atom)




