Example Code for HelloCameraApp camera

void HelloCameraApp::onWindowAttached(screen_window_t win,
                                          const QString &group,
                                          const QString &id)
{
    qDebug() << "onWindowAttached: " << win << ", " << group << ", " << id;
    // set screen properties to mirror if this is the front-facing camera
    int i = (mCameraUnit == CAMERA_UNIT_FRONT);
    screen_set_window_property_iv(win, SCREEN_PROPERTY_MIRROR, &i);
    // put the viewfinder window behind the cascades window
    i = -1;
    screen_set_window_property_iv(win, SCREEN_PROPERTY_ZORDER, &i);
#ifdef WORKAROUND_FWC
    // seems we still need a workaround in R9 for a potential race due to
    // ForeignWindowControl updating/flushing the window's properties in
    // parallel with the execution of the onWindowAttached() handler.
    mViewfinderWindow->setVisible(false);
    mViewfinderWindow->setVisible(true);
#endif
}

Hi, the above code was copied from the sample project HelloCameraApp.

The example works fine but I have a question for the code in bold above.

What does it mean by these? Thank you

// seems we still need a workaround in R9 for a potential race due to
    // ForeignWindowControl updating/flushing the window's properties in
    // parallel with the execution of the onWindowAttached() handler

Hello

This means that there is a bug in the 10.0.9 current version of the software for devices where there is a race condition between the update thread libscreen in onWindowAttached() properties and the Cascades UI thread that executes code ForeignWindowControl in parallel.  If I do not include this work around, the window can stay invisible while it explicitly visible value by the thread of Cascades.

I'm still this debugging with the team of Cascades and the graphical team.  For now, workaround in the #ifdef will cause a re-synchronization with the interface user of waterfalls thread.  Once it is fixed, this workaround solution (visibility toggling) won't be necessary.

An alternative would be to say Cascades do not update THE properties of the window by initializing the window with mViewfinderWindow-> setUpdateProperties (0), but then you will have to respond appropriately to all the layout changes and do a manual update of all associated properties libscreen.

See you soon,.

Sean

Tags: BlackBerry Developers

