How to check permissions

Hi guys

I'm developing an application and I am facing some problems.

The application needs to read SIM data in order to display information according to the country of the SIM card. The first thing it does after opening is read the SIM. If no SIM card is detected an error, if one can read that the app displays a list. I'll get into the details.

I added in the descriptor bar of permission of "read_cellular_data". When the app opens for the first time, it asks the user for authorization, which is normal. After that the validated user presses, the screen remains black. Reduce to a minimum the application does that visible splash screen. Only, you can close the application.

After opening the app for the second time, the application works normally.

Also, when I ask the State of the SIM using 'SimCardInfo () .state (); I'm "NotDetected" If there is no SIM and if the app has no authorization. I would like to know how to tell the difference between these 2.

My theory is that I need to check for permission, but I can't find any info on the permissions. All I've found is the following pages:

The App permissions page, which does not describe how to check permissions

and this post on the forum, that isn't for BB10

Any help/advice/pointers would be greatly appreciated.

Pepe

I have seen that some permissions are not documented (can´t recall now another example).

But in the SimCardInfo.hpp, you can find it:

/*!
     * @brief Retrieves the unique identifier for the country where the SIM card's home network
     * is located.
     *
     * @details The mobile country code (MCC) is composed of 3 or 4 decimal digits. For further
     * details about the structure of the MCC, see ITU-T recommendation E.212.
     *
     * @return The country code of the SIM card's home network encoded as a string or an empty
     * string if the caller does not have sufficient permission or the SIM card's state is not
     * @c SimCardState::Ready.
     *
     * @permissions The application must have the @c read_cellular_data permission to access this method.
     *
     */
    QString mobileCountryCode() const;

The application asks permission when opened, and without her, I can't read the SIM card, if the authorization is functional.

Told me by e-mail from a developer evangelist at the moment, there is no way to check/change the permissions.

My problem was that the application tried to read data from the SIM card what it opened, while approval has been invited only to the first opening of the app, and once you have accepted/refused, the app would remain on the start screen.

My solution was to present a welcome screen only the first time that the application is open, so no SIM data would be read while the authorization is requested.

See you soon!

Pepe

Tags: BlackBerry Developers

