Forum Mobile Do any of the services work on android?

Everything mobile goes here.

Do any of the services work on android?

Postby WindieGames » March 25th, 2011, 5:07 am

Hello,

Sorry if I misunderstood the other posts in this forum section, but is it possible to use any of the playerIO services on an android device when deployed with AIR?
WindieGames
 
Posts: 35
Joined: January 30th, 2011, 1:36 am

Re: Do any of the services work on android?

Postby Benjaminsen » March 25th, 2011, 8:37 am

Yep, deploying with AIR you should be able to use all of the Player.IO Api's
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Do any of the services work on android?

Postby wbsaputra » September 9th, 2011, 11:16 am

Hi Ben, where i can get any info/document/sample code about deploying with AIR?
I really interested to develop for android.
wbsaputra
Paid Member
 
Posts: 150
Joined: June 29th, 2010, 4:38 pm

Re: Do any of the services work on android?

Postby GrafixGames » September 25th, 2011, 7:35 pm

I am having a problem in developing a game in AIR for android it shows

SecurityError: Error #3226: Cannot import a SWF file when LoaderContext.allowCodeImport is false.

while connecting to the server.
GrafixGames
 
Posts: 4
Joined: September 20th, 2011, 5:30 pm

Re: Do any of the services work on android?

Postby Chris018 » September 27th, 2011, 3:18 am

I found a fix for that problem.

In Playerio.as, you need to do a small edit.

Add this on top of playerio.as below "private static var wo:Object = { };"
Code: Select all
private static var lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);


Then look into your loadAPI() method and you will see this loader.addEventListener, what i did was let lc allow code imports which fixes the error you are having.

Code: Select all
      loader.addEventListener(Event.COMPLETE, function(e:Event):void{
            wrapper.contentLoaderInfo.addEventListener(Event.COMPLETE, emptyQueue);
            wrapper.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError);
            wrapper.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleLoadError);
            lc.allowCodeImport = true;
            wrapper.loadBytes(loader.data,lc);
            
            wo.wrapper = wrapper
         })


Hope that helps :)
Chris018
 
Posts: 10
Joined: April 6th, 2010, 5:36 pm

Re: Do any of the services work on android?

Postby GrafixGames » September 27th, 2011, 4:08 am

That code solves the problem thanks a lot
GrafixGames
 
Posts: 4
Joined: September 20th, 2011, 5:30 pm

Re: Do any of the services work on android?

Postby UnknownGuardian » November 30th, 2011, 5:41 am

I was able to connect with playerio without publishing to AIR. A mobile ready browser hosted chat worked just fine in case anyone ever wonders.
UnknownGuardian
 
Posts: 94
Joined: May 25th, 2010, 5:11 am

Re: Do any of the services work on android?

Postby Turrican » February 14th, 2012, 3:14 am

Didn't work for me. :(
No connection, no error.
:(
Turrican
 
Posts: 23
Joined: August 11th, 2011, 11:50 pm

Re: Do any of the services work on android?

Postby Khai » January 19th, 2013, 6:17 am

I'm developing an app on AIR for android devices.

I tried to add

Code: Select all
private static var lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
&
lc.allowCodeImport = true;


but it didn't work, it still returned me the same error Error #3226: Cannot import a SWF file when LoaderContext.allowCodeImport is false.

Any updates on this?
I'm still hesitating on using which server so I don't wanna pay upfront just to test the server.
Khai
 
Posts: 2
Joined: November 7th, 2012, 4:45 am

Re: Do any of the services work on android?

Postby Benjaminsen » January 20th, 2013, 7:47 pm

Khai wrote:I'm developing an app on AIR for android devices.

I tried to add

Code: Select all
private static var lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
&
lc.allowCodeImport = true;


but it didn't work, it still returned me the same error Error #3226: Cannot import a SWF file when LoaderContext.allowCodeImport is false.

Any updates on this?
I'm still hesitating on using which server so I don't wanna pay upfront just to test the server.


To use Player.IO using Flash on mobile you need access to our mobile API. This feature is only enabled for paid members.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Do any of the services work on android?

Postby Maras » March 18th, 2013, 6:42 pm

Fix by Chris018 still works :-)

Thanks a lot!
Maras
 
Posts: 93
Joined: October 14th, 2011, 5:52 pm


Return to Mobile



cron