×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Platform services suddenly doesn't work

    Hi,
    I'm having the strangest phenomenon - DisableAutoRotation() 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 perfectly.
    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.

  2. #2
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    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

  3. #3
    Nokia Developer Champion
    Join Date
    Apr 2005
    Location
    Boston
    Posts
    517

    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

  4. #4
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Platform services suddenly doesn't work

    Quote Originally Posted by biskero View Post
    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
    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

  5. #5
    Nokia Developer Champion
    Join Date
    Apr 2005
    Location
    Boston
    Posts
    517

    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

  6. #6
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Platform services suddenly doesn't work

    Quote Originally Posted by biskero View Post
    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
    I've added these lines to my code:
    Code:
            System.security.loadPolicyFile("m2m1.inner-active.com/crossdomain.xml");
            System.security.allowDomain("inner-active.com");
    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

  7. #7
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Platform services suddenly doesn't work

    Quote Originally Posted by biskero View Post
    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
    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

  8. #8
    Nokia Developer Champion
    Join Date
    Apr 2005
    Location
    Boston
    Posts
    517

    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

  9. #9
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Platform services suddenly doesn't work

    Quote Originally Posted by biskero View Post
    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
    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

  10. #10
    Nokia Developer Champion
    Join Date
    Apr 2005
    Location
    Boston
    Posts
    517

    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

  11. #11
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Platform services suddenly doesn't work

    Quote Originally Posted by biskero View Post
    Ciao,

    yes, depending if you install on c or other drives.
    that's why is better to use the other method too.

    Alessandro
    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

  12. #12
    Nokia Developer Champion
    Join Date
    Apr 2005
    Location
    Boston
    Posts
    517

    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

  13. #13
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Platform services suddenly doesn't work

    Quote Originally Posted by biskero View Post
    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
    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

  14. #14
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    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

Similar Threads

  1. Serial number for 40 Platform SDKs still doesn't work!
    By jaazz in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2012-01-09, 07:09
  2. Platform Service API problem: not work while calling two services
    By xiaolvren in forum [Archived] Flash Lite on Nokia Devices
    Replies: 3
    Last Post: 2009-09-10, 21:08
  3. Program suddenly not working - doesn't recognise hardware
    By luciadoll in forum Bluetooth Technology
    Replies: 0
    Last Post: 2006-12-10, 01:54
  4. Serial number for 40 Platform SDKs doesn't work!
    By jaazz in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2006-07-23, 16:43
  5. Replies: 1
    Last Post: 2003-08-23, 08:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •