Question about freeze on the leave request application

Hi, expert,

Right now, our application would be permission to the user background process starts.  In the case that a part of the permissiion refuses here, we would like to request permission from the user again once a day (which we he did yet).

However in the past, I saw the post related stuck permission and also this message "BlackBerry freezes on application of rejection" ( http://supportforums.blackberry.com/t5/Java-Development/BlackBerry-freezes-on-rejected-permissions-r... ). I'm so worried to again ask the time other than the device to start. I've added code to test anyway to ask once a day if certain permissions are denied. My code works fine and I don't have the issue of the freeze even if the permission is denied.

There are conclusion of couple of this post that I couldn't reproduce here:

1 Simon said that we would need an external application which I did not because I checked the authorization prior to the construction of our background application. See the code later for more information.

2 Nitin says the following:

When you launch the Application RIM Authorization Manager first (using the AutoStart or ApplicationManager or any other method) - you can add permissions with no problems. But if you raise the authorization Application Manager (in the case where the user selected Deny first time), you end up with nightmare ' Please Wait '

which I have seen my tests on the "BOLD" and torch device (for 1, in fact it has been tested on a certain devices since it is that way on my free agent)

Since I don't really test on many features, so I'm just wondering if this gel is also linked with a specific type of BB device. It would be appreciated for any suggestion.

  private static final int[] ALL_PERMISSIONS =
    { ApplicationPermissions.PERMISSION_APPLICATION_MANAGEMENT,
            ApplicationPermissions.PERMISSION_DEVICE_SETTINGS,
            ApplicationPermissions.PERMISSION_CROSS_APPLICATION_COMMUNICATION,
            ApplicationPermissions.PERMISSION_DEVICE_SETTINGS,
            ApplicationPermissions.PERMISSION_EMAIL, ApplicationPermissions.PERMISSION_INTERNET,
            ApplicationPermissions.PERMISSION_FILE_API,
            ApplicationPermissions.PERMISSION_SECURITY_DATA,
            ApplicationPermissions.PERMISSION_LOCATION_DATA,
            ApplicationPermissions.PERMISSION_MEDIA,
            ApplicationPermissions.PERMISSION_ORGANIZER_DATA,
            ApplicationPermissions.PERMISSION_PHONE, ApplicationPermissions.PERMISSION_WIFI,
            };

    }

    public static void main(String[] args)
    {
        LogInstance logInstance = null;
        String launch = null;
        try
        {

            if (args != null && args.length > 0)
            {
                launch = args[0];
            }
            if (launch != null)
            {
                if (launch.equals("autostartup"))
                {

                    //here is the code to check all the permissions for app
                    checkAllPermissions();

                    logger.debug(logInstance, "Background App is entered");
                    BackgroundApp app = new BackgroundApp();
                    app.init();
                    app.enterEventDispatcher();

                }
                else if (launch.equals("gui"))
                {
                    //here is the code for UI process
                }

            }
        }
        catch (Throwable ex)
        {
            ex.printStackTrace();
            logger.error("got exception for starting the agent " + ex.getMessage());

        }
    }
public static boolean checkAllPermissions()
    {

        try
        {

            Logger.infoStatic(loggerName, "Checking all permissions");
            int count = 0;
            while (count < ALL_PERMISSIONS.length)
            {

                if (current.getPermission(ALL_PERMISSIONS[count]) != allow
                        && manager.getMaxAllowable(ALL_PERMISSIONS[count]) == allow)
                {
                    Logger.infoStatic(loggerName, IUserProfileDao.PERMISSIONS_NAMES[count]
                            + " is not set to allow.");
                    updated.addPermission(ALL_PERMISSIONS[count]);
                }
                count++;
                if (count != ALL_PERMISSIONS.length - 1)
                {
                    continue;
                }
                if (updated != null && updated.getPermissionKeys().length > 0)
                {
                    Logger.infoStatic(loggerName, "Invoking permission screen");
                    return manager.invokePermissionsRequest(updated);
                }
            }
        }
        catch (Exception e)
        {
            Logger.errorStatic(loggerName, "Exception wile checking permission" + e);
        }
        return true;
    }