Similar Questions

  • Can we get the source code for the camera?

    Can we get the source code for the camera? Including libraries? CM is great, except that the camera is not well polished, and the quality of the stock ROM Sony are much better.

    probably more likely questions and restrictions of copyright

    inspect the developers space

    http://developer.sonymobile.com/

  • example code for NI9411

    Hello

    I'm looking for a simple example of code for NI9411 (FPGA code and the host). I searched in the examples that come with LabView but I have not achieved anything.

    Thanks in advance.

    Here is an example that you can use with the NOR-9411.  If you are looking for 9401 in the Finder for example of OR, you can also find other examples that were not written for the 9411 specifically, but you can modify it to work with her.

    Brandon Treece

    Technical sales engineer

    National Instruments

  • Examples of Code for the (Simplified) Client software

    After digging through the application of the whole sample RIM provides I thought I want to provide a code for the simplified example. Short opinion: post connection suffix is not allowed on the forums. You can see the sample application of the RIM if you do not already elsewhere. Please see the article here, it's under review if you want to contribute (although the code is mainly in the attached files): http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Simplified-BIS-Push-client-sample...

    the article has been published: http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Simplified-BIS-Push-client-sample...

  • Examples of code for the robot LDAP plugin is missing

    I downloaded and installed ITS 10.1.8 version but the sample code for the robot LDAP plugin isn't the case to find. The "sample" directory is missing. The example of code removed for any reason or is it replaced by something else? We must be able to search an LDAP compatible to v3 for our new dashboard application.

    The document "Secure Connector Software Development Kit" for ITS Version 10.1.6 says the following:
    -Oracle shipped three sample plug-ins that supports analysis, analysis of database table and analysis file LDAP directory.
    -ORACLE SECURE ENTERPRISE SEARCH comes with three sample plug-ins sub $OH/search/sample/agent.

    Yes, samples of tracks were removed in 10.1.8 because they have not been sufficiently tested, or considered good enough to ship.

    However, I have the LDAP robot and I'll be happy to send it to you (STRICTLY no guarantee, of course!) If you leave me an email for roger dot ford at oracle dot com.

  • Request an activation code for Windows due to hardware changes, but nothing has changed. What is going on?

    My computer is request an activation code for Windows due to hardware changes but nothing has changed.  What is going on?  This morning firefox did not and went into the Task Manager to see which processes were underway, then he closed the Explorer.  I think I clicked on it by mistake.  Then turn on now that I get this message.

    Go ahead and try to activate it? (copy is authentic, came on the computer already installed)

    Hi JaneMcDonald,

    Yes, you can go ahead and activate Windows XP, as it could be a possibility that the software license file may have been changed due to some changes.

    How to activate Windows XP

  • Jump to replace jump of blackBerry that I can't buy an unlock code for?

    I have a new Bond that is a telus replacement for a failed unit form, it came without a box and the Appointment #, I tried two different unlock suppliers and can't find a code for me, they tried my service provider and claim to have tried bb, is this common will, it will be a code published in the future for my phone? Thanks in advance for any help

    on a side note, the two unlock companies tried them for a few days before giving me a refund.

    Problem solved, what I had to do was get a person who uses a Telus phone when trying to network to get the unlocked jump, when the first attempt failed blackberry Telus contacted and sent me a code from them, this code has worked, it has more money to a third party, but only by a little money

  • Sample code for creating our application without head in bb10.3 alarm

    Hello

    Can someone pls I mean is possible to create / to invoke the alarm from a user developed application? I want also the app in the background (like the app without a head) and receive timely notification whenever the alarm sounds. Please provide with some samples it ill be very useful.

    Thanks in advance.

    While working on the code for you example, I discovered that SystemDialog cannot be called from headless, so you do not have to depend on NotificationDialog instead.

    Find attached a sample application work that will play a vibrant sound using MediaPlayer and show a NotificationDialog asking if you want to Snooze (for 5 seconds) or disable the alarm.

    The source code is also available here:

    https://github.com/RodgerLeblanc/HeadlessAlarm

  • is there any equivalent code for this?

    Hi, I am doing a project on steganography, but I'm stuck on the bitmap byte array conversion.

    There is no problem for the code to run in the desktop. Is there an equivalent code for the following code in BlackBerry JDE (for OS 5)?

    Private byte [] imageToByte (BufferedImage img)
    {
    WritableRaster raster = img.getRaster ();
    DataBufferByte buffer = (DataBufferByte) raster.getDataBuffer ();
    Return buffer.getData ();
    }

    Review Bitmap getARGB (...) method.

    Here are some examples of documentation of Bitmap code form:

    Original image bitmap =...

    int [] argb = new int [original.getWidth () * () original.getHeight];
    original.getARGB (argb, original.getWidth (), 0, 0, 0, original.getWidth (), original.getHeight ());

  • Group - Here / global attributes required in ASA 9 + code for a Tunnel L2L?

    Hi all

    I have a core ASA that runs 8.04 code, IKE v1 only and do not have group policies for each tunnel IPSec individual L2L defined or applied under the tunnel groups.  However, many of my ASA branch are code ASA 9 +.  When I create a tunnel on a branch of 9 + ASA code in ASDM kernel ASA, ASA automatically configures group policy and apply it to the Group of the tunnel as a general attribute.

    Question: If my heart ASA is not defined or applied to groups-tunnel group strategies, then is the group policy that is automatically created & applied on the branch of 9 + ASA code for this tunnel required? Or is it questionable because the other end is not configured/applied?  If it is questionable, so I want to clean the ASA configs by removing Group Policy, but I assure you it's safe first.

    Example:

    Box office: Code 9 + ASA:

    internal GroupPolicy_50.xxx.xx.190 group strategy
    attributes of Group Policy GroupPolicy_50.xxx.xx.190
    Ikev1 VPN-tunnel-Protocol
    tunnel-group 50.xxx.xx.190 type ipsec-l2l
    tunnel-group 50.xxx.xx.190 General-attributes
    Group - default policy - GroupPolicy_50.xxx.xx.190
    50.xxx.XX.190 group of tunnel ipsec-attributes
    IKEv1 pre-shared-key *.

    Kernel: 8.04 Code ASA:

    tunnel-group 12.xxx.xxx.178 type ipsec-l2l
    12.xxx.xxx.178 group of tunnel ipsec-attributes
    pre-shared-key *.

    You are required to have a site to site and RA VPN also group policy.  However, if you do not set a group policy, the tunnel will default to the default group policy.

    --

    Please do not forget to select a correct answer and rate useful posts

  • Need information of Java code for services

    Hi Experts,

    Can you please give information about where I'll get the Java code for java api services.

    Example: For VisitorManager, where I'm going to get its details information.

    There are also many other api services, then where I will find its detail.

    Thank you

    Ravi

    Following links may help you.

    Sites API Java Docs - https://docs.oracle.com/cd/E29542_01/apirefs.1111/e39356/toc.htm

    Asset API Tutorial - https://docs.oracle.com/cd/E29542_01/doc.1111/e29634/asset_api_tutorial.htm#WBCSD2387

    REST API - https://docs.oracle.com/cd/E29542_01/doc.1111/e35835/wemrestresources.htm#WBCSR354

  • Table for the code for method of payment for the suppliers site

    Hi all, does anyone knows how to get the value for the code for method of payment for the suppliers site in R12.1.3? I don't speak from that in the following path: 1 Paybles responsibility 2. Suppliers 3. Request for a 4 suppliers. Click on details of payment 5. Scroll to supplier Sites and press the update button 6. Note that, for example among the payment methods is checked as default thanks in advance, A.Stoynaov

    Hello

    Please check this note that contains the query:

    Default values for method of payment for providers at the level of the Table (Doc ID 737128.1)

    You can use this query to view the lines for a given provider site:

    SELECT *.

    Of iby_ext_party_pmt_mthds IEPPM

    WHERE IEPPM.ext_pmt_party_id IN

    (SELECT IEP.ext_payee_id

    Of iby_external_payees_all IEP

    WHERE IEP.supplier_site_id IN

    (SELECT APSS.vendor_site_id

    Of ap_supplier_sites_all of the PSA, ap_suppliers APS

    WHERE APS.vendor_id = APSS.vendor_id

    AND APS.vendor_name = '. '

    AND APSS.vendor_site_code = ''));

    Concerning

    Joel Purswani

    Support of Oracle

  • Help-Code for one or more InDesign cannot be generated. (Error 400: font not available).

    Hello

    I have the last Version of Muse in a Mac. Yosemite.

    I have problems when I want to publish my Web site. It appears error 400.  For some reason, the code cannot be generated for Typekit. That s the German version. "Code for one or more InDesign in"Homepage"cannot be generated. (Error 400: font not available).

    Imágenes integradas 1

    A time comes this: publish the view have an error, because the Muse may not have an HTTP connection. It may be a software firewall that does not allow to connect. The main reason may be a software firewall that stops the HTTP connection. Probably you should check the Firewall properties.

    Imágenes integradas 3

    Imágenes integradas 5

    But nothing has changed.

    I did the following things:

    1. I'll raise the app
    2. I disconnect from the creative cloud, leave, reconnect and reopen Muse.
    3. I remove Ghostery.
    4. Muse I uninstalled and re-installed.
    5. Restart the computer.
    6. Try again with a new Web site.
    It's my current antivirus

    Imágenes integradas 4

    Help please! Need to finish a project.

    Looks like you have anti-virus/anti-malware with settings that prevent Muse to connect to internet. Your screenshots are not visible on the forum. They must be inserted using the response within the forum feature in your browser (click the camera icon to add an image).

  • Would like to see the code for a static page generated by Muse

    I'm very comfortable with HTML and CSS and some Javascript and PHP, but I'm curious to see what the code on a page built Muse looks like.

    Thank you very much.

    http://Muse.Adobe.com/ or sites "Site of the Day' linked from there.

    Note that the Muse allows you to insert HTML codes in the head or the body of a page and also supports third-party embedded via widget custom code. Validate sites of Muse. If find you one that doesn't, you are most likely looking at a custom code that has been added to that generated by the Muse. In most cases, you will see comments shouting the custom code or widget.

    If you are a developer, you are looking for something that will generate the code for you to move forward in a text editor, Muse is probably not the right tool for you. But if you are ready to embrace the change of paradigm of work leave within brackets Muse offer (for example MuCOW widgets), rather than take the exit code of Muse and pulling in a text editor, some of the amazing productivity gains and collaborations are possible. This article provides an overview of how a team to Al Jazeera has exploited the skills of journalists, designers and coders to create the site of Beyond the Beach using Muse Prize winner.

  • Colour code for the new HFM 11.1.2.3

    Hi guys,.

    could someone tell me the color code for the new HFM 11.1.2.3 show empty lines in line with the background color. HFM 11.1.1.3 code was #E5EAEF

    See you soon,.

    Lukas

    I don't have the code (or the version that you are on), but I can tell you how to find it.

    Take a screenshot, then open Paint.  Paste it in here and use the eyedropper tool to select the color.  In th etop of law, click edit colors and it should bring up the color with your color editing page preselected.  At the bottom right will be the numbers next to red, green and blue.  Convert numbers in Hex and you'll have your code.

    To use the text of your topic here for example, the numbers are therefore 31, 78, 174.  This becomes 1F, 48, AE.  Put them all with a # in fron and you have #1F48AE.

    You can use this trick to get no matter what color you want out of the system corresponds to the formatting.

Maybe you are looking for

  • Lenovo ThinkPad P50 MXM?

    I was wondering if the GPU is MXM for future reference, because I do I.E. work and sometimes for me, the GPU is broken. And if a or b if possible. New to the Forum and get the P50 soon. I had one years ago, beloved, so when I looking for laptops good

  • RMS / amplitude and phase to the fundamental frequency

    Hi, does anyone know how to find the RMS or amplitude and phase to the fundamental frequency of a signal measured in Labview? I tried with the Analyzer for harmonics of buit - in, but he can't give the values of the phase angle. I also tried the FFT

  • need XP SATA drivers for Pavilion dv5000

    Hello Try to install XP on a DV5000 and I need SATA drivers that I can put on a CD, if I can use the F6 (additional drivers) XP installation process. Thanx

  • How can I convert .lnk back to .exe?

    I tried to open a file by using internet explore and all files are converted into .lnk

  • ICS OTA3 - auto brightness seems to not be working anymore

    Deeply disappointed :-( ICS seems only to introduce new bugs and I couldn't see no advantage so far. Since the update, it seems that the automatic bightness doesn't work anymore. The setting seems OK, but the brightness is constant (and rather low) r