GoodCitizen example Orientation events in Simulator v1

good, someone at - it actually get GoodCitizen to work with landscape/portrait changes in the Simulator?

first of all, I had to add 'true'.

at the helm - descriptor.xml to get even the events of the direction received by the app.

not a promising start for an application 'example '.

If you start the app in landscape mode, then perform an angular upsweep of the lower right

It rotates, but creates a small greyish window on the bottom of the screen and you do not

See the cube rotating.

If you re-coup from lower right, that he returned to landscape mode and things/cube work once again.

If you start the application in portrait mode, the screen is totally black, no small greyish window even.

a blow to turn you receives in a mode of work beautiful landscape.

I put a fprintf (stderr, "surface_width = %d, height=%d\n"...)

in the function resize() and regardless of orientation you * always * get a surface width

of 1024 and a height of 600. It seems wrong to.

Thus, anyone actually get this GoodCitizen be good with orientation in the simulator of the v1?

Good afternoon dnp.

A few notes on your desktop.

1. you seem to have a fairly old version of things. Please go to this URL and download the latest SDK and Simulator

https://bdsc.webapps.BlackBerry.com/native/download/

Your Simulator should be 2.0.0.7971 (BlackBerryPlayBookSimulator-Installer-2.0.0-7971-Win-201202221232.exe) and SDk should be thus 7971 (installer-bbndk-2.0.0-win32-7971-201202171813-201202181253.exe installer).

2. I suppose that you created a GoodCitizen project in the IDE. I ran a quick test like myself and noticed that bar - descriptor.xml has no parameters of a good when a project is created through FDI or downloaded here:

https://bdsc.webapps.BlackBerry.com/native/sampleapps

Yes, thank you very much for this bring to my attention. I contacted the team that is responsible for the maintenance of these places and they will be resolved short of time.

For later use, there are a github repo that has all the native samples. It has all flags necessary bar-descriptor (that this plug in Board is maintained by authors of the actual sample)

https://github.com/BlackBerry/NDK-samples/tree/master/GoodCitizen

For example, to quickly sum things - update your sdk and Simulator, get the GoodCitizen correct out of the github and things will work. Meanwhile, let's fix the IDE samples and devportal.

And let me know if you have problems with this.

Tags: BlackBerry Developers

