Platform services suddenly doesn't work
Hi,
I'm having the strangest phenomenon - [I]DisableAutoRotation()[/I] suddenly doesn't work when executed from the installed application (I'm using KuneriLite), or even when ran directly from C:/<AppFolder>/<app>.swf or E:/<AppFolder>/<app>.swf ! When I run it directly from E:/ for example, it works [B]perfectly[/B].
I've added a debug text, printing the Device object. In the first case, I get "undefined" while in the second case (same swf, I swear!) I get "[object, object]" and it works perfectly! How od!
Of course, the same code works in all my other apps, inc. after installation.
Any clue what could cause this?
Thanks,
Ranco,
MobilityCraft.
Re: Platform services suddenly doesn't work
Ok, solved, but still unclear: if I set "Local playback security" to "Access local files only" the problem is gone, and DisableAutoRotation() works fine. When I set it to "Access network only", it doesn't.
Bug? Feature? Anyone?
Al least now it works!
Thanks,
Ranco
Re: Platform services suddenly doesn't work
Ciao Ranco,
that's how is suppose to work due to the security sandbox of FL, which I personally always opposed since it does not make any sense.
In any case if you need to access the network too with your app, you have 2 options.
1 - put your app in a "Trusted" folder unders Others directory
2 - use the allowdomain and load the crossdomain.xml file from your server before you do anything else
At this point your should be able to do everything, local and network calls.
Alessandro
Re: Platform services suddenly doesn't work
[QUOTE=biskero;821427]Ciao Ranco,
that's how is suppose to work due to the security sandbox of FL, which I personally always opposed since it does not make any sense.
In any case if you need to access the network too with your app, you have 2 options.
1 - put your app in a "Trusted" folder unders Others directory
2 - use the allowdomain and load the crossdomain.xml file from your server before you do anything else
At this point your should be able to do everything, local and network calls.
Alessandro[/QUOTE]
Hi Alessandro,
Thanks for your answer. That's what I guessed, and indeed that's what I did. I allowed the server's domain and it works fine. I didn't load any crossdomain.xml, though. What's that exactly? Why should I load it at all?
BTW, the server isn't mine - it is inner-active's and I can see they do have this file on their server. Should I just load it?
Thanks,
Ranco
Re: Platform services suddenly doesn't work
Ciao Ranco,
crossdomain.xml allows you to manage access to different domains from a call to the net from your Flash content.
Something it was not really needed in mobile apps. Anyway, if your app is working no problems.
Ask them for more information.
Alessandro
Re: Platform services suddenly doesn't work
[QUOTE=biskero;821473]Ciao Ranco,
crossdomain.xml allows you to manage access to different domains from a call to the net from your Flash content.
Something it was not really needed in mobile apps. Anyway, if your app is working no problems.
Ask them for more information.
Alessandro[/QUOTE]
I've added these lines to my code:
[CODE]
System.security.loadPolicyFile("m2m1.inner-active.com/crossdomain.xml");
System.security.allowDomain("inner-active.com");
[/CODE]
Now it works perfectly with "access local files only" on 5800 with FL 3.1, but doesn't connect at all on N97 having FL 3.0!
When I set "access network only" it does work on the N97, but the Device object does work (DisableAutoRotation() function)
[even the fact that DisableAutoRoration() works on N97 is strange, as it was introduced in FL 3.1, no?]
How can this be explained and what should I do now?
Ranco
Re: Platform services suddenly doesn't work
[QUOTE=biskero;821427]Ciao Ranco,
that's how is suppose to work due to the security sandbox of FL, which I personally always opposed since it does not make any sense.
In any case if you need to access the network too with your app, you have 2 options.
1 - put your app in a "Trusted" folder unders Others directory
2 - use the allowdomain and load the crossdomain.xml file from your server before you do anything else
At this point your should be able to do everything, local and network calls.
Alessandro[/QUOTE]
Alessandro, if I choose the first option, will it work for both C: and E: (and F:)? Isn't the Trusted folder in the same location?
Ranco
Re: Platform services suddenly doesn't work
Ciao,
if you use the trusted folder you do not need to implement the 2nd method.
So one or the other, if your app uses the internet I would racomend the first method so you can install the app anywhere.
Alessandro
Re: Platform services suddenly doesn't work
[QUOTE=biskero;822352]Ciao,
if you use the trusted folder you do not need to implement the 2nd method.
So one or the other, if your app uses the internet I would racomend the first method so you can install the app anywhere.
Alessandro[/QUOTE]
Ok, that's what I prefer as well, due to the N97 issues I described below.
so folder \Other\Trusted\ will work for both Phone memory and Memory card ? I remember reading somewhere in the past that the Trusted folder is in different locations ...
Ranco
Re: Platform services suddenly doesn't work
Ciao,
yes, depending if you install on c or other drives.
that's why is better to use the other method too.
Alessandro
Re: Platform services suddenly doesn't work
[QUOTE=biskero;822355]Ciao,
yes, depending if you install on c or other drives.
that's why is better to use the other method too.
Alessandro[/QUOTE]
Would you happen to know then, what's the story with N97 not working with the AllowDomain() method? See my description in reply #6. N97 is always causing me problems....
Ranco
Re: Platform services suddenly doesn't work
Ciao,
not sure but did you install FL3.1 on your N97 via software updare by any chance?
As you know Platform Services is for 3.1 as far as I remember and as you mentioned.
Alessandro
Re: Platform services suddenly doesn't work
[QUOTE=biskero;822358]Ciao,
not sure but did you install FL3.1 on your N97 via software updare by any chance?
As you know Platform Services is for 3.1 as far as I remember and as you mentioned.
Alessandro[/QUOTE]
No, I didn't (it's not mine...).
But still, even in FL 3.0, using "access local files only" and calling allowDomain() should do the trick, regardless of the rotation issue. And it doesn't - the phone fails to connect to the internet!
I'm starting to thinking I should exclude N97 from my distribution list, it is a quite exhausting fight...
Thanks for your continuous help!
Ranco
Re: Platform services suddenly doesn't work
I'm giving up on N97, excluding it from distribution. Tired of fighting with a single model. Too bad!
Ranco