Event Swipe works in the Simulator, but not on the device

I'm using panels on my 9900 and I have 4 panels that the user will slide back and forth similar functioning BB app world, changing the summary of comments on signs etc..

My expection who was up and down for scanning of touch screen functions and the touchpad has the same function by default, that is to the left and right slide on the screen should also be identical to forehand and left on the block to tack. But it does nothing for the panels when you use the trackpad.

So I replace NavigationMovement and and can see the touchscreen and the track pad to generate a NavigationMovement event with +/-x according to the direction slide. So I'm first puzzled why hit swiping the trackpad on the left and right triggers not the same behavior by hitting swiping left and right on the touch screen.

Accept that as a limitation of the API, I added my own features to NavigationMovement to inject a key event when user left or right on the trackpad moves. As follows:

EventInjector.TouchEvent [] moveEvents = new EventInjector.TouchEvent [7];

moveEvents [0] = new EventInjector.TouchEvent (TouchEvent.MOVE, 420, -1, -1, 60-1);
moveEvents [1] = new EventInjector.TouchEvent (TouchEvent.MOVE, 360, 60,-1, -1, -1);
moveEvents [2] = new EventInjector.TouchEvent (TouchEvent.MOVE, 300, 60,-1, -1, -1);
moveEvents [3] = new EventInjector.TouchEvent (TouchEvent.MOVE, 240, 60,-1, -1, -1);
moveEvents [4] = new EventInjector.TouchEvent (TouchEvent.MOVE, 180, 60,-1, -1, -1);
moveEvents [5] = new EventInjector.TouchEvent (TouchEvent.MOVE, 120, 60,-1, -1, -1);
moveEvents [6] = new EventInjector.TouchEvent (TouchEvent.MOVE, 60, 60,-1, -1, -1);
EventInjector.TouchEvent.injectSwipeGesture (480, 60, moveEvents);

It works perfectly in the Simulator, but on the device, there is no movement at all. So I thought that maybe the touchpad on the Simulator is more sensitive than on the real device, so I added a menu item to perform the injection above. Again, this works perfectly on the Simulator, but nothing on the device.

Has anyone tried this brain left and just before the injection?  Up and down the injection works perfectly on the device.

Have you enabled event injection in request permission settings for your application?  It is disabled by default.  You can do so by going to Options-> Application, select your application and click on change permissions.  You can also request these permissions programmatically using the class ApplicationPermission.

Tags: BlackBerry Developers

