×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2013
    Posts
    13

    How to give the app permission to use network on S40

    It always show dialog to ask the permission to use the internet, when I press no, an error dialog show up. How to handle this?

    - Is there any ways to give internet permission?
    - If it has to ask permission every time, how can I handle the flow when I press no.(Error Dialog should not show,but inform user instead) Is there any code example?

    Thanks,
    April

  2. #2
    Registered User
    Join Date
    Dec 2012
    Location
    India
    Posts
    264

    Re: How to give the app permission to use network on S40

    Hi

    All J2ME apps need to be certified in order to use a particular Resource (say Camera,Contact Access,File or Network Access ec..) without restriction.When an application is not certified, the application will prompt the user everytime before the resource is accessed.

    Nokia Store offers free certification.Users will have the option to always allow your app to use a particular resource.Hence you can be assured that this wont be a problem after publishing.

    Whenever "No" is pressed, security exception is thrown.You can catch that exception and alert the user that he has to give yes.But be warned, once if a user presses "No", he cannot change it back to "Yes" in the same instance.He will have to restart the app to set the permission as "Yes".

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: How to give the app permission to use network on S40

    Quote Originally Posted by April_Smith View Post
    It always show dialog to ask the permission to use the internet, when I press no, an error dialog show up. How to handle this?

    - Is there any ways to give internet permission?
    - If it has to ask permission every time, how can I handle the flow when I press no.(Error Dialog should not show,but inform user instead) Is there any code example?

    Thanks,
    April
    Best way to handle this issue on S40 devices is to educate the user on the first launch of the application itself - that he need to allow the required permissions - and select allow always (if available - it will be available for certified/signed apps).

    In case, even after educating the user - they press No. You should capture the Security Exceptions and show a dialog to the user to exit and re-launch app - after setting the required permissions for the app.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  4. #4
    Registered User
    Join Date
    Jul 2013
    Posts
    13

    Re: How to give the app permission to use network on S40

    Quote Originally Posted by arunkam View Post
    Hi

    All J2ME apps need to be certified in order to use a particular Resource (say Camera,Contact Access,File or Network Access ec..) without restriction.When an application is not certified, the application will prompt the user everytime before the resource is accessed.

    Nokia Store offers free certification.Users will have the option to always allow your app to use a particular resource.Hence you can be assured that this wont be a problem after publishing.

    Whenever "No" is pressed, security exception is thrown.You can catch that exception and alert the user that he has to give yes.But be warned, once if a user presses "No", he cannot change it back to "Yes" in the same instance.He will have to restart the app to set the permission as "Yes".
    Thanks you Arunkam

Similar Threads

  1. Network Permission
    By fonurr in forum Symbian
    Replies: 3
    Last Post: 2012-02-26, 05:34
  2. How can I give SMS permission to my application.
    By s.abulkalamazad in forum Mobile Java General
    Replies: 2
    Last Post: 2010-07-21, 21:10
  3. want to disable the network connection permission
    By jackofall in forum Mobile Java General
    Replies: 8
    Last Post: 2009-04-22, 12:10
  4. How to give permission to WebServer folder
    By nadiuska in forum Mobile Web Server
    Replies: 3
    Last Post: 2009-03-09, 12:09
  5. AutoStart and Network Access Permission.
    By ashishkumarpatel in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2008-06-09, 15:01

Posting Permissions

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