Similar Questions

  • EventLogger events does not appear in the event log Simulator

    So, I was more than a little frustrated with debugging Widget applications and decided to help me a bit.

    I've created a Widget extension that connects to System.out and the EventLogger BB using:

    Logger.Java:

    public class Logger {}

    public static final String APP_NAME = "AppName";
    public static final long GUID = 0xb50dd37e31148effL;

    public static enableLogging() Sub {}
    If (EventLogger.register (GUID, APP_NAME, EventLogger.VIEWER_STRING)) {}
    out ("recorder active.");
    }
    else {}
    ("EventLogger record has failed.");
    }
    }

    /**
    * Prints System.out and event log (if enabled).
    */
    public static {Sub out (String msg)
    String message = formatMessage (msg);
    System.out.println (message);
    log (message);
    }

    /**
    * Prints in the journal of the events with the ALWAYS_LOG level.
    */
    Public Shared Sub log (String msg) {}
    logEvent (msg, EventLogger.ALWAYS_LOG);
    }

    private public static Sub logEvent (String msg, int level) {}
    If (EventLogger.logEvent (GUID, msg.getBytes ())) {}
    System.out.println ("EventLogger.logEvent succeeded.");
    }
    else {}
    System.out.println ("EventLogger.logEvent failed.");
    }
    }
    ...
    }

    The Widget extension works.  I can not even log JavaScript stuff :

    somewhere in file.js:

    Logger.log ("it is JavaScript!");

    as seen by the Eclipse debug console:

    AppName [2010-09-24 12:01:33.609]: active recorder.
    EventLogger.logEvent succeeded.
    AppName [2010-09-24 12:01:33.625]: it's JavaScript!
    EventLogger.logEvent succeeded.

    RIDDLE ME THIS: WHY are the messages NOT sent to the event log Simulator! (9550 or 9800 > tools > Show Event Log does not show my posts.)

    My frustration with BB Monte.

    -----

    Windows XP 32-bit

    Install Eclipse Version: 3.5.2 version identifier: M20100211-1343

    Version plugin Web blackBerry: 2.0.0.201003191451 - 33

    BlackBerry Java plug-in Version: 1.1.2.201004161203 - 16

    BlackBerry Java SDK Version: 5.0.0.25
    BlackBerry Widget SDK Version: 1.0.0.201003191451 - 126

    6.0.0.141 blackBerry SmartPhone Simulator

    As a new BB developer, imagine my surprise when I discovered that the API of EventLogger BB and the BB Simulator event log were completely foreign.

    It's like they're really trying to confuse us.

  • Get on touch event BB10 Simulator

    IM studying BB10 Webworks. For exl I have this:











    How can I get the event when I touch a div? It's ok when working with web by onclick but with Simulator, I do not know how to get the key events. Can someone help out me, tks so much

    Here is an example page that allows to understand how touch events:

    http://BlackBerry.github.IO/WebWorks-samples/kitchenSink/HTML/browser/touch.html

    On the BlackBerry 10 Simulator, you should expect to see the TouchStart, TouchMove events and touchstart SHOOTING when you interact with the content of the page with the mouse (Note: will also fire the click event).  Make sure that you are listening and managing events of button correctly.

  • Basic structure example-Help event

    Hi all

    I'm programming in Labview for two months... starter... I have a desire to use a structure of the event in my case, so I started with examples and had a problem understanding.

    It's the example, I don't speak labview\examples\general\dynamicevents.llb\dynamicallr for events.vi registry

    (1) the blockdiagram outside can while loop, you please explain the three data entries to the propertis of thrre under the registry event property node?

    (2) why use shift registers to send events to registry in while loop? Why dosent a tunnel works in this case?

    (3) within the structure of event event why do we still include "Event log" property node and how to reference its properties?

    (4) in the while loop, event 1 mouse down event, mouse to the bottom of the property is left free, but moving the mouse was connected to sone refernce, how it works?

    I would be happy if can refer me some books on event structures

    Thank you

    Concerning

    Neo

    NEO6 wrote:

    (1) at the beginning, when I hit the track, that all the events available for the structure of the event in time loop? (If I understand correctly, all of the events associated with the controls on the front panel and move the mouse exists since they are registered outside of the loop. Am I right?)

    Technically, all events are available.  It's just a question of what objects will cause events.  Initially, the mouse event move is registered to a NULL VI.  Since it is not one of those around, the event will not happen.  The mouse upwards and the mouse downwards have associated all the controls on the front panel.  If the mouse went upwards or downwards on a control, the event could trigger.

    NEO6 wrote:

    (2) as well as all the events of pannelcontrol, there are also moving a mouse event is already registered outside the while loop and sent to the structure of the event, but once again in the "Mouse down" event, we again record the event of "moving the mouse" and store in the shift register.  What is the difference between check-in outside loop while and inscription inside the structure of the event "mouse down"?   If registration within a structure of event is the event update already existing or the empty position for the structure of the event?

    We simply update object can cause the event.  Inside the mouse down event, we say that the current VI can cause an event mouse move.

  • Touch examples of events?

    I tried to get the touch events (touchstart, touchmove, touchstart) to work with my animation on board, but so far without success. Anyone has been able to do, and if so, are there examples or code can you tell me? My Google search was in vain until this point.

    Hi Jack!

    This is a key for a simple event drag / drop of a square &:

    I created a red square on the edge, called 'rect', size 140x140px and added the JQuery code on stage (event: CompositionReady):

    SYM. $("rect") .css ({"left margin": "'-70px", "margin-top": "-70px"});

    $(document) .bind ("touchstart touchmove", Function {})

    e.preventDefault ();

    var x = e.originalEvent.touches [0] .pageX;

    var y = e.originalEvent.touches [0] .pageY;

    SYM. $("rect") .css ({top: there, on the left: x});

    });

    Explanation:

    It is to focus the slide, you should always set top of margin and left margin the negative half of the size object

    SYM. $("rect") .css ({"left margin": "'-70px", "margin-top": "-70px"});

    the function starts on the event "touchmove touchstard", that is when you type something (= touchstart) and try to move (= touchmove)

    $(document) .bind ("touchstart touchmove", Function {})

    Disable scrolling by preventing the default behavior of the key

    e.preventDefault ();

    assign to y and variable x the position of your finger, if you keep it pressed

    var x = e.originalEvent.touches [0] .pageX;

    var y = e.originalEvent.touches [0] .pageY;

    attribute to the element with the ID 'rect' x, y coordinates stored in the previous variables

    SYM. $("rect") .css ({top: there, on the left: x});

    });

    To do that I started to learn how to handle the touchevents of this excellent tutorial: http://popdevelop.com/2010/08/touching-the-web/

    You can get the file Edge here: http://www.terredainventare.it/Prova.zip and test the composition with safari mobile here www.terredainventare.it/touch/Prova.html

    I hope this helps!

    Davide

  • PIM/PDAP add example contacts/events

    Hello

    Is there an example of Blackberry which details how to interact with PIM?

    I read online that net.rim.blackberry.api.pim has been replaced by
    NET. RIM. BlackBerry.API.PDAP but impossible to find examples.

    Thank you

    JO

    Will look @ PIMDemo example, as shown in another forum

  • How to test the change of direction on the Simulator event?

    There is an example of change orientation Guide 0.92 development event.

    I add some codes for my application to deal with this event, but I don't know how to test it.

    I find that the return value of Accelerometer.isSupported on the device Simulator is true and simulator of funds, the value is false. But two of them cannot Simulator such an event.

    I know that you can test on IPhone simulator, use of change of direction "Command" + arrow keys.

    Can anyone help?

    Thank you.

    To test or change the orientation of the Simulator make sure that your using the last image of Simulator, then slide upward from the bottom right. (Not of the bezel, instead of part of the screen visible)

  • Reproduction of example of Simulation Interface Toolkit

    Hello everyone,

    trying to replicate the example provided in the Simulation Interface Toolkit - how-to , I am facing an error with LabVIEW 2009.

    I have created a host VI working with the file .mdl Simulink on localhost as Simulation environment that runs smoothly.

    And I can't properly compile the file desired .dll (sinewave.dll) with Simulink and nidll.tlc.

    But if I want to use a cRio-9024 as time real target FPGA-interface I get the following error when I start the host-VI:

    Missing file of Simulation Model

    The sinewave.out simulation file could not lie in the projected paths. Please FTP the file manually to your system in real time.

    The following planned paths do not contain the simulation model:
    C:\ [...] \sinewave_nidll_vxworks_rtw\sinewave.out
    C:\ [...] \sinewave_nidll_rtw\sinewave.out

    >>>

    It's the State of deployment resulting:

    Initializing...
    Calculating dependencies...
    The checking for conflicts. This may take some time...
    Prepare the items for download. This may take some time...
    Deployment NI_FileType.lvlib
    Deployment NI_SIT_util.lvlib
    Deployment NI_LVConfig.lvlib
    Deployment NI_SIT_Replay.lvlib
    Deployment XDNodeRunTimeDep.lvlib
    Deployment NI_SIT_Data Log.lvlib
    Deployment NI_SIT_SITServer.lvlib
    Deployment NI_SIT_driversupportVIs.lvlib
    Deployment NI_SIT_ClientConnMngr.lvlib
    Deployment NI_SIT_sitctls.lvlib
    Deployment sinewave_Driver.lvproj
    Deployment of NO-Mess-Fix(successfully deployed target settings)
    Deployment NI_SIT_Data Log.lvlib:Expand Signal Name.vi (7.85 K)
    Number.VI NI_SIT_Data Log.lvlib:Get group deployment (4.46 K)
    Deployment of Text.vi "BOLD" (11.92 K)
    Deployment whitespace.ctl (2.09 K)
    Deploy the value string Value.vi (5.06 K)
    Deployment of NI_SIT_Replay.lvlib:Wait for Ack.vi (5.50 K)
    Deployment NI_SIT_driversupportVIs.lvlibIT pilot FP Strings.vi (2.31 K)
    Deployment NI_SIT_driversupportVIs.lvlibCommand.ctl Server IT (2.09 K)
    Deployment NI_SIT_Data Log.lvlib:Enable turn off Item.vi LPG (13.12 K)
    Deployment NI_SIT_Data Log.lvliband group probe list is activated (9,54 K) Groups.vi
    Deployment NI_SIT_Data Log.lvliband group probe list active record State.vi (7,41 KB)
    Deployment NI_SIT_driversupportVIs.lvlibcalendar Src.viNI_SIT_driversupportVIs.lvlib ITIT Timing Src.vi loaded with errors on the target and was closed.
    LabVIEW: Unable to load the shared library SIT_TimingInterface.*IT_InitTimingSrc:C on the device target RT.
    LabVIEW: Unable to load the shared library SIT_TimingInterface.*IT_GenerateOneTick:C on the device target RT.
    LabVIEW: Unable to load the shared library SIT_TimingInterface.*IT_ClearTimingSrc:C on the device target RT.
    Deployment of container NO-Mess-Fix
    Completed with errors of deployment

    >>>

    Why should I produce a file called sinewave.out? I don't think that I really need.

    Can someone tell me please how to use the sinewave.dll properly to make it work on my cRio?

    (I don't want to use e/s material and yet, just run the file .dll on the cRio.)

    The best help for would be a description step by step from a VI of work using sinewave.mdl inside LabVIEW with ready to use sinewave.dll.

    I need to examine any document in order to complete this example?

    Thanks for your effort!

    Hi Jan,

    Yes it s a target VxWorks.

    Marco

  • How to listen for events from the Orientation

    In the process, when the events of the display orientation changes I need to do something, but I don't know how to get the change of Orientation event

    Please see this link https://developer.blackberry.com/cascades/documentation/dev/orientation/

  • PhoneGap / app example Cordova not launching by BB10 Simulator

    I am launching a Phonegap "Hello World" example app in the Simulator BB10.

    As much as I fear, everything has been done correctly. The icon sets even on the home screen, but when I run it I get a black screen with the BB 10 logo in the background and it just hangs.

    See photo:

    I changed the 'project.properties' file in the project by adding the IP address of the Simulator and pointing to the SDK software WebWorks BB 10.

    I do not add the password BB 10 Simulator, because as far as I am concerned it is not a.

    I followed all the directions on Apache Cordova heredocumentation.

    Any help would be appreciated!

    Thanks in advance!

    OK, the problem is that I didn't use the default setting for the installation of the SDK. You MUST use the parameter by default when you install the SDK software to:

    / Developer/SDK/Research In Motion/BlackBerry 10 WebWorks SDK 1.0.4.5

  • Dealing with the size of the stage and the different orientations

    I am clearly dense, but I'm looking for examples of how others deal with the need to have apps that funciton in mode landscape or portrait.

    My first effort simply uses a scene from 600 x 600 with automatically guide the true value. It seems to work OK. The app draws, in the center of the screen of the Playbook (Simulator), regardless of the way the screen is oriented. Waste certain properties of the screen, but for my purposes, it doesn't really matter.

    To try to make it easier to deal with some questions I had try to implement new, I tried to make a step in 1024 x 600 with my stuff centered in space. Works very well in the landscape, but when in portrait mode, the app has been reduced to 1024 to the 600 dimension tree. I turned on Noscale for the scene, and now the app is drawn with the scene at the upper left corner then the app is cut on the right side of the screen. Is there a way to make the center of the scene?

    For my next one, I'll probably need to have two settings screen which are used based on direction - guidance on which is easier to deal with?

    I just wanted to mention that I removed the rotation and repositioning of the scene in the event onOrientationChange because I'm sure it was bad and can't remember why I had done this.

    Also, I recommend the mobile controls around on stage resize because when changing the orientation event is called, stage.stageWidth and stage.stageHeight properties have not yet been updated.

    The only uses for the orientation change event that come to mind anime the passage of an orientation towards another and the reorientation of handling maually when you autoOrients set to false.

  • Where can I find examples extracted code?

    Can someone tell me if there is a place where I can find snippets of code and examples demonstrating the use of the NDK API? In particular there at - it a demo app using orientation API events.

    I'm trying to create a Native of ActionScriopt Extension, and to that end, I've implemented a HelloWorld extension. I find the API documentation appropriate for orientation events, but I need help to shorten my learning curve - concrete examples would be very helpful.

    There are many samples available at http://blackberry.github.com/ndk/samples.html (including Geotagging)

  • How to manage the events of bps in Application

    the example shows only the event handling in C, such as dialog box.

    I want to run these events bps in my mainApp.

    I find all bps events are managed by BpsEventDispatcher:rocessBpsEvents().

    These events willnot goto request, someone help?

    int cascades_user_main (int argc, char * argv)
    {
    This is where the server is started.
    App app (argc, argv);

    MainApp App;
    QObject::connect (& app, SIGNAL (aboutToQuit ()), & mainApp, SLOT (onUpdate (()));

    Return Application::exec(); Complete us the transaction started in the constructor of the app and begin the loop of customer events here
    When the loop that you exit the Application deletes the stage that removes all his children (by the rules of qt for children)
    not as nice of course
    }

    Here's a code for me to get GPS-events. Should hopefully be the same for other events.

    https://bdsc.webapps.BlackBerry.com/native/reference/com.QNX.doc.screen.lib_ref/topic/rscreen_get_ev...

        LOG_INFO << "use playbook GPS";
        this->screenOrientation = 0;
        bps_initialize();
        LOG_DEBUG << "initialized";
        if ( geolocation_request_events( 0 ) != BPS_SUCCESS )
        {
            LOG_WARNING << "could not request position: " << strerror( errno );
        }
        else
        {
            LOG_DEBUG << "request geolocation events";
            geolocation_set_period( 1 );
            LOG_INFO << "period 1 sec";
    
            LOG_DEBUG << "request orientation events";
            if ( orientation_request_events( 0 ) != BPS_SUCCESS )
            {
                LOG_WARNING << "could not request orientation: " << strerror( errno );
            }
            /*
               sensor_set_rate( SENSOR_TYPE_MAGNETOMETER, 1*1000*1000 );
               sensor_set_skip_duplicates( SENSOR_TYPE_MAGNETOMETER, true );
               sensor_request_events( SENSOR_TYPE_MAGNETOMETER );
             */
    
            if ( sensor_is_supported( SENSOR_TYPE_AZIMUTH_PITCH_ROLL ) == true )
            {
                // every 500 msec should be enough
                sensor_set_rate( SENSOR_TYPE_AZIMUTH_PITCH_ROLL, 500 * 1000 );
                sensor_set_skip_duplicates( SENSOR_TYPE_AZIMUTH_PITCH_ROLL, true );
                sensor_request_events( SENSOR_TYPE_AZIMUTH_PITCH_ROLL );
            }
            else
            {
                LOG_INFO << "SENSOR_TYPE_AZIMUTH_PITCH_ROLL not supported";
            }
    
            QTimer *playbookTimer = new QTimer();
            connect( playbookTimer, SIGNAL( timeout()), this, SLOT( pollPlaybookLocation()));
            playbookTimer->start( 100 );
            LOG_DEBUG << "playbook timer started";
        }
    
    void GPS::pollPlaybookLocation()
    {
        LOG_DEBUG;
        bps_event_t *event     = NULL;
        int         eventCount = 0;
        bps_get_event( &event, 0 );
        if ( event != NULL )
        {
            while ( event != NULL )
            {
                LOG_DEBUG << "event: " << QString::number( eventCount );
                eventCount++;
                if ( bps_event_get_domain( event ) == geolocation_get_domain())
                {
    
  • When moving in different time zones, how to keep timely events?

    When I put an event in PST at the exact time in which it will happen and then change the time zone, the event moves to another time. I have not shot time zones. Some events move and others keep time. How can I get all the events to keep time?

    Events are created in the time zone that the Mac is currently defined in support of regardless of the time zone setting. When you change the time zone of the Mac, the events will appear to change the time since they will now display the event in the current time zone.

    Allowing the use of zone:

    • Adds a dropdown in the toolbar menu. You use the menu to change the time zone in which include all events. For example, an event for 12:00 Pacific time is shown at 7: 00 GMT.
    • Also allows you to set the time zone for each event. For example, if you set an event at 7: 00 GMT and then choose Pacific Time in the drop-down list in the toolbar, this event is posted at 12:00
  • How to determine the order of execution of the structure of the event

    Hello world

    I have a structure of the event were it contains four events. All the four events a separate buttons to run. Here, three events generates a digital output, remains an event (Finder) should find the order of these three events. For example, three events namely A, B and C. I run events in the order B, C and has. The event finder should find the order of the events previously performed (B, C and A).

    Thanks in advance.


Maybe you are looking for