Missing constants

Import net.rim.device.api.applicationcontrol.ApplicationPermissions;

get accsess to methods, but not for the constants used as "VALUE_ALLOW".

and "PERMISSION_PHONE".

Where can I find them?

fields are members of the ApplicationPermissions class, you must declare them like this. for example: ApplicationPermissions.VALUE_ALLOW

Tags: BlackBerry Developers

Similar Questions

  • Typedef constant missing description

    I created a strict typdef cluster and gave him a description (Description of right click and tip).

    This description is displayed on a control and the indicator, but not on a constant or the wire itself.

    I belive that there is a bug in code.

    2009 sp1 win xp32

    I agree that this behavior is strange.  I submitted this in our R & D under the CAR # 278228 of inquiry.  Thank you for that bring to our attention!

    Brandon Treece

    Technical sales engineer

    National Instruments

  • Mail missing after restoring the messaging profile folder

    Hello, I had problems with my file sent and had to restore my profile folder to an old copy of 3 day, but after that my Inbox is missing mail for 16 days, the mail is extremely important because it contains all my orders and working material and I need a way to recover. Please help me! At the moment there is no earlier version or which folder to restore once I open his options on the file to the Inbox, what do I do now?

    restored what and how is the first question. If you mean windows restore, I'm from here. It's a mess of Microsoft, with that I want nothing to do.

    The only constant I can suggest is the right click on the folder in Thunderbird, select Properties, and then store the button fix to force a re-indexing of mail.

  • Why the table in the output of MT complex waveform modulation FSK 255 elements missing?

    Hello! I posted my question in the LabVIEW forum but an application engineer suggested I post here. I'm new so any help would be appreciated

    I use this example FSK in LabVIEW (VI is attached). As it can be seen in the block diagram, the number of samples by specified symbol is 512. If I run 2 - FSK, I have 1 bit per symbol. So I if I have 128 bits, 128 symbols. and if I have 512 samples per symbol, I expect 65536 samples/elements in the complex waveform of the MT output modulation FSK. However, I get only 65281 elements in the table. There are 255 missing items.

    If I run 4 - FSK and have 128 bit or 64 symbols, I expect to 32768 in the table. But then again, I'm running out of 255 items and get 32513.

    Am I missing out on something? Have I misunderstood something? Thank you very much for your help.

    I get the same results as you!

    I Dove a little inside, and it seems that the code that generates the symbols, two layers down, which reports an explanation to this.

    If you open MT modulate FSK.vi, then mod_FSK modular Phases.vi discontinuous to generate in the discontinuous case of the structure of the case, you will see the following code.

    You can see that when Reset is set to True (the default) and the external-loop for is in his first race, the inner-loop for work (samples per symbol) / 2 + 1 times (in your case, this number is 512 / 2 + 1 = 257.) Subsequently, the inner-loop for runs with 512 for each outer loop for iteration. This means that the first round fail to 512-257 = 255 samples, which causes the total to 255 less samples.

    I don't know what is the motivation behind this design. As a test, you could connect in a constant False to Reset of the MT Terminal modulated FSK VI, which causes all the samples to generate.

    Hope that clarifies it.

  • NI-VISA 5.1.2 outputs/farm right after launching it on CentOS Linux 6.2 PC, also blocks LabVIEW trying to create VISA constant REF for VISA Open.

    After installing 2011 LaBVIEW and NI-VISA 5.1.2 on CentOS 6.2 PC, I noticed a problem trying to use the LabVIEW vi VISA, basically it does not work for me, LabVIEW crashed when trying to create a control, or a constant for the open VISA vi.  Tried to launch VISA tools, they all start and then close abruptly.  Trace IO OR only shows a single line.

    I read however number of threads and decided to collect the system.log NOR, which is attached. (system.log.gz). I noticed a strange message here on nivisaserver:

    / usr/bin/tail - lines = 25 var:

    22 May 11:18:48 abrtd localhost: 'nivisaserver' Package is not signed with the appropriate key

    22 May 11:18:48 abrtd localhost: corrupt or bad dump /var/spool/abrt/ccpp-2012-05-22-11:18:48-3258 (Re: 2), deleting

    Thank you!

    MountainMan12 wrote:

    After installing 2011 LaBVIEW and NI-VISA 5.1.2 on CentOS 6.2 PC, I noticed a problem trying to use the LabVIEW vi VISA, basically it does not work for me, LabVIEW crashed when trying to create a control, or a constant for the open VISA vi.  Tried to launch VISA tools, they all start and then close abruptly.  Trace IO OR only shows a single line.

    I read however number of threads and decided to collect the system.log NOR, which is attached. (system.log.gz). I noticed a strange message here on nivisaserver:

    / usr/bin/tail - lines = 25 var:

    22 May 11:18:48 abrtd localhost: 'nivisaserver' Package is not signed with the appropriate key

    22 May 11:18:48 abrtd localhost: corrupt or bad dump /var/spool/abrt/ccpp-2012-05-22-11:18:48-3258 (Re: 2), deleting

    Salvation mountain,

    Thanks to attach the report system log - I think I have a solution for you :-) Let's look at some of the lines:

    890: / proc/meminfo:
    891: MemTotal: kB 3894712

    1726: / proc/iomem:
    ...
    1784: 100000000-12dffffff: System RAM

    1807: / bin/dmesg:
    ...
    1820: RAM BIOS fitness card: 2576: [nipple] more than 4 GB of memory addressable detected.
    ...
    1838: BIOS-e820: 0000000100000000 - 000000012e000000 (usable)
    ...
    2576: [nipple] more than 4 GB of memory addressable detected.
    2577: [nipple] this configuration is not supported. Check the release notes for more information.

    Starting at the bottom to 2576.2577, dmesg lines had more than just the NI-VISA signature notification server. To start the system, the kernel modules OR refused to load because they detected more than 4 GB of memory addressable. But, if you look upward to the 890.891 lines, meminfo says that you have less than 4 GB of memory system, which makes it appear as modules OR don't know what they are talking about. However, if you look at the report of iomem down on lines 1726.1784, system RAM was relocated above the 4 GB limit. While your system has no more than 4 GB of RAM, part of his memory addresses beyond 4 GB, which can not use modules OR and so they refuse to load. -What happened? Your BIOS has provided a physical map of the RAM with usable over the threshold (line 1838) addresses.

    The difficulty here is simple: you must specify the kernel to reserve addresses beyond 4 GB [1] so that it won't remap RAM into a memory. Once all the RAM addresses below 4 GB, the modules must load and VISA/LabVIEW/al. should stop bad conduct.

    It seems to me that LabVIEW does not handle this situation very gracefully, and maybe you can work with Kira to file a bug report.

    [1] re: success SUSE linux and DAQmx installation; nilsdev and other missing utilities.

    http://forums.NI.com/T5/Multifunction-DAQ/successful-SUSE-Linux-and-DAQmx-install-nilsdev-and-other/...

  • Missing images IMAQ, parallel

    Hello, I use Gigabit Ehternet camera and after grabbing an image I get models and cut (always two models cut). So I have to small fragments of image caught (left square, Ellipse of left, right square, Ellipse on the right). For the moment I deal only with the Ellipses. Left and right Ellipse are placed as a WhichType.vi entry and subsequently GrainDecision.vi. If I only use one instance of WhichType everything is ok, and I have all of the missing images in ResultGrainLeft or to the right. But if I put two vi's, like on description.jpg, sometimes there are missing images in the indicators of IMAQImage or something's wrong with them (both the same images or something like added random images), but there are no errors and score changes. Any ideas what may be wrong in GrainDecision.vi?

    Karol

    Karol,

    The problem is in the GrainDecision.vi and the constants that you pass to IMAQ create. The images are unique by a name, and if an image with the name of entry has already been created, it is the image that will be returned. Two calls to IMAQ create with the same input will create only a single image, regardless of the context in which it was admitted. Each instance of GrainDecision.vi will use the same thresholdGrain, SubDstGrain, images etc. I also recommend not to use images useless temporary destination. In general, you can leave the destination unwired image and the source image will be altered. You can probably eliminate 3-5 of these calls IMAQ create in GrainDecision.vi and your memory footprint and get a small speed improvement

  • Vista code missing...

    Hello, I have the legitimate case, but because of the constant of my family moving, manual is missing and so is the product key. My computer has had some problems in the past and its data has been erased from my computer clean. Now I want to reinstall Windows Vista on my computer but I have no product key. I would be more that my question can respond as soon as possible.

    See this:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_install/lost-my-product-key-off-of-the-Vista-DVD-box/9b51c873-D11d-4641-8cc4-1b08a9425f1d

    You can get a new product key by contacting customer Americas (ACS) Service at (800) 936-5700. A new key can be generated only if you have the retail copy of the software (DVD) or downloaded the version of Digital River or Microsoft Store.
    http://support.Microsoft.com/kb/2279109

  • Please stop - constant Security Center notifications

    Out of nowhere I get constant notifications this malware/worms/viruses etc etc are attacking my computer. About 4 security pop - up every 15 minutes or so... and I can't stop! My computer is protected by another system, but this does not seem to register. I tried to go to the Security Center to change the options, but everything is 'frozen' (you know the police gray color that won't let you change the options) so I can't change anything.
    Please help, it drives me crazy.

    Hello

    It is a rogue antivirus program, trying to get money from your hand while offering no real advantage at all.

    We need to know the name of the program and, if possible the site it comes from you.

    =======================================================

    These have been very active, so here are the methods to remove if they are that you
    Describe the. If this isn't the type you so please give as well a description as
    possible.

    Try Mode safe mode with networking - repeatedly, press F8 that you start.

    The best two methods allow scanners to run and/or AV.exe out of the way or removing.

    1.
    CTRL SHIFT ESC - task manager OR right click on the taskbar - task manager

    Process tab - complete the process on AV. EXE and continue with the uninstall Guide.

    If necessary use start - computer or Windows Explorer to navigate to

    C:\Program Malwarebytes Anti - Malware\mbam.exe or where it is installed - if
    necessary right click on the shortcut of Malwarebytes - Properties - tab - target line to see where it
    is installed.

    Right-click on it and rename it to ZZMbam.COM (or something different than now) and
    Double-click it, and then run it like this. You can rename it back later. Do the same with
    other programs according to the needs. Use this method to others as needed - NOT assume all
    a program deletes all or that it is no other malicious software. Use the ".com"
    prevents the extension as this malware. EXE to run.

    ---------------------------------------------------

    2.
    Another method is to use them:

    Use Process Explorer to "Suspend" the process will not stop

    Then use AutoRuns to delete the malicious program startup items.

    Now use UnLocker to delete the files in the malware.

    You may need to do a file at a time.

    Process Explorer - free
    http://TechNet.Microsoft.com/en-us/Sysinternals/bb896653.aspx

    AutoRuns - free
    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx

    UnLocker - free (do not install the adaware Ebay)
    http://www.Softpedia.com/get/system/system-miscellaneous/unlocker.shtml

    AV.exe

    ==============================================

    There are MANY varieties of the latter with a lot of names, but all can be removed with the
    same methods:

    Vista Antispyware 2010, XP Internet Security 2010, Antivirus 2010 Vista and Win 7 Antispyware 2010
    are rogue antivirus, scams to get you to pay for them while they have no advantage at all.

    How to remove all THE varieties of this malware - please read carefully the removal Instructions.
    http://www.bleepingcomputer.com/virus-removal/remove-antivirus-Vista-2010

    RENAME this as necessary to allow them to perform: (use a different name with the .COM extension
    instead of .exe)

    It can be made repeatedly in Mode safe - F8 tap that you start, however, you must also run the
    in the regular when windows you can.

    Download malwarebytes and scan with it, run MRT and add Prevx to be sure that he is gone. (If Rootkits
    UnHackMe execution)

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN

    Malwarebytes - free
    http://www.Malwarebytes.org/

    Run the malware removal tool from Microsoft

    Start - type in the search box-> find MRT top - right on - click RUN AS ADMIN.

    You should get this tool and its updates via Windows updates - if necessary, you can download
    here.

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN
    (Then run MRT as shown above.)

    Microsoft Malicious - 32-bit removal tool
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=AD724AE0-E72D-4F54-9AB3-75B8EB148356&displaylang=en

    Microsoft Malicious removal tool - 64 bit
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=585D2BDE-367F-495e-94E7-6349F4EFFC74&displaylang=en

    also install Prevx to be sure that it is all gone.

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN

    Prevx - Home - free - small, fast, exceptional CLOUD protection, working with other security programs.
    It is a single scanner, VERY EFFICIENT, if it finds something to come back here or use Google to see
    How to remove.
    http://www.prevx.com/   <-->
    http://info.prevx.com/downloadcsi.asp  <-->

    Choice of PCmag editor - Prevx-
    http://www.PCMag.com/Article2/0, 2817,2346862,00.asp

    Try the demo version of Hitman Pro:

    Hitman Pro is a second scanner reviews, designed to save your computer from malicious software (viruses,
    Trojan horses, rootkits, etc.). that has infected your computer despite all security measures that you have
    taken (such as the anti-virus software, firewall, etc.).
    http://www.SurfRight.nl/en/hitmanpro

    --------------------------------------------------------

    If necessary here are some free online scanners to help the

    http://www.eset.com/onlinescan/

    http://OneCare.live.com/site/en-us/default.htm

    http://www.Kaspersky.com/virusscanner

    Other tests free online
    http://www.Google.com/search?hl=en&source=HP&q=antivirus+free+online+scan&AQ=f&OQ=&AQI=G1

    --------------------------------------------------------

    Also do to the General corruption of cleaning and repair/replace damaged/missing system files.

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    Start - type this in the search box-> find COMMAND at the top and RIGHT CLICK – RUN AS ADMIN

    Enter this at the command prompt - sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Run checkdisk - schedule it to run at the next startup, then apply OK then restart your way.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    -----------------------------------------------------------------------

    If we find Rootkits use this thread and other suggestions. (Run UnHackMe)

    http://social.answers.Microsoft.com/forums/en-us/InternetExplorer/thread/a8f665f0-C793-441A-a5b9-54b7e1e7a5a4/

    I hope this helps.

    Rob - bicycle - Mark Twain said it is good.

  • HttpPushDemo throws the error of missing on real device resource

    I am trying to run the example of httppushdemo on a real device to test for problems with an application to push.  However, if I run the application in the device, I get the error "Missing resource com.rim.samples.device.resource.HTTPPushDemoRes.

    I looked everywhere to find out how to get the resource on the device and impossible to find a solution.  The documentation I found would lead me to believe that it should be compiled in the Cod.

    Why I'm so confused (and frustrated after a long day of our push to debug problems)

    Thank you

    -Bill

    In older levels (4.3 and earlier OS), RIM ran the code, so that the resources (labels field, the names of menu etc.) where in a separate package.  It's a good way to demonstrate how you could internationalize applications, but also everyone confused because putting the application on the device, you need to charge upward of the cod resources as well.

    At the latest OS (4.5 +), they do not do this.

    The demo of http push has not changed, so you can take the source of the 4.5 or later in a previous level JDE and compile it.  It will take so NOT all external files of cod.  That's what I recommend you do.

    However, for you to win download the JDE together for a single file, it is here:

    /**
     * HTTPPushDemo.java
     *
     * Copyright © 1998-2008 Research In Motion Ltd.
     *
     * Note: For the sake of simplicity, this sample application may not leverage
     * resource bundles and resource strings.  However, it is STRONGLY recommended
     * that application developers make use of the localization features available
     * within the BlackBerry development platform to ensure a seamless application
     * experience across a variety of languages and geographies.  For more information
     * on localizing your application, please refer to the BlackBerry Java Development
     * Environment Development Guide associated with this release.
     */
    
    package com.rim.samples.device.httppushdemo;
    
    import java.io.*;
    import javax.microedition.io.*;
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.system.*;
    import net.rim.device.api.util.*;
    import net.rim.device.api.io.http.*;
    
    /**
     * The client side of a simple HTTP Push system.
     * This application will listen for image data on the specified port and
     * render the data when it arrives.
     */
    public class HTTPPushDemo extends UiApplication
    {
        // Constants ----------------------------------------------------------------
        private static final String URL = "http://:100"; // PORT 100.
        private static final int CHUNK_SIZE = 256;
    
        // Members ------------------------------------------------------------------
        private ListeningThread _listeningThread;
        private HTTPPushDemoScreen _mainScreen;
        private RichTextField _infoField;
        private RichTextField _imageField;
    
        public static void main(String[] args)
        {
            HTTPPushDemo theApp = new HTTPPushDemo();
            theApp.enterEventDispatcher();
        }
    
        // Constructor --------------------------------------------------------------
        public HTTPPushDemo()
        {
            _mainScreen = new HTTPPushDemoScreen();
            _mainScreen.setTitle(new LabelField("HTTP Push Demo" , LabelField.USE_ALL_WIDTH));
    
            _infoField = new RichTextField();
            _mainScreen.add(_infoField);
    
            _mainScreen.add(new SeparatorField());
    
            _imageField = new RichTextField();
            _mainScreen.add(_imageField);
    
            // Spin off the listening thread.
            _listeningThread = new ListeningThread();
            _listeningThread.start();
    
            _infoField.setText("HTTP Listen object started");
    
            pushScreen(_mainScreen);
        }
    
        // Inner Classes ------------------------------------------------------------
        private class ListeningThread extends Thread
        {
            private boolean _stop = false;
            private StreamConnectionNotifier _notify;
    
            public synchronized void stop()
            {
                _stop = true;
                try
                {
                    // Close the connection so the thread will return.
                    _notify.close();
                }
                catch (IOException e)
                {
                    System.err.println(e.toString());
                }
                catch (NullPointerException e)
                {
                    // The notify object likely failed to open, due to an IOException.
                }
            }
    
            public void run()
            {
    
                StreamConnection stream = null;
                InputStream input = null;
                MDSPushInputStream pushInputStream=null;
    
                while (!_stop)
                {
                try
                    {
    
                        // Synchronize here so that we don't end up creating a connection that is never closed.
                        synchronized(this)
                        {
                            // Open the connection once (or re-open after an IOException),  so we don't end up
                            // in a race condition, where a push is lost if it comes in before the connection
                            // is open again. We open the url with a parameter that indicates that we should
                            // always use MDS when attempting to connect.
                            _notify = (StreamConnectionNotifier)Connector.open(URL + ";deviceside=false");
                        }
    
                        while (!_stop)
                        {
    
                            // NOTE: the following will block until data is received.
                            stream = _notify.acceptAndOpen();
    
                            try
                            {
                                input = stream.openInputStream();
                                pushInputStream= new MDSPushInputStream((HttpServerConnection)stream, input);
    
                                // Extract the data from the input stream.
    
                                DataBuffer db = new DataBuffer();
                                byte[] data = new byte[CHUNK_SIZE];
                                int chunk = 0;
    
                                while ( -1 != (chunk = input.read(data)) )
                                {
                                    db.write(data, 0, chunk);
                                }
    
                                updateMessage(data);
    
                                // This method is called to accept the push.
                                pushInputStream.accept();
    
                                input.close();
                                stream.close();
    
                                data = db.getArray();
    
                            }
                            catch (IOException e1)
                            {
                                // A problem occurred with the input stream , however, the original
                                // StreamConnectionNotifier is still valid.
                                System.err.println(e1.toString());
    
                                if ( input != null )
                                {
                                    try
                                    {
                                        input.close();
                                    }
                                    catch (IOException e2)
                                    {
                                    }
                                }
    
                                if ( stream != null )
                                {
                                    try
                                    {
                                        stream.close();
                                    }
                                    catch (IOException e2)
                                    {
                                    }
                                }
                            }
                        }
    
                        _notify.close();
                        _notify = null;   
    
                    }
                    catch (IOException ioe)
                    {
                        // Likely the stream was closed. Catches the exception thrown by
                        // _notify.acceptAndOpen() when this program exits.
    
                        if ( _notify != null )
                        {
                            try
                            {
                                _notify.close();
                                _notify = null;
                            }
                            catch ( IOException e )
                            {
                            }
                        }
                    }
                }
            }
        }
    
        private void updateMessage(final byte[] data)
        {
            Application.getApplication().invokeLater(new Runnable()
            {
                public void run()
                {
                    // Query the user to load the received message.
                    String[] choices = {"Ok" , "Cancel" };
    
                    if ( 0 != Dialog.ask("New message received. Do you want to render it?" , choices, 0) )
                    {
                        return;
                    }
    
                    _infoField.setText("Text received - size:  " + data.length);
    
                    try
                    {
                       _imageField.setText(new String(data));
                    }
                    catch (Exception e)
                    {
                        Dialog.inform(e.toString());
                        System.err.println(e.toString());
                    }
                }
            });
        }
    
        protected void onExit()
        {
            // Kill the listening thread.
            _listeningThread.stop();
    
            try
            {
                _listeningThread.join();
            }
            catch (InterruptedException e)
            {
                System.err.println(e.toString());
            }
    
        }
    
        private class HTTPPushDemoScreen extends MainScreen
        {
    
            /**
             * @see net.rim.device.api.ui.Screen#close()
             */
            public void close()
            {
                onExit();
    
                super.close();
            }
        }
    }
    
  • Bango: Missing Indonesia sales

    I just got my Bill from Bango for December 2012. I was surpised to see that revenues are much lower than in November (of course, there is a decline constant saled BBOS apps but not as steep). After I examined the Bill, it seems that there is no sale of Indonesia - carrier Indosat and XL Indonesia are missing. However, according to my reports on sales I've done a lot of sales in Indonesia.

    So two options here:

    (1) sales in Indonesia are going through the trade of BB (probably not because the BBCommerce sales report shows not much sales in Indonesia)

    (2) f Bango... ed it upwards again

    Unfortunately, Bango has disabled connection of the seller in the last weeks with the explanation that they are working on a new portal provider as well as the RIM, so I can not yet send a support ticket Bango now.

    Everyone with Bango Indonesia sale missing or it is just me?

    Response of Bango (I removed the numbers):
    ------

    Here are the numbers for the two missing carriers.

    They were taken away from your winnings SBI due to carriers do not pay on time gains. Currently, we talk about them to get delivered payments.

    You will be paid for these, as soon as the payment of the carriers arrived. If this process is more than another payment, we will still pay you the full amount due as soon as the funds were sent.

  • Number with gestures. Am I missing something?

    Hi all, I was experimenting with the sample of gestures of https://github.com/blackberry/NDK-Samples/tree/ndk2/Gesture ... I wanted to do something when a tap gesture were found (some processing and registration for the file...)...

    I noticed that after the treatment, the gestures would stop working...

    I was able to recreate the problem simply by putting a 2 second delay in the section of the tap of the gestures of the Gesturs sample application standard callback function...  I am pasting the main.c below...

    I tried searching in the gesture API on delays documentation or any configuration of the time-out option, but could not find something... am I missing something? How can I recover when it arrives? (of course I could put the personalised treatment in another thread, but I don't need this way, and I don't see why it wouldn't work...). Anyone else having this problem?

    This is the code:

    /*
    * Copyright (c) 2011-2012 Research In Motion Limited.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    #include "input/screen_helpers.h"
    #include "gestures/double_tap.h"
    #include "gestures/pinch.h"
    #include "gestures/set.h"
    #include "gestures/swipe.h"
    #include "gestures/tap.h"
    #include "gestures/two_finger_pan.h"
    
    #define MIN_VIEWPORT_SIZE 128
    #define MAX_VIEWPORT_SIZE 4096
    screen_context_t screen_ctx;
    screen_window_t screen_win;
    static bool shutdown;
    struct gestures_set * set;
    const char* img_path = "app/native/wallpaper.jpg"; /* Relative path to image asset */
    int viewport_pos[2] = { 0, 0 };
    int viewport_size[2] = { 0, 0 };
    int last_touch[2] = { 0, 0 };
    
    /**
     * The callback invoked when a gesture is recognized or updated.
     */
    void
    gesture_callback(gesture_base_t* gesture, mtouch_event_t* event, void* param, int async)
    {
        if (async) {
            fprintf(stderr,"[async] ");
        }
        switch (gesture->type) {
            case GESTURE_TWO_FINGER_PAN: {
                gesture_tfpan_t* tfpan = (gesture_tfpan_t*)gesture;
                fprintf(stderr,"Two finger pan: %d, %d", (tfpan->last_centroid.x - tfpan->centroid.x), (tfpan->last_centroid.y - tfpan->centroid.y));
                if (tfpan->last_centroid.x && tfpan->last_centroid.y) {
                    viewport_pos[0] += (tfpan->last_centroid.x - tfpan->centroid.x) >> 1;
                    viewport_pos[1] += (tfpan->last_centroid.y - tfpan->centroid.y) >> 1;
                }
                break;
            }
            case GESTURE_PINCH: {
                gesture_pinch_t* pinch = (gesture_pinch_t*)gesture;
                fprintf(stderr,"Pinch %d, %d", (pinch->last_distance.x - pinch->distance.x), (pinch->last_distance.y - pinch->distance.y));
    
                int dist_x = pinch->distance.x;
                int dist_y = pinch->distance.y;
                int last_dist_x = pinch->last_distance.x;
                int last_dist_y = pinch->last_distance.y;
    
                int reldist = sqrt((dist_x)*(dist_x) + (dist_y)*(dist_y));
                int last_reldist = sqrt((last_dist_x)*(last_dist_x) + (last_dist_y)*(last_dist_y));
    
                if (reldist && last_reldist) {
                    viewport_size[0] += (last_reldist - reldist) >> 1;
                    viewport_size[1] += (last_reldist - reldist) >> 1;
    
                    /* Size restrictions */
                    if (viewport_size[0] < MIN_VIEWPORT_SIZE) {
                        viewport_size[0] = MIN_VIEWPORT_SIZE;
                    } else if (viewport_size[0] > MAX_VIEWPORT_SIZE) {
                        viewport_size[0] = MAX_VIEWPORT_SIZE;
                    }
                    if (viewport_size[1] < MIN_VIEWPORT_SIZE) {
                        viewport_size[1] = MIN_VIEWPORT_SIZE;
                    } else if (viewport_size[1] > MAX_VIEWPORT_SIZE) {
                        viewport_size[1] = MAX_VIEWPORT_SIZE;
                    }
    
                    /* Zoom into center of image */
                    if (viewport_size[0] > MIN_VIEWPORT_SIZE && viewport_size[1] > MIN_VIEWPORT_SIZE &&
                            viewport_size[0] < MAX_VIEWPORT_SIZE && viewport_size[1] < MAX_VIEWPORT_SIZE) {
                        viewport_pos[0] -= (last_reldist - reldist) >> 2;
                        viewport_pos[1] -= (last_reldist - reldist) >> 2;
                    }
                }
                break;
            }
            case GESTURE_TAP: {
                gesture_tap_t* tap = (gesture_tap_t*)gesture;
                fprintf(stderr,"Tap x:%d y:%d delay 2000",tap->touch_coords.x,tap->touch_coords.y);
                // *** 2 sec delay to reproduce issue ***
                delay(2000);
                break;
            }
            case GESTURE_DOUBLE_TAP: {
                gesture_tap_t* d_tap = (gesture_tap_t*)gesture;
                fprintf(stderr,"Double tap x:%d y:%d", d_tap->touch_coords.x, d_tap->touch_coords.y);
                break;
            }
            default: {
                fprintf(stderr,"Unknown Gesture");
                break;
            }
        }
        fprintf(stderr,"\n");
    }
    
    /**
     * Initialize the gestures sets
     */
    static void
    init_gestures()
    {
        gesture_tap_t* tap;
        gesture_double_tap_t* double_tap;
        set = gestures_set_alloc();
        if (NULL != set) {
            tap = tap_gesture_alloc(NULL, gesture_callback, set);
            double_tap = double_tap_gesture_alloc(NULL, gesture_callback, set);
            tfpan_gesture_alloc(NULL, gesture_callback, set);
            pinch_gesture_alloc(NULL, gesture_callback, set);
        } else {
            fprintf(stderr, "Failed to allocate gestures set\n");
        }
    }
    
    static void
    gestures_cleanup()
    {
        if (NULL != set) {
            gestures_set_free(set);
            set = NULL;
        }
    }
    
    static void
    handle_screen_event(bps_event_t *event)
    {
        int screen_val, rc;
    
        screen_event_t screen_event = screen_event_get_event(event);
        mtouch_event_t mtouch_event;
        rc = screen_get_event_property_iv(screen_event, SCREEN_PROPERTY_TYPE, &screen_val);
        if(screen_val == SCREEN_EVENT_MTOUCH_TOUCH || screen_val == SCREEN_EVENT_MTOUCH_MOVE || screen_val == SCREEN_EVENT_MTOUCH_RELEASE) {
            rc = screen_get_mtouch_event(screen_event, &mtouch_event, 0);
            if (rc) {
                fprintf(stderr, "Error: failed to get mtouch event\n");
            }
            rc = gestures_set_process_event(set, &mtouch_event, NULL);
    
            /* No gesture detected, treat as pan. */
            if (!rc) {
                if (mtouch_event.contact_id == 0) {
                    if(last_touch[0] && last_touch[1]) {
                        fprintf(stderr,"Pan %d %d\n",(last_touch[0] - mtouch_event.x),(last_touch[1] - mtouch_event.y));
                        viewport_pos[0] += (last_touch[0] - mtouch_event.x) >> 1;
                        viewport_pos[1] += (last_touch[1] - mtouch_event.y) >> 1;
                    }
                    last_touch[0] = mtouch_event.x;
                    last_touch[1] = mtouch_event.y;
                }
            }
            if (screen_val == SCREEN_EVENT_MTOUCH_RELEASE) {
                last_touch[0] = 0;
                last_touch[1] = 0;
            }
        }
    }
    
    static void
    handle_navigator_event(bps_event_t *event) {
        switch (bps_event_get_code(event)) {
        case NAVIGATOR_EXIT:
            shutdown = true;
            break;
        }
    }
    
    static void
    handle_events()
    {
        int rc, domain;
        bool has_events = true;
    
        while(has_events) {
            bps_event_t *event = NULL;
            rc = bps_get_event(&event, 50);
            assert(rc == BPS_SUCCESS);
            if (event) {
                domain = bps_event_get_domain(event);
                if (domain == navigator_get_domain()) {
                    handle_navigator_event(event);
                } else if (domain == screen_get_domain()) {
                    handle_screen_event(event);
                    /* Re-draw the screen after a screen event */
                    screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_SOURCE_POSITION , viewport_pos);
                    screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_SOURCE_SIZE , viewport_size);
                    screen_flush_context(screen_ctx,0);
                }
            } else {
                has_events = false;
            }
    
        }
    }
    
    static int decode_setup(uintptr_t data, img_t *img, unsigned flags)
    {
        screen_window_t screen_win = (screen_window_t)data;
        screen_buffer_t screen_buf;
        int size[2];
    
        size[0] = img->w;
        size[1] = img->h;
        screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_BUFFER_SIZE, size);
        screen_create_window_buffers(screen_win, 1);
    
        screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void **)&screen_buf);
        screen_get_buffer_property_pv(screen_buf, SCREEN_PROPERTY_POINTER, (void **)&img->access.direct.data);
        screen_get_buffer_property_iv(screen_buf, SCREEN_PROPERTY_STRIDE, (int *)&img->access.direct.stride);
    
        img->flags |= IMG_DIRECT;
        return IMG_ERR_OK;
    }
    
    static void decode_abort(uintptr_t data, img_t *img)
    {
        screen_window_t screen_win = (screen_window_t)data;
        screen_destroy_window_buffers(screen_win);
    }
    
    int
    load_image(screen_window_t screen_win, const char *path)
    {
        img_decode_callouts_t callouts;
        img_lib_t ilib = NULL;
        img_t img;
        int rc;
    
        rc = img_lib_attach(&ilib);
        if (rc != IMG_ERR_OK) {
            return -1;
        }
    
        memset(&img, 0, sizeof(img));
        img.flags |= IMG_FORMAT;
        img.format = IMG_FMT_PKLE_XRGB8888;
    
        memset(&callouts, 0, sizeof(callouts));
        callouts.setup_f = decode_setup;
        callouts.abort_f = decode_abort;
        callouts.data = (uintptr_t)screen_win;
    
        rc = img_load_file(ilib, path, &callouts, &img);
        img_lib_detach(ilib);
    
        return rc == IMG_ERR_OK ? 0 : -1;
    }
    
    int
    main(int argc, char **argv)
    {
        const int usage = SCREEN_USAGE_WRITE;
    
        screen_buffer_t screen_buf = NULL;
        int rect[4] = { 0, 0, 0, 0 };
    
        /* Setup the window */
        screen_create_context(&screen_ctx, 0);
        screen_create_window(&screen_win, screen_ctx);
        screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage);
    
        load_image(screen_win, img_path);
    
        screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void **)&screen_buf);
        screen_get_window_property_iv(screen_win, SCREEN_PROPERTY_BUFFER_SIZE, rect+2);
        viewport_size[0] = rect[2];
        viewport_size[1] = rect[3];
        screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_SOURCE_SIZE , viewport_size);
    
        screen_post_window(screen_win, screen_buf, 1, rect, 0);
    
        init_gestures();
    
        /* Signal bps library that navigator and screen events will be requested */
        bps_initialize();
        screen_request_events(screen_ctx);
        navigator_request_events(0);
    
        while (!shutdown) {
            /* Handle user input */
            handle_events();
        }
    
        /* Clean up */
        gestures_cleanup();
        screen_stop_events(screen_ctx);
        bps_shutdown();
        screen_destroy_window(screen_win);
        screen_destroy_context(screen_ctx);
        return 0;
    }
    

    Yes, when I run the code above I get the same problem.  It seems that the two finger gestures and pinching are fly events and not 'fault', so that it goes to the tap gesture.  If I rearrange the gesture_allocs to this

    _tfpan = tfpan_gesture_alloc (& tfparams, cb, _gest_set);
    _pinch = pinch_gesture_alloc (& pinparams, cb, _gest_set);
    _double_tap = double_tap_gesture_alloc (& dtparams, cb, _gest_set);
    _tap = tap_gesture_alloc (& tparams, cb, _gest_set);

    This works.  But the double tap does not work, probably because it takes 2 pressures, and to know that you have only 1 tap must wait or get an idle screen event.  In this case, I guess you could buffer events and use gestures_set_process_event_list with the functions in event_list.h

    https://developer.BlackBerry.com/native/reference/BB10/com.QNX.doc.gestures.lib_ref/topic/about_even...

    In addition, time of the event is the time of the real event, not when you have received the event with bps_get_event.  Any delay should not affect the treatment of the gesture.

  • How to set the preprocessor constants

    I have Eclipse 3.5, a.k.a Galileo, build 20100218-1602. I also have the BlackBerry Java plug-in 1.1.2.201004161203 - 16.

    When I go to project-> properties-> BlackBerry project, I see only this:

    Documentation and other posts on this forum, I have reason to believe that I should see several tabs, among which will be a field allowing me to define constants using the preprocessor.

    I am mistaken in my belief? If so, how can I see the missing tabs?

    (And until someone says downgrade to Eclipse 3.4.2 can't do for two reasons: (1) the BlackBerry_JDE_PluginFull_1.1.2.201004161203 - 16.exe 368 MB Installer refuses to install on anything less than Eclipse 3.5.0 and URL of BlackBerry (2) for Eclipse update is broken at the moment, so I don't think that there is a way for users of Eclipse 3.4 to walk on BlackBerry development for the moment.)

    Double-click on the BlackBerry_App_Descriptor.xml file and click on generate.

    On your bottom on the left, you will see constant pre-defined as well as add new power.

  • ExtendScript Find() methods - Constant FS_FindCustomizationFlags

    Hello

    While trying to find operations with ExtendScript, FM2015, I find that documented for FS_FindCustomizationFlags constants do not solve. The doc:

    Constant.FS_FindCustomizationFlags (15) - an optional parameter of type FT_Integer, which can be one of the bit following flags OR'ed together:

    • Constants.FF_FIND_CONSIDER_CASE (0x01)

    • Constants.FF_FIND_WHOLE_WORD (0x02)

    • Constants.FF_FIND_USE_WILDCARDS (0x04)

    • Constants.FF_FIND_BACKWARDS (0x08)

    For example, this makes just "undefined":

    Alert(constants.) FF_FIND_CONSIDER_CASE);

    I worked around it by specifying the hexadecimal integer directly, but I wonder if Miss me just something. And FWIW, I hustled initially present looking for a way to search with regular expressions. I found this in the fapidefs.h FDK file, which fortunately allowed me to operate:

    #define FF_FIND_USE_REGEX((IntT) 0x10)

    Russ

    Hi Russ,

    This bug has been fixed with update 3 (Ref # 4102169).

    But I don't know if FM 10, 11 or 12 is affected.

    Klaus

  • Missing files and cannot locate the files?

    I am just a beginner so please be gentle with me.

    I have been coming to grips with this excellent program and have my RAW recorded on an external hard drive images. (PC with W ) indows 10, current version of LR CC). Everything went very well, except that the overnight something happened and I am at a loss.

    Earlier I started LR CC one nd was met with "Missing Photo" in the library, and "the folder cannot be found" to develop. I checked the hard drive and everything is right where I left and I have had no warning on closing program.

    Nothing has changed about places, I mp o rts or anything else.

    Suggestions please?

    Under Windows, the most troubling problem with external drives is that the drive letters tend to change at any time. And Lightroom expect those to stay constant (sic). But if you work on a laptop AND a desktop computer, have a mobile disk is the best solution to go.

    I attribute my external hard drive, a drive letter that is high enough so that Windows does not allocate it to a stick USB memory or disk of some external one that got connected before. Very 'bad' are these '11 in one' card readers. They tend to allocate a bunch of both drive letters.

    There is also a possibility to join a drive to a path in your current as directory tree:

    ...------name\My Documents\My Pictures\Photos.

    in this case, Photos must be an empty directory. The disc then works as an extension to this path. Instead of Y:\... you have access to your data at Photos\...

    More can be found here: assign a mount point on a drive folder path

  • Missing audio in mp4 AAC made the files in watched folders

    With the help of 2014.2 encoding for the mp4 file coding in 4 different resolutions

    2 different HW systems - Windows 8.1 64, Intel i7, SSD, Nvidia SLI of GTX 780 x 2

    Records of watched configured with 4 different presets

    About 20 mp4 moved to looked at the file and waited for the caching is done

    After encoding the first 2 or 3 files are OK (in all 4 resolutions), but others have only 1/3 of the audio

    Cache cleared, moved to other video files to disk - no luck, the same problem - blocks, lack 2/3 audio

    This could be linked to the cache.problems?

    Entirely coded files have onle a pair of .pek and .cfa files

    Partial audio encoded files have 4-8 .pek .cfa files with extension _1 _2 _3

    Parameters of the sample source file:

    ==================== General =====================
    Format: MPEG-4
    Format profile: Base Media / Version 2
    Codec Id: mp42
    File size: 1.15 GB
    Duration (in ms): 25 min. 44 sec.
    OverallBitRate_Mode/String: Variable
    Total flow: 6 390 kbit/s

    ===================== Video =====================
    Id                          : 1
    Format: AVC
    Format info: Advanced Video Codec
    Format profile: [email protected]
    Use of CABAC: Yes
    Reframes: 2 pictures
    Settings - The format GOP: M = 4, N = 15
    Codec Id: avc1
    The codec info: Advanced Video Coding
    Duration (in ms): 25 min. 44 sec.
    Rate mode: Constant
    Bitrate: 6 000 Kbps
    Width: 720 pixels
    Height: 576 pixels
    Aspect ratio: 4:3
    Framerate mode: Constant
    Framerate: 25.000 fps
    Standard: PAL
    Colorimetry: YUV
    Colos space: 4:2:0
    Color depth: 8 bit
    Scan type: Progressive
    Bits /(pixel*Frame): 0,579
    Stream size: 1.08 GB (94%)
    Language: English

    ===================== Audio =====================
    Id                          : 2
    Format: AAC
    Format info: Advanced Audio Codec
    Format profile: LC
    Codec Id: 40
    Duration (in ms): 25 min. 44 sec.
    Rate mode: Variable
    Flow rate: 384 Kbps
    Maximum flow: 559 Kbps
    Channels: 2 channels
    ChannelPositions: Front: L R
    Sampling: 48.0 KHz
    Compression_Mode/String: lossy
    Stream size: 70.3 MB (6%)

    Example of setting export file:

    ===================== General =====================
    Format: MPEG-4
    Format profile: Base Media / Version 2
    Codec Id: mp42
    File size: 493 MB
    Duration (in ms): 26 min 14 s
    OverallBitRate_Mode/String: Variable
    Total flow: 2 625 kbit/s
    © TIM: 00:00:00:00
    ©TSC                        : 24
    ©TSZ                        : 1

    ===================== Video =====================
    Id                          : 1
    Format: AVC
    Format info: Advanced Video Codec
    Format profile: [email protected]
    Use of CABAC: Yes
    Reframes: 3 frames
    Settings - The format GOP: M = 3, N = 24
    Codec Id: avc1
    The codec info: Advanced Video Coding
    Duration (in ms): 26 min 14 s
    Source_Duration/String: 26 min. 14 sec.
    Rate mode: Variable
    Bitrate: 2 495 Kbps
    Maximum flow: 3 200 Kbps
    Width: 1 280 pixels
    Height: 720 pixels
    Aspect ratio: 1,944
    DisplayAspectRatio_Original: 1,945
    Framerate mode: Constant
    Framerate: 24,000 IPS
    Standard: PAL
    Colorimetry: YUV
    Colos space: 4:2:0
    Color depth: 8 bit
    Scan type: Progressive
    /(pixel*Frame) bits: 0.113
    Stream size: 468 MB (95%)
    Source_StreamSize/String: 468 MB (95%)
    colour_primaries: BT.709
    transfer_characteristics: BT.709
    matrix_coefficients: BT.709

    ===================== Audio =====================
    Id                          : 2
    Format: AAC
    Format info: Advanced Audio Codec
    Format profile: LC
    Codec Id: 40
    Duration (in ms): 26 min 14 s
    Source_Duration/String: 26 min. 14 sec.
    Rate mode: Variable
    Flow rate: 125 Kbps
    Maximum flow: 200 Kbps
    Channels: 2 channels
    ChannelPositions: Front: L R
    Sampling: 48.0 KHz
    Compression_Mode/String: lossy
    Stream size: 23.5 MB (5%)
    Source_StreamSize/String: 23.5 MB (5%)

    Cannot replicate the same problem with other compressors, as Sorensen Desktop 10

    Which is wrong with Adobe encoder 2014.2?

    Yes, full disc for temporary files is the only cause of audio missing

    Eliminated from the start, but still have the same problem on 2 systems with temporary SSDS (half full after batch catcing)

    Solution that works for me:

    1. open SOUL

    2. move control folder 20-30 files

    3. wait that all catches files (in "Adobe TRAN Files" folder is no file name long temp)

    4. open the file 'Adobe caught files' and run ' name: _1 GOLD name: _2 GOLD name: _3 GOLD name: _4 "about Windows Search. Select all and delete.

    5 clear trash (disc is full very fast)

    6. start encoding

    From my experience, while starting the encoding SOUL create only couple _1 versions of files in batch of 20-30, and so far, all have the sound

Maybe you are looking for