Before OS5 only one application can request at a time. Often, this would cause a freeze if another application has requested permissions while dialogue was still in place. This has been fixed since OS5 and upward.

Tags: BlackBerry Developers

Similar Questions

  • Question about ActionBar on the first screen of the application

    Hi, I have a question about the actionbar behavior in the first screen of the application

    index.htm pushes immediately main.htm with actionbar. ActionBar clicks and responds correctly until I have add overflow on some buttons.

    When I click on the button of overflow, the overflow is displayed at the bottom of the page, the top of the overflow is put in correspondence with the upper part of the actionbar so buttons actionbar overflowing content is not visible.

    I reproduce this problem with the sample application.

    This is expected behavior? Is there a way around it?

    I was able to reproduce the problem and have connected it

    https://github.com/BlackBerry/bbUI.js/issues/329

  • Question about to browse the lines of a viewobject

    I want to iterate over the lines of a viewobject. So, I use the following code snippet to do:

            String amDef = "model.service.TestAM";
            String config = "TestAMLocal";
            ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);
            ViewObject vo = am.findViewObject("EmployeesView1");
            RowSetIterator iterator = vo.createRowSetIterator(null);
            iterator.reset();
     while(iterator.hasNext())
            {
                Row currentRow = iterator.next();
      System.out.println("Value: " + currentRow.getAttribute(1));
            }        
            
     iterator.closeRowSetIterator();
     Configuration.releaseRootApplicationModule(am, true);
    

    Now, I had a question about this code snippet. He get all records from the table of data to the model layer, that is, to the application server? If so, what part of the code for this? vo.createRowSetIterator maybe?

    Your example of code appears that I wasn't there. The default iterator and one that you get by vo.createRowSetIterator are different.

    And do not forget to close the iterator, you created as you lose in other resources.

    Timo

  • where to post a question about iTunes on the iPhone?

    I have a question about a problem with iTunes on the iPhone (iOS), but I do not see a 'Community' with this title (or anything close;  I have no idea what "iTunes U" means).

    For lack of a better idea, I just posted to the community "iTunes for Mac", but I don't think that's true.

    Please let me know where I should post to an iTunes on iPhone issue.  Thank you.

    It should probably be posted in the community Using iPhone Apple Support communities. I'll ask a host spend your question in iTunes for Mac, if it has not already been moved.

    EDIT: Just read your message, and I think it's probably better where it is (because you need help syncing your songs via iTunes on your Mac). He should be fine here, but if the moderators believe that he should be somewhere else, they will move for you.

  • Question about vMAC on the DLR LIF

    Hello

    Based on the design of NSX Guide: "every LIF has assigned an IP address, which represents the default IP for the logical segment L2 bridge, it connects to a vMAC address. The IP address is obviously unique by LIF, then that same VMAC is attributed to all LIF defined"

    This test in the HOL laboratories, I started a ping from 172.16.10.11-> 172.16.20.11.  I configured a mirror port with source such as app-sr-01 a (172.16.20.11) (not available on servers web/app HOL tcpdump!). Looking at the MAC addresses on the package 'in' GRE encapsulated packet (see below cliché) I have a few questions:

    1. whence the source MAC on the 00:50:56:f1:f7:a2 of ICMP request packets? What cli command would show this MAC address?

    2. If each LIF must have the same vMAC, "arp - a" output on the corresponding servers shows different MACs for 10.1 and 20.1 LIF.  Is this expected or a Nested lab thing or did I miss something?

    vmac-question.png

    1 MAC SRC in the query is almost certainly a pMAC for the ESXi server where the web-sv-01 has. You should be able to see in "net-vdr - C-l" running on this host.

    2. "arp - a" output for your web-sv-01 a don't look right, you should see VMAC (02:50:56:56:44:52) for all DLR LIF. What version of NSX do you use?

  • Question about backing up the Lenovo factory

    Hi, I have an E530, I have a question about the Lenovo factory back, I'm a little unsure of the difference between the bootable media and just backup data.

    Is the bootable media just the equivalent to a disk of windows 7?

    the option data backup all currently installed on your laptop?

    I tried with the two checked options the other day and I got to the point where he solicited for disc DVD - RW 6 so I cancelled because I didn't know how much in total he would do, would be nice if he told me so I could better prepare.

    Also, if I was ever to use the data disks, would you boot from the startup disk you did first then also boot from CD 1 of the data disks?

    Hi James,

    We create these disks to customers of all time.  In our case we have Win 7 Pro, pre-loaded.  Win 8 discs are already included with the device.

    The process of factory recovery disks will create a set of disks [the E530 in the USA, to 4 DVD - Yes it would be nice to know how much to advance] will allow you to restore your machine out of the box.  The first disc it creates is a boot disk - you start from this when you start the recovery process - that's all it is. No file data/images for the restore process.  Other disks contain image files needed for restoration.  This does not save the user data. It is a different process.

    Since you started & cancelled the process, I'm not sure that it will allow you to re - burning the discs.  Because of the MS license restrictions, you are allowed to burn discs once.  We got all the way on the last drive and had the process fail [we don't know why - maybe bad disc?] and we cannot redo records because he thinks that we have successfully created their.  So, we have to call Lenovo support and ask them to send us a set of disks in Windows 7.

    I hope this helps...

    Al

  • Question about mismanagement of the effects in the construction of sequence

    Hi all

    I read the BPEL 2.0 document and met a question about management failures and the normal flow of control in the < sequence > construction.

    For example, in the following code fragment:

    <>sequence
    < call...
    < catch faultName = gt; a.
    < / call >
    < receive... >
    < / sequence >

    If fault one is taken and processed by error handler, when the fault handling ends at will are receive > activity start or jumped?

    According to the document: < receive > will begin when < call > complements, but the 'complete' includes the 'ends in vain", (i.e. a fault is stuck inside the < call > and dealt with)?

    Hope you can help me and thank you very much.

    Published by: user8301699 on April 9, 2009 19:04

    Hello

    You have reason, 'full' includes the 'ends in vain", (i.e. a fault is taken inside the and treated).

    Hope this answers your Q.

    See you soon
    Rémy Pucha

  • Question about graphics on the Satellite A200-1VO card memory

    Hello
    How do you assign more memory to the graphics card on laptop Satellite A200-1V0?
    Thank you

    Hello

    in your case it s not possible to change the size of graphics by yourself, memory as graphics memory in your machine is shared with main memory, so if you upgrade main memory and graphics memory should increase. But this question is governed by the chipset and the user has no influence on it.

    Welcome them

  • QUESTION about to connect the calling WinsCard.dll drive

    could not get the list of player and connect the player successfully by call winscard.dll under C:\Windows\system32 folder in my local PC, but the other PC could do that.

    My PC environment: 2002 XP, SP3
    the version of winscard.ll is August 4, 2008

    Hi Yang Yu,

    1. Is the issue with the computer recognizes the card reader or the card reader can't read the card?
    2. What is you receive the exact error message?
    3. What is the number and the model of the card reader?

    Refer to the article below and try the steps mentioned, if you use Windows XP Professional x 64 edition.

    A universal serial bus smart card reader that is connected to a Windows Server 2003-based computer may not detect the smart card

    http://support.Microsoft.com/kb/919922

    Your question does contain all the required information necessary for us to help you. Please provide more relevant information to continue troubleshooting as a result.

    How to ask a question

    http://support.Microsoft.com/kb/555375

  • Question about who can I download my application / magazine...

    Hello

    I want to offer a digital magazine (app) my client using digital publishing suite.  However, I want to only leave about 150 people download (customer sales force) because some information is confidential.

    Is this possible?  How can I limit who can download the application?

    Thank you!

    / R

    Two choices.

    The first is a company with Adobe and Apple account which will cost you a lot of money. The second, is to just use the Adobe Content Viewer and share the folio in this way.

  • Define the set request / Application association

    Currently, I have two sets of application I want to combine into one.

    Existing application sets:

    Set order of Progression:
    Reserve orders
    Import of requisition

    MRP:
    Load/copy/merge MDS
    Launch planning process

    When the value defining a new request, using the Query Wizard value, we see at the prompt for the new name of the game, and after it comes to the prompt "Application". E12893-04 explained that "enter in the Application with which you want to associate your application as a whole." My question is, what impact does that have on overall demand? If individual applications that run with the game belong to preserved by different for example, the custom Application, MRP, etc. So how should we answer this prompt, and is it still important?

    Oracle recommends that custom objects to AOL defined custom applications that are registered rather than basic applications like Oracle does not guarantee that AOL custom objects that are defined for the base application will survive an upgrade. In addition, it is advisable and allows an easier inventory of such objects.

    HTH
    Srini

  • A question about revision in the CPSA

    Hello


    How CPHA treats the revisions of the article? Details of the question, I do face is as shown below

    Point A is a component in the BOM of the point b. section A is bought item and B is make point.
    The elements are controlled reveision. Revision of article A is 000, and B is 000.
    There is an ECO (State of implementation) for having introduced the new revision of article A BOM of b.
    On ECO effectivity date is "September 30, 2009".»


    B request spans sxi months and so there are recommendations (planned orders) to A point in the work table with dates of subsequent order on the date of effectvity. When these planned orders are out (orders with the order Date > Date on ECO effectivity) Workbench... PRs which will be created in the module of purchase do not include the new revision of the article. Instead the field of review allows select manual current and future revision of the article.
    Y at - it a way by which we can default the future revision if the order start date is greater than the date of effectvity?

    Kind regards
    Utkarsh

    Hello, Maxim,.

    Unfortunately, there is no support in ASIC for planning with the revisions of the element. There are several applications of development open to it (the most recent being Bug.7331669 (15) PURCHASE OF REVISION RELEASES ONLY CURRENT REVISION), but it has not been implemented.
    CPSA will always use the current revision.

    CPHA honours effectivity dates in the BOM, so you can use this workaround possible. This does not mean that you must have a separate element for each revision. If there is a high number of revision, maybe it's not practical.

    Best regards
    Geert

  • Question about memory on the Satellite A100-599

    Nice day

    The reason for the question is that Rectron South Africa said that the A100-599 comes with the memory modules 2x512mb and not with 1x1Gb as indicated on the Toshiba site. Rectron advice for the purchase of 2 x 1 GB memory but not refund not 2x512mb memory, thus leaving pay you 2 x what you will actually use.

    Please just confirm the A100-599, sold in South Africa are indeed with 2x512mb or 1 GB as shown on the site.

    Thank you
    IAM

    Hello

    The A100-599 seems to be sold in European, Middle East and Africa.
    I think that the laptop came with 1 GB memory module in a slot.
    The second location of memory should be free.

  • Question about consumption on the Satellite A660-10W

    My A660-10W (new) was wrong and Toshiba (Mafil in Israel) has changed the hard drive.
    Now the computer acts differently that before when I got it like new.

    For example; and my question is:
    1. After about 15 minutes, it automatically goes into sleep mode.
    I understand that the setting can be changed, however I would like to know if this happens when something is running?
    either I left the WD external BACK-UP running, but he fell asleep...
    2. the same thing will happen if Im watching a movie, for example?

    Thank you

    Laptop can't handle in different way. I guess you are using the recovery of images (Toshiba original Win7) and parameters are exactly the same as before.
    # Yes, you can change it. Simply enter the change plan settings for the power plan that you use, and where you can change the time when the laptop should go to mode "Eve". You can also disable using Pétion NEVER.
    # I can't say with certainty, but on my computer laptop doesn t go "standby mode", when I watch the movie. Test it. Set for 2 minutes and put on a movie.

  • Questions about graphics on the P50-B-110 Satellite

    Hi guys, here's another question for you.

    * Intel HD 4600 Graphics - Integrated GPU! *
    * AMD Radeon R9 M265X - efficient! *

    This laptop comes with two GPUS. How can I know what is used and what GPU that triggers its use?
    Can I choose one of the GPU based on a particular application?

    AMD Catalyst Control Center is installed and there is a switchable graphics applications supposedly Watch monitor what is GPU used by what application. When I start to watch it just does not show a GPU or an application.

    Please check this thread how to switch to external ATI GPU
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=78781

    Some nice youtube videos also show the detailed insrtuction to step by step how to do:
    https://www.YouTube.com/watch?v=DCh9Eob0mNY

Maybe you are looking for