Similar Questions

  • Rental app run on the Simulator, but not in real device!

    Hello

    I made a simple application using GPSDemo in JDE, I get altitude, longitude, latitude... I tried in the Simulator (9000) and it worked perfectly.

    But when I put it on my BB (bold 9000), I can't get the location information. I've done some tests and I think it's because the location.isValid () return false!

    I checked the settings of the BB and the GPS is activated.

    Do you know what is the problem? And what can be the solution ?

    Thanks for your help and I apologize if my sentences are strange, I'm French and not very versed in English ^^...

    Ok! I found the solution! The problem wasn't my code, it came from the camera. I had update (outdoor) GPS data in the advanced options because it was the first time I tried to use it.

    And now it works perfectly!

    Thank you for all your help

  • Private opens in the Simulator, but not on the device

    Hello world

    I have a BlackBerry Tour 9630 (4.7.1.61). I'm running the 4.7.0 Simulator in Eclipse.

    Does anyone know why my application would open up a private in the Simulator without problem, but the browser does not open on my real device? I get no error on the device, it just goes to the next screen. I confirmed that the internet works on the device, and I don't see why use only the type of browser BIS would be a problem (I also tried BES).

    Here is my code:

    UiApplication.getUiApplication().invokeLater(new Runnable() {
        public void run() {
    
        BrowserSession session = BrowserLocator
            .createBrowserSession(BrowserLocator.BROWSER_TYPE_BIS);
                if (session != null) {
                    session.displayPage(loginUrl);
                }
    
        AuthorizeScreen authorizeScreen = new AuthorizeScreen();
        UiApplication.getUiApplication().pushScreen(authorizeScreen);
        UiApplication.getUiApplication().popScreen(OAuthScreen.this);
        }
    });
    

    Thank you!

    Thanks for your help.

    The session was to return null. I was able to reproduce this behavior in the simulator using a different type of browser not supported by the service books. Finally, I removed my own BrowserLocator() class (for the call of a certain browser) and replaced by the BrowserSessionFactory() provided in the JDE samples. I now have the browser on the opening device.

    What is the safest Bet, to use the default browser of the device, or use a browser BIS?

    Thank you!

  • OfficeJet 6600. Works as a printer, but not able to start the scanner.

    OfficeJet 6600. Works as a printer, but not able to start the scanner.

    I am facing a strange behaviour of my camera. I tried to find similar problems on the forum, but did not succeed.

    I started it 2 days (near my 5610 old which seems to have problems of aging). I use a Sony VAIO PC, OS Win7-Pro, updated.

    Running the appliance following the instructions of the poster. Presents the installation CD. Wireless net was successful and the screen of the device is to give the corresponding IP address.

    But this IP has realized the configuration SW is not recognized. I tried thousands of times, switching and on different devices (router, printer and pc) in the order required, uninstall and reinstall the device.

    However, despite the property intellectual not recognized the device functioning as a "printer".

    But I need to use it as a scanner.

    Procedure by selecting the "scan to PC" screen of the device (only available as an option) I get the message "to ensure that the feature is turned on" and I am prompted to 'open the printer HP SW,... '. ».

    Go to Windows and by clicking on "HP SCAN" in the HP/HP Officejet 6600 directory I get the a warning window stating "HP Officejet unidentified 6600.

    Can someone, please?

    Thank you in advance.

    Hey,.

    Try this document! A "no computer has detected" or "Connection error" message when scanning for HP Officejet 6600 e-all-in-one and 6700 Premium e-All-in-One Printer Series (H711)

    Have a great day!

  • Stand By worked in XP Home, but not XP Pro SP3 on the same machine

    Stand By worked in XP Home, but not XP Pro SP3 on the same machine.
    How can I get Stand By under XP Pro SP3?

    * title Moose - see http://stlcc.org/SYS/Standby.bmp for the issue.*

    Hi srfpala,

    I suggest that you manually download and install the latest drivers for the graphics card graphics card or computer manufacturer's website and check if it helps.

    How to manage devices in Windows XP

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

    If fails it above step can refer to the article below and try the steps mentioned, check if it helps.

    How to solve the problems of hibernation and standby in Windows XP

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

  • I installed the police of San Francisco system. his work in other applications, but not adobe, Ps and Pr

    I installed the police of San Francisco system. his work in other applications, but not adobe, Ps and Pr
    What... do not know any solution.

    Hello

    Please try to post your query in communities:

    General discussion of Photoshop

    Illustrator

    Premiere Pro

    Kind regards

    Sheena

  • Why the HDR toning work with some pictures, but not for others?  I have CS6.

    I have Photoshop CS6 and when I go to HDR toning, it is only highlighted for work with some photos, but not others, why?  Thank you.

    HDR toning does not work with CMYK images. Change the RGB color mode, and then you will be able to use HDR toning. It also works with the color to grayscale mode.

  • I changed my apple ID password. I restarted my computer and my iphone. My new password works with my laptop, but not my iphone.

    I changed my apple ID password. I restarted my laptop and my iphone. My new password works on my laptop but not on my iphone, I can't update my applications.

    iowaoma wrote:

    I changed my apple ID password. I restarted my laptop and my iphone. My new password works on my laptop but not on my iphone, I can't update my applications.

    Apps are tied to apple id and password that was used to download/purchase it.

    Try your old password and see if you can update or not.

  • Make HttpConnection work on the device

    Hello

    I have a java program that uses a HttpConnection (in the main thread). It works quite well on the Simulator, but when I run it on my device (8310 Curve), she just do nothing! Even after asking to allow the application to make http connections.

    I hear some APN settings to configure on the device. I did it too ("airtelgprs.com" with name of user and password blank for Airtel, India).

    Is there something else that does not leave my request to make http connections? Can someone please tell me what all I should do tomake my http connections work on the device?

    Thank you

    -Arun

    This means that you can perform a blocking i/o operation, as an HTTP connection, thread in your event management program. You must create a worker thread to manage the operations of HTTP connection.

  • I am trying to send my photos from my phone to my computer, but not properly installed device driver appears.

    I am trying to send my photos from my phone to my computer, but not properly installed device driver appears.  My question is what should I do to upload my pictures?

    Hello

    What brand / model of the phone?

    You try to connect the phone to the computer wired or wireless?

    Try the methods provided and see if it helps.

    Method 1:
    Check out the link and follow the steps.

    Connect to Bluetooth and other wireless or network devices
    http://Windows.Microsoft.com/en-us/Windows7/connect-to-Bluetooth-and-other-wireless-or-network-devices

    Method 2:
    Check out the link and follow the steps to install the drivers for the device.

    Update drivers: recommended links
    http://Windows.Microsoft.com/en-us/Windows7/update-drivers-recommended-links

    You can also check this link for more information.
     
    Method 3:
    You can also visit this link and follow the steps.
     
    What to do when a device is not installed correctly
     
  • What happens if I want to just pictures of my phone stored in icloud, but not my other devices?

    What happens if I want to just pictures of my phone stored in icloud, but not my other devices?

    Hello Lisa,.

    You can get more help if you posted in the forum to iCloud.

  • Adobe Premiere Elements doesn't recognize my camcorder - Canon GL-2.  Can I make it work?  The device worked very well with my old computer (just died) and an older version of Premiere Pro. Any suggestions?

    Adobe Premiere Elements doesn't recognize my camcorder - Canon GL-2.  Can I make it work?  The device worked very well with my old computer (just died) and an older version of Premiere Pro. Any suggestions?

    Version 13 capture is more than one camera to tape

    http://helpx.Adobe.com/premiere-elements/KB/removed-features-formats-elements.html

  • my world event working on the Simulator, but not on the device

    Hi guys,.

    I'm using BB bold 9000. I have attached directly to the device and debugging. I'm getting "background switch detected for myapp (261) that does NOT have the tunnels open - defocus is NOT called" on the device debugging. but it works fine on the Simulator (my ultimate task is slaughtering an application from another application) any idea?

    Thank you

    Thank you guys, it's worked.

  • GPS works on the Simulator, but not on phone

    Hello

    I created a simple application that gets the location of the device's GPS. The app works perfectly on the Simulator, but I have no GPS updates on the phone. I've been in options-> device-> Location.Settings on the phone and can see the GPS updates are coming through. But the app says there is no valid received GPS.

    I tried it on BlackBerry 9800... All I get on the phone is 'pending GPS update', that my app is displayed if no valid GPS don't trouble is received.

    Thanks in advance.

    Kevin

    C criteria = newCriteria();

    c.setHorizontalAccuracy (Criteria.NO_REQUIREMENT);

    c.setVerticalAccuracy (Criteria.NO_REQUIREMENT);

    c.setCostAllowed (true);

    c.setPreferredPowerConsumption (Criteria.POWER_USAGE_HIGH);

    LocationProvider lp;

    Try

    {

    LP = LocationProvider.getInstance (c);

    if (lp! = null)

    {

    lp.getLocation (timeout);

    lp.setLocationListener (newMyLocationListener(),-1, 1, 1);

    }

    on the other

    {

    Dialog.Alert ("sorry - your phone does not support GPS");

    }

    }

    catch (Exception e)

    {

    System.

    Err.println (try ());

    }

    }

    private class MyLocationListener implementsLocationListener

    {

    public voidlocationUpdated (LocationProvider provider, a place)

    {

    if (location! = null& location.isValid ())

    {

    QualifiedCoordinates qc = location.getQualifiedCoordinates ();

    Try

    {

    Lat string = Double.toString (qc.getLatitude ());

    String long = Double.toString (qc.getLongitude ());

    UpdateScreen ('place of registration successfully');

    }

    on the other

    {

    UpdateScreen (' Failed to day location ');

    }

    }

    catch (Exception e)

    {

    }

    }

    on the other

    {

    UpdateScreen ("waiting for GPS update");

    }

    }

    public void providerStateChanged (LocationProvider provider, intnewState)

    {

    TODO: If the provider has been disabled, then disable the reporting

    }

    }

    Try the examples of programs that you can find here:

    http://supportforums.BlackBerry.com/T5/Java-development/BBM-shareContent/m-p/1796237#M203486

    or here:

    http://supportforums.BlackBerry.com/T5/Java-development/simple-location-API/Ta-p/1145951

    See if these work on the unit.  If they do, look at the code listed and compare with yours.

  • GPS location works Simulator, but does not work in the device

    Hi all,

    I have problem with GPS location.

    I have the button through which I can get the latitude and longitude in Simulator via LocationProvider class.

    His work very well in the Simulator, but giving is not the result in the unit.

    I use Storm 9530 devices and curve 8830.

    Thank you

    Valter

    Thanks for your support,

    Finally, I found my location.

    The steps are:

    As a first step BBDeveloper mentioned

    Options of-> advanced-> GPS Options

    Now,.

    Start the application maps

    Select Menu-> start the GPS Navigation

    or

    Find the location-> where I am

    It will activate the GPS.

    Thank you and best regards,

    Valter

Maybe you are looking for