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 ...
Showing posts with label bug. Show all posts
Showing posts with label bug. Show all posts
10 September 2011
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
05 February 2010
BUG : onUnload not called on Wii Flash Lite connection
Step to reproduce this bug
I got it playing with the Wii, so it should be tested elsewhere too...
at this time, onUnload isn't called...very annoying since I usualy clean my listeners here !
To be more precise:
A SWF calls a function of my SWF via LocalConnection
this function callbacks the listener added
the listener calls gotoAndPlay
so it's perhaps because it's in the LocalConnection chain or because of Delegate ?
I got it playing with the Wii, so it should be tested elsewhere too...
this.pressedDelegate = Delegate.create(this, buttonPressed);
Wii.getRemote(0).addEventListener("buttondown", this.pressedDelegate);
private function buttonPressed(event:Object):Void {
_root.gotoAndPlay("new_game");
}
at this time, onUnload isn't called...very annoying since I usualy clean my listeners here !
To be more precise:
A SWF calls a function of my SWF via LocalConnection
this function callbacks the listener added
the listener calls gotoAndPlay
so it's perhaps because it's in the LocalConnection chain or because of Delegate ?
Labels:
bug,
flash lite,
wii
01 October 2009
S40 fullscreen bug also affects Playyoo games
Today, I was playing the best game on Playyoo : Bog Frog
After a Game Over, I tried to submit my score BUT I lost my full screen, as expected...
So it's really a bug, not something I did wrong on my own game...
Someone with a Nokia 5310XM to confirm this ?
Using Playyoo, I found a way to restore fullscreen
1/ you must go to a screen without LeftSoftKey definied (SetSoftKey, "", "xxx")
2/ press the Left soft key, which will open the default 'Options' menu of Flash
3/ select pause
4/ re-open Options menu with left soft key
5/ select play
About the White Screen Of Death, reboot your phone at first crash since it seems to corrupt memory: WSOD occurs anytimes after that, even on games which are sure to be fully working
After a Game Over, I tried to submit my score BUT I lost my full screen, as expected...
So it's really a bug, not something I did wrong on my own game...
Someone with a Nokia 5310XM to confirm this ?
Using Playyoo, I found a way to restore fullscreen
1/ you must go to a screen without LeftSoftKey definied (SetSoftKey, "", "xxx")
2/ press the Left soft key, which will open the default 'Options' menu of Flash
3/ select pause
4/ re-open Options menu with left soft key
5/ select play
About the White Screen Of Death, reboot your phone at first crash since it seems to corrupt memory: WSOD occurs anytimes after that, even on games which are sure to be fully working
Labels:
bug
18 September 2009
BUG : lost full screen and crash on S40
NOTE : I only have 1 S40 phone for testing so I don't know if this bug is only available on the 5310XM or on other S40 phones
While testing advertizing on S40, I found a strange behavior :
if you call an fscommand2("Fullscreen", true) on any frame before a loadvars.load or a xml.load, you'll lost fullscreen for ever
+ calling fscommand2("Fullscreen", true) has no effect
+ calling fscommand2("Fullscreen", false) will crash Flash player (White Screen Of Death!)
To avoid this, I needed to make my call in the same frame as the fscommand2 OR on a frame before the one with the fscommand2
If you answer "no" when Flash Player asks you to accept Internet connection, bug doesn't happen.
HERE is a file with source to test it.
I tested on several S60 available on Nokia's RDA but I was unable to get a valid internect connection to fully test it.
At this time, I don't know if this bug is present
only on my phone or
only on the 5310XM or
only on S40 or
only on FL2 phones or
on every phones
While testing advertizing on S40, I found a strange behavior :
if you call an fscommand2("Fullscreen", true) on any frame before a loadvars.load or a xml.load, you'll lost fullscreen for ever
+ calling fscommand2("Fullscreen", true) has no effect
+ calling fscommand2("Fullscreen", false) will crash Flash player (White Screen Of Death!)
To avoid this, I needed to make my call in the same frame as the fscommand2 OR on a frame before the one with the fscommand2
If you answer "no" when Flash Player asks you to accept Internet connection, bug doesn't happen.
HERE is a file with source to test it.
I tested on several S60 available on Nokia's RDA but I was unable to get a valid internect connection to fully test it.
At this time, I don't know if this bug is present
only on my phone or
only on the 5310XM or
only on S40 or
only on FL2 phones or
on every phones
Labels:
bug
16 August 2009
BUG : NetStream/NetConnection memory leak
If you follow Flash Lite doc about Video.attachMovie, you should play a streamed FLV using this method
I just found a very annoying bug on this one :
when you call my_ns.play( filepath ), something is done on the background, then the video starts to stream & play when buffer is full
if you ever kill everything while 'something is done on the background', the 'something' doesn't stop and the first blocks of memory used by buffer are filled.
This is what I did for testing
Test this with a video (or download my sample)
Don't click the softkey yet, wait for the video to start playing
When you click the softkey, you could see on the memory manager every video data is deleted
Then retest, but quickly (or at least BEFORE the video start playing or you could see 'Connect to file_path' on the trace) click the softkey
At first, nothing happens (like you want to), you even have the wanted
BUT while the video is deconnected, closed, deleted and nulled, some (milli)seconds after you'll see a 'Connect to file_path' and the memory manager will show you something big on memory!
What happened?
I ask for a video
Flash Lite player starts something
I cancel the video and deleted it
Flash Lite doesn't know about it
Flash Lite finished its something
Flash Lite want to start the video but...err...where is my netstream ?! ok, forget it
Unfortunatly, it forget to kill its something
I fought a long time against this one, and I wasn't able to find a workaround....
The only thing I could do is to active the keylistener when the video is ready.
So no way to exit the screen before it starts playing...and so downloaded some Kbytes the user pay for! Very bad user experience !!
VGTrailers is like this, and I retried again this sunday to fix it without success...
I think it's NetStream/NetConnection bug. Not a Video bug, because if I don't use a video object and don't attachVideo, I have the same problem (and so I had sound but no video when I test)
If you ever got this one and found a solution, please, share it with me !
EDIT : I forgot to tell I tested it on read hardware, it's why you'll find oxygen's memchecker on the available test file
var my_video:Video; //my_video is a video object on stage
var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var my_ns:NetStream = new NetStream(my_nc);
my_video.attachVideo(my_ns);
my_ns.play("video1.flv");
I just found a very annoying bug on this one :
when you call my_ns.play( filepath ), something is done on the background, then the video starts to stream & play when buffer is full
if you ever kill everything while 'something is done on the background', the 'something' doesn't stop and the first blocks of memory used by buffer are filled.
This is what I did for testing
var keyListener:Object = new Object( );
keyListener.onKeyDown = function()
{
handleKey(Key.getCode()+"" );
}
Key.addListener(keyListener);
function handleKey( keycode:String ):Void
{
switch (keycode)
{
case ExtendedKey.SOFT1:
trace(_root.stream_ns);
trace(_root.connection_nc);
break;
case ExtendedKey.SOFT2:
Key.removeListener(keyListener);
_root.stream_ns.close();
_root.connection_nc.close();
delete _root.stream_ns;
delete _root.connection_nc;
// nothing still present in memory
_root.gotoAndPlay("menu"); //get out of the frame with the video object
break;
}
}
Test this with a video (or download my sample)
Don't click the softkey yet, wait for the video to start playing
When you click the softkey, you could see on the memory manager every video data is deleted
Then retest, but quickly (or at least BEFORE the video start playing or you could see 'Connect to file_path' on the trace) click the softkey
At first, nothing happens (like you want to), you even have the wanted
FTPS116: Flash Video status : (NetConnection.Connect.Closed)on the trace
BUT while the video is deconnected, closed, deleted and nulled, some (milli)seconds after you'll see a 'Connect to file_path' and the memory manager will show you something big on memory!
What happened?
I ask for a video
Flash Lite player starts something
I cancel the video and deleted it
Flash Lite doesn't know about it
Flash Lite finished its something
Flash Lite want to start the video but...err...where is my netstream ?! ok, forget it
Unfortunatly, it forget to kill its something
I fought a long time against this one, and I wasn't able to find a workaround....
The only thing I could do is to active the keylistener when the video is ready.
So no way to exit the screen before it starts playing...and so downloaded some Kbytes the user pay for! Very bad user experience !!
VGTrailers is like this, and I retried again this sunday to fix it without success...
I think it's NetStream/NetConnection bug. Not a Video bug, because if I don't use a video object and don't attachVideo, I have the same problem (and so I had sound but no video when I test)
If you ever got this one and found a solution, please, share it with me !
EDIT : I forgot to tell I tested it on read hardware, it's why you'll find oxygen's memchecker on the available test file
Labels:
bug,
flash lite
14 August 2009
BUG : Include Device Font
While I was optimizing size of VGTrailers (I always try to be under 100K), I find something strange about device fonts, on Flash CS3 IDE.
Your best friend about size optimizing is size report (I suggest you to read this interesting post at Paul Burnett's madblog)
So, about the bug
If you create a dynamic textfield with a special font (I'll use Arno Pro) but with 'Use device fonts', you'll got something like this on the report size
you have now
Why 29k ? switch to 'anti alias for animation' and you'll find the same size!
So, this bug includes an anti-aliased font while asking to include nothing but use system font.
I know you'll almost never make all these steps but I did, while trying the best font vs the best size, which ended to select a device font and so...
Note I was also able to include a '_sans' font if I switch to '_sans' while switching to dynamic field
Your best friend about size optimizing is size report (I suggest you to read this interesting post at Paul Burnett's madblog)
So, about the bug
If you create a dynamic textfield with a special font (I'll use Arno Pro) but with 'Use device fonts', you'll got something like this on the report size
Arno Pro 31Switch to 'Bitmap text (no-alias)' and include the Latin character set
you have now
Arno Pro 12 pts 4539 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{}~now switch to a static textfield THEN come back to 'Use device fonts'Arno Pro 31if you switch back to a dynamic textfield (still using 'Use device fonts'), you should still find 31bytes...but you have
Arno Pro 29683 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{}~congratulation, you now have a font included for nothing...and 29k!Why 29k ? switch to 'anti alias for animation' and you'll find the same size!
So, this bug includes an anti-aliased font while asking to include nothing but use system font.
I know you'll almost never make all these steps but I did, while trying the best font vs the best size, which ended to select a device font and so...
Note I was also able to include a '_sans' font if I switch to '_sans' while switching to dynamic field
Labels:
bug,
flash lite
29 June 2009
BUG : ExtendBacklightDuration on Distributable Player
When testing VGTrailers, I found something strange with ExtendBacklightDuration...
I first thought it was because I used a unsupported phone (Samsung I320)
Thanks to Darren, I know this bug also occurs on at least one supported phone : Samsung BlackJack
What is the bug ?
Well, when I play a video, I tried to extends backlight duration until the video ends...
Basically, I call fscommand2("ExtendBacklightDuration", 6); every 5 seconds (every 6 seconds I got some flicker)
Doing this, the backlight NEVER switch off, even after video ending...and using fscommand2("ExtendBacklightDuration", 0);
With AMP 1.1, I finally took the time to make some tests and was able to reproduce it (with AMP1.0 & AMP1.1)
I repeat : at this time, bug was only detected on 2 (Samsung) WiMo devices....
I unfortunatly can't test it on S60 devices since I don't own one and Nokia's RDA doesn't allow this kind of test...
So simply make a fla with this code
Publish it and deploy it using AMP....
BackLight 'should' never switch off again
even if you add a fscommand2("ExtendBacklightDuration", 0); or change the duration...
It's not the documented behavior...
So, if you first call fscommand2("ExtendBacklightDuration", XX)
you should never call fscommand2("ExtendBacklightDuration", YY) again before XX seconds
I got the same result publishing a 2.0, 2.1 or 3.0 SWF (I haven't CS4 so I was unable to test under 3.1)
If I load the SWF under FL2 player on my N70 w/o problem.
So, if you got this problem or could test it, I will happy to got your feedback.
If I missed something, I'm interested too!
I first thought it was because I used a unsupported phone (Samsung I320)
Thanks to Darren, I know this bug also occurs on at least one supported phone : Samsung BlackJack
What is the bug ?
Well, when I play a video, I tried to extends backlight duration until the video ends...
Basically, I call fscommand2("ExtendBacklightDuration", 6); every 5 seconds (every 6 seconds I got some flicker)
Doing this, the backlight NEVER switch off, even after video ending...and using fscommand2("ExtendBacklightDuration", 0);
With AMP 1.1, I finally took the time to make some tests and was able to reproduce it (with AMP1.0 & AMP1.1)
I repeat : at this time, bug was only detected on 2 (Samsung) WiMo devices....
I unfortunatly can't test it on S60 devices since I don't own one and Nokia's RDA doesn't allow this kind of test...
So simply make a fla with this code
Stage.align = "TL";
Stage.scaleMode = "noScale";
fscommand2("DisableKeypadCompatibilityMode"); //patch for 5800, thanks Dale!
fscommand2("Fullscreen", true);
fscommand2("ExtendBacklightDuration", 35);
fscommand2("ExtendBacklightDuration", 35);
stop();
Publish it and deploy it using AMP....
BackLight 'should' never switch off again
even if you add a fscommand2("ExtendBacklightDuration", 0); or change the duration...
It's not the documented behavior...
If the time elapses without an additional call to this command, the backlight behavior reverts to the default duration.
So, if you first call fscommand2("ExtendBacklightDuration", XX)
you should never call fscommand2("ExtendBacklightDuration", YY) again before XX seconds
I got the same result publishing a 2.0, 2.1 or 3.0 SWF (I haven't CS4 so I was unable to test under 3.1)
If I load the SWF under FL2 player on my N70 w/o problem.
So, if you got this problem or could test it, I will happy to got your feedback.
If I missed something, I'm interested too!
Labels:
bug,
flash lite
Subscribe to:
Posts (Atom)