Similar Questions

  • Can I know how to check if my WWAN is Verizon EV - DO or HSDPA?

    Hi I just bought a new IBM Lenovo Thinkpad X 61. The type is 7675-4KU.

    Can I know how to check the WWAN connection is Verizon EV - DO or HSDPA?

    After that I installed the driver, how can I do to connect to the internet using WWAN?

    Thank you.

    All 61 X have the slot for SIM card, they have a WWAN card or not.

    You would also see the Vista WWAN card: right click on computer > properties > Device Manager > network adapters.

    If the advanced under ThinkVantage System Information button is disabled, either something is wrong with your configuration of ThinkVantage Productivity Center, or you have a permissions problem.

    I doubt you have a WWAN card. Your system does not default. You should have asked to be added when you bought it.

  • How to apply permissions to a folder?

    I would like to know how to apply permissions to a folder so that only specific users or groups can change its contents.

    Does anyone have any suggestions?

    Thanks in advance for your suggestions

    Right-click on the folder, select properties and click the Security tab the cursor over the name of user or group and click Edit. Check the box in the deny column you think appropriate and click the apply button.

  • When im on firefox and try clicking on websites, I get several redirects, I think that its because of one of the extensions but I don't know how to check

    whenever I'm on firefox it starts randomly redirect me to other sites I think that its because of one of my extensions, but I do not know how to check or what is the origin of the problem please help

    Thank you fixed it

  • iPod Classic stopped display work.  Work displayed in iTunes.  Updated iTunes to 12.4 but did not help.  I can see how to check

    iPod Classic stopped display work.  Work displayed in iTunes.  Updated iTunes to 12.4 but did not help.  I can see how to check and uncheck "Display work" in iTunes but not how on the iPod as others have suggested.  Need to perhaps restore and recharge.

    Long ago with including works on devices was optional, and you can sometimes fix cache work on a device by not including and then add it again. This choice has long since disappeared. A complete restoration and reloading is now the only method to recreate the cache.

    TT2

  • Anyone know how to check the date of warranty until when?

    Anyone know how to check the date of warranty until when?

    https://checkcoverage.Apple.com/Jo/en/;JSESSIONID=9pJ0X9pFPJtNg3c44yDGCvk9pVpt5l QSgn4B60y4Skv1WfmnqMkF!-1840326800

  • Color LaserJet Enterprise M577: How to check OXPD 1.6 or 1.7 version

    Hello

    Could someone please tell me how to check OXPD 1.6 or 1.7 on HP M577 version?

    Thank you.

    As a general rule the futuresmart 3.8 + FW should have support 1.7.  Using the last FW will be the best option to ensure you have the latest OXPd support.

  • 14 - ac069tu: how to check HP laptop - 14-ac069tu Max RAM support

    Hello
    I would like to ask how to check Hewlett Packard laptop computer - 14-ac069tu maximum support RAM?
    It is 8 or 16 GB?

    Thank you.

    Hello

    Supports 16 GB 2 x 8

    http://h10032.www1.HP.com/CTG/manual/c04644008

    Two slots for memory module not customer-accessible/upgradable (Intel processors)

    Supported dual channel DDR3L-1600

    A memory non-customer-accessible/extendable module location (Intel Braswell)

    Single channel DDR3L-1600 supports up to 8 GB of RAM in the conƭgurations following & #29;

    ●16384-MB of total system memory (8192 × 2)

    ● total system 12288 MB memory (8192 × 1) + (4096 × 1)

    ● System total of 8192 MB memory (8192 × 1.) or (4096 x 2)

    ● total system 6144 MB memory (4096 x 1) + (2 048 × 1)

    ● System total of 4096 MB memory (4096 × 1.) or (2048 x 2)

    ● total 2048 MB system memory (2 048 × 1) supports up to 2 GB memory max on-board system (only for the Celeron processors) DDR3 1333 MHz Dual Channel Support (DDR3L - 1600 MHz to 1333 MHz DDR3L bridge)

    http://www.Kingston.com/us/memory/search/PartNumber/default.aspx?partid=693374-005

    Crucial system scanner

    Concerning

  • How to check my backup drive?

    I'm used to be able to check my backup of disk utility disk. I now use El Capitan 10.11.1 on an iMac and can't find this option. When I try to run first aid on the backup drive, she fails. Can someone tell me how to check the disk please, thank you

    Not how? are you clicking on the partition when you run first aid?

    FWIW, first aid is equivalent to check and repair disk.

  • How to check if my data is synchronized in firefox 4 beta 7 because now sync is included in firefox button

    How to check if my data is synchronized in firefox 4 beta 7 because now sync is included in firefox button.

    And also when the status bar has instead addon bar is added. What is the purpose of the bar addon?

    All fixed in Firefox 4 Final.

  • My MacBook Pro suddenly becomes very slow, accepting orders very slow how to check if the ram is working properly

    My MacBook Pro suddenly becomes very slow, accepting orders very slow how to check if the ram is working properly

    You can try this download.   Etrecheck.   https://etrecheck.com/#about

    Then publish the report as a reply in this thread.

    It will allow us to review your system without disclosing a private matter.

  • How to check the balance on the gift card itunes

    How to check the balance on the gift card itunes

    Redeem it

  • Satellite A200 - how to check the temperature of the processor fan?

    Hi all

    I have a Satellite A200 that my teenagers use a little, or abuse a little! Recently, it would not start up. I suspect the fan and pulled out the fan cleaned and tested the fan on a PSU, worked out well. He put it back together, ran startup repair and now the computer is operating normally. The fan is however not appear to come at all. In the Device Manager it tells me it works very well. I'm all good with the mechanical side of the House, but I'm a quamby operating system! How to check the temp CPU or fan?

    Thought that replace the fan but don't want to go that far just to get no results. Currently using the vacuum on low like an external fan and didn't want to just run the laptop with no cooling for fear of permanent damage. Although children watch movies with her on their doona may have already reached this!

    Any advice would be appreciated.

    Hey mate,

    How to clean the fan exactly? It s advisable to use the jet of compressed air. This could blow the dust of fans cooling and, therefore, it of not necessary to disassemble the laptop.

    In addition if the fan doesn't work anymore it of necessary to replace. You can order spare parts at an authorized service provider.

  • Satellite P500 - how to check watching a HD?

    How to check or the other that I consult my new Toshiba notebook in watching a HD? Is there information on my laptop that has this information where it says either it of HD or not? Dosnt watch HD, all unless he is.

    Thank you

    What Satellite P500 you exactly (P500-xxx)?

    For example, I checked the specifications of the week last to the Satellite P500-10V and it has Samsung 18.4 "(HD+) screen."

  • Satellite L50t-A-145 drivers - how to check that they are up to date

    I would like to know how to check the driver updates. My Office Help does not work. Is this something that happens in the background after I recorded my laptop?

    What do you mean with injection of funds? Can you please what application does not work exactly?

Maybe you are looking for