Camera and ForeignWindow closing eachother in Cascades

Hi guys,.

I build an app with a photo overlay OpenGL in stunts, so the camera is in the qml file. Problem is that whenever I have start the foreign window, shut the camera and lights not again. Any ideas how to solve this problem? I have attached my code below:

import bb.cascades 1.0
import bb.multimedia 1.0
import bb.cascades.multimedia 1.0

Page {
    // Main Container
    property bool takingphoto
    content: Container {
        Camera {
            id: camera1
            property variant supCameras
            attachedObjects: [
                // Required to play the shutter sound.
                SystemSound {
                    id: shutterSound
                    sound: SystemSound.CameraShutterEvent
                },

                CameraSettings {
                    id: settings
                }
            ]

            // Find a supported camera unit and open the camera.
            onCreationCompleted: {
                supCameras = camera1.supportedCameras;

                // Check to see if your app has access to the camera.
                if (supCameras.length == 0 || supCameras[0] == CameraUnit.None) {
                    // Report: "No camera units are accessible."
                    console.log("No camera units are accessible");
                } else if (supCameras[0] == CameraUnit.Rear || supCameras[1] == CameraUnit.Rear) {
                    console.log("The rear camera unit is accessible.");
                    camera1.open(CameraUnit.Rear);
                } else if (supCameras[0] == CameraUnit.Front || supCameras[1] == CameraUnit.Front) {
                    console.log("The front camera unit is accessible.");
                    camera1.open(CameraUnit.Front);
                } else {
                    // Report unknown error.
                }
            }

            onTouch: {
                if (takingphoto == false) {
                    takingphoto = true;
                    // Take a photo, and automatically
                    // save it to the file system.
                    camera1.capturePhoto();
                }
            }

            onCameraOpened: {
                // When the camera is open, start the viewfinder.
                camera1.startViewfinder();
            }

            onViewfinderStarted: {
                takingphoto = false;
            }

            // In many countries the law requires that a shutter-sound be played
            // when an app is taking pictures. Further, if you're planning on
            // submitting your app to BlackBerry World, then it's required that
            // it must play the shutter sound when taking photos.

            onShutterFired: {
                shutterSound.play();
            }

            onPhotoSaved: {
                takingphoto = false;
            }
            }
        ForeignWindowControl {
            id: myForeignWindow
            objectName: "myForeignWindow"

            // The window is not visible at launch
            visible: false
            layoutProperties: AbsoluteLayoutProperties {
                positionX: 0
                positionY: 0
            }
            preferredWidth: 1280.0
            preferredHeight: 768.0
        }
        }

        actions: [
            ActionItem {
                title: "Camera"
                onTriggered: {
                    if (takingphoto = false) {
                        takingphoto = true;
                    }
                    camera1.capturePhoto();
                }
                ActionBar.placement: ActionBarPlacement.OnBar
            },
            ActionItem {
            property bool started
            title: "Plums"
             onTriggered: {
                if (triggered) {
                    if(!started) {
                    // TV is on so show glow effect and make the window visible.
                    foreignWindowApp.tvPower(true);
                    myForeignWindow.visible = true;
                    started = true
                } else {
                    // TV is off so turn off glow effect and make the window not visible
                    foreignWindowApp.tvPower(false);
                    myForeignWindow.visible = false;
                    started = false;
                    }
            }
            }
            ActionBar.placement: ActionBarPlacement.OnBar
        }

    ]

}

Problem solved, it turns out that the camera did not close, the foreign window has been made just above him. Then change the order allowed me to solve.

Tags: BlackBerry Developers

Similar Questions

  • I accidentally closed my Panel "camera and a microphone ' in character animator.  How to re - open this Panel?

    I accidentally closed my ' Panel of camera and microphone ' to host character.  How to re - open this Panel?

    Click on window/camera and a Microphone to reopen.

    Or Ctrl + F7 on Windows, Cmd + F7 on Mac?

  • Can't print Photosmart C5280. Error "object GPCore COM has stopped working and was closed".

    I have problems printing my Photosmart C5280 All-in-one on my desktop of Windows Vista 32-bit. I felt for a few years and have only recently met this issue. A few months ago, I set up a home network so I could print from my Toshiba laptop. The printer is connected to the computer via a USB cable and the laptop is connected via a Bigpond Modem/Router which is connected to the desktop via an ethernet cable. More recently, I have also configured for my son to be able to print from his HP laptop. Initially, we were able to print from any computer. The two paltops are running Windows 7 64 bit. However, in recent weeks, we noticed that we were no longer able to print from a laptop, and a few days ago, I was unable to print from the office. When I try to print from the office, the print job seems to go to the print queue, but is then removed from the queue. I then get an error message

    "GPCore COM object has stopped working and was closed".


    This applies to all applications even the test print. I just went through the steps on the HP site, including downloading and execution of printing HP troubleshooting and doctor Scan and uninstall then reinstall the printer. I'm a bit of a novice at the side Computer Hardware and wonder if there is anyone out there who has had a similar problem and found a solution. Any thoughts would be appreciated.

    Hello MikeF48,

    Sometimes to do a simple uninstallation / reinstallation is not do the trick, and we try to remove all the software from the computer completely. Most of the drivers available at HP have a scrubber utility that removes all traces of the software on the computer and allows you to reinstall the software fresh. We should start there and see if that gets us running.

    I recommend you to do all this on the Vista machine. Once we have a working computer we can then pass from there to other laptops.

    Here are the instructions to use the tool of the scrubber. There are two sets of instructions, one for if you have installed the drivers from the HP website or if you have installed the drivers from the CD that came with your printer. Follow the instructions for your installation accordingly.

    Of the Original installation CD:
    1. Insert the CD in the drive and then cancel Setup
    2. open my computer and click right then on the CD from the drive and select open
    3 open the Util folder
    4 open the CCC folder
    5. If you have an HP computer, run the L3uninstall.bat. If you have a computer not HP, run the L4uninstall.bat
    6. once the uninstall is complete, restart the computer
    7 run the Accessories\ System Tools Disk Cleanup
    8. download and install the latest version of Adobe flash player
    http://get.Adobe.com/flashplayer/
    9 download drivers and full software features
    Software & Driver Downloads - HP Photosmart C5280 All-in-One Printer - Vista
    10. run the download to reinstall the printer

    If the software has been downloaded and extracted to your system:
    1. type % temp % in the field of race
    2. Locate and open the folder starting with 7z (example: 7zS2356)
    3 open the Util folder
    4 open the CCC folder
    5. If you have an HP computer, run the L3uninstall.bat. If you have a computer not HP, run the L4uninstall.bat
    6. once the uninstall is complete, restart the computer
    7 run the Accessories\ System Tools Disk Cleanup
    8. download and install the latest version of Adobe flash player
    http://get.Adobe.com/flashplayer/
    9 download drivers and full software features
    Software & Driver Downloads - HP Photosmart C5280 All-in-One Printer - Vista
    10. run the download to reinstall the printer

    After having uninstalled the software and did a reinstall of fees. Let me know if the problem is still the Outlander.

  • Desktop Window Manager has stopped working and was closed

    One of our machines (HP Pavilion dv7 Notebook PC running Windows Vista x 64) will receive the error "Desktop Window Manager has stopped working and was closed" with lots of close error. He reappears (as well as all windows flasher to non-aero, then back to aero) in a few minutes, spends about 5 times per hour.

    I did some research on this and have already taken the following measures without a bit of luck:

    1 run the command chkdsk / SFC scan - nothing found via chkdsk, SFC found some issues fixed, and some, it did not set. Them that it solves not all related to Windows Sidebar, which I do not / does not start.

    2. put updated drivers for ATI Radeon 3200HD - this had a lot of new questions. Installing caused newer drivers ATI catalyst to no longer work with errors during installation and popup errors at startup. After trying several solutions workaround to try to get installed it, I ended up coming back to the driver that came with the laptop, that are properly installed and working without error. I am skeptical of update of this stable driver as a solution to the dwm.exe error.

    3. this problem just started yesterday, that occur with not a lot of changes. Other than updates of windows (I think that .NET framework and a few other updates installed), I replaced NOD32 antivirus with Bitdefender antivirus. The system was stable with bitdefender for about 2 weeks, so I'm not convinced that this program is causing the error.

    4. the event viewer shows the following:

    Failing application Dwm.exe, version 6.0.6002.18005, time stamp 0x49e02696, failed module ntdll.dll, version 6.0.6002.18881, time stamp 0x51da3d16, exception code 0 x 80000003, offset 0x00000000000461f0, process id 0 x 124 error, start the application time 0x01cea0365a457adc.

    Offset, process id and start on time all vary, but there are a lot of these application errors in the viewer all screaming Dwm.exe like the failing application.

    What should be my next course of action?

    You do not receive an error but a caveat. NTStatus results (the set of codes execption used by ntdll - the failed module) begin to 0 for no error, 4 for information (you should never see this), 8 for putting guard and C for error.

    It's your specific error.

    //
    MessageId: STATUS_BREAKPOINT
    //
    MessageText:
    //
    EXCEPTION {}
    Breakpoint
    A breakpoint has been reached.
    //
    #define STATUS_BREAKPOINT ((NTSTATUS) 0x80000003L) / / winnt

    Problem is, you shouldn't have breakpoints. Breakpoints are set by debuggers and stop the execution of the program to the State of the program can be examined. There should be no breakpoints in a retail system. More breakpoints are inserted into memory during execution of the program in a debugger. They tend not to do in the actual file.

    So here are two assumptions, either you have no exit code, IE test code (driver?). Or you have a running program that behaves like a debugger (which is suspect).

    Each of the three towers of programs, services, and drivers in increasing amounts. So restrict the possible culprits.

    Clean boot

    Click Start - all programs - Accessories - run and type
     
    msconfig
    
     
    Then go to the Startup tab uncheck everything. Then go to the Services tab check hide all Microsoft Services and uncheck everything that is left.

     
    Reset. If this resolves your wake problem ½ of services / of startup items until you find that one.

    Tip clean boot

    If the above does not help.

    Download Autoruns http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx

    Start the program by right-clicking and choosing run as administrator and click on the menu Options - Filter Options and check hide Microsoft entries and disable include the empty slots. Uncheck the box just to the left.

    Reset. If this resolves your wake problem half of the items until you find the one that.

    Safe mode

    If the above does not help.

    Click Start - all programs - Accessories - run and type
     
    msconfig
    
     
    Go to the Startup tab, and then click Start. Reset. Come back here and uncheck the box secure start to return to normal mode.

  • Microsoft windows search indexer stopped working and was closed - need help please

    I started getting this message

    Microsoft windows search indexing has stopped working and was closed
    today
    I deleted the files as described in other threads
    I tried to restore the index - which has not worked
    the sfc/scannow gets to 78% and then I get an error log - I can't open the newspaper - I do not have permission
    What should I do?
    my computer came pre-loaded with vista, so I did not install CD

    Hello

    Download and install Windows Search 4.0 and see if it helps.

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=14850

    Hope this information helps.

  • The SystemSettings.exe version 6.2.9200.16384 program ceased to interact with Windows and was closed

    Original title: can someone please help me Dell can not... The SystemSettings.exe version 6.2.9200.16384 program ceased to interact with Windows and was closed.

    Here is what I get when I try to download the Dell digital program.  I also can't use it either on the site to check my phone and nobody at Dell know what to do...

    The SystemSettings.exe version 6.2.9200.16384 program ceased to interact with Windows and was closed. To see if there is more information about the problem, check the history of the problem in the control panel of the center of the Action.

    Process ID: cd8

    Start time: 01ce962cbf318c8a

    The termination time: 10

    Application path: C:\Windows\ImmersiveControlPanel\SystemSettings.exe

    Report ID: f1125230-0221-11e3-be6b-84a6c8d081a7

    Failed package name: windows.immersivecontrolpanel_6.2.0.0_neutral_neutral_cw5n1h2txyewy

    Flaws in the application related to a package ID: microsoft.windows.immersivecontrolpanel

     

     

    my laptop did not work properly since I got back from dell.  I also can't do a refresh of ore a reinstall then please to do not recommend do not.  I tried a clean to stall the disc, nothing... Help me please.

    Malinda

    Malinda,

    Try to create a media disc by following the steps in http://windows.microsoft.com/en-us/windows-8/create-reset-refresh-media

    If the problem persists, try to perform a refresh and check if that helps.

    Note: The applications that came with your PC or you installed on Windows Store will be reinstalled, but all the apps you have installed other Web sites and DVD is deleted. Windows puts a list of applications on your desktop after you refresh your PC.

    Let us know the results.

  • Adobe Photo Downloader has encountered a problem and needs to close. We are sorry for the inconvenience.  Error code: c0000005 address: 76f73ac3 I clicked the OK button and the closed Downloader.     I then tried to download from the Organizer. I have

    Photoshop Elements 12

    Adobe Photo Downloader has encountered a problem and needs to close. We are sorry for the inconvenience.

    Error code: c0000005

    Address: 75e32f71

    I clicked on the OK button and the closed Downloader.

    I did a search on this (c0000005) error code and it seems to be a work around, but no solutions, why is this? I ask that because that this problem seems to be years and years, dating back to at least 2005 (math is 10 years do).

    I don't even have the hanging camera and I get this error on download.  I have redownloaded everything and reinstalled.  I allso see AVI issues reported with this problem, so I've updated Quicktime that without the camera being hung when I get this error I wasn't expecting it to work.  I tried to support and they would not help because I bought it in March this year.  Quite frustrating because I bought elements about every 2 years.  I think I might need a new codec?   I had this problem on an earlier version and I think I remember that being the fix, but it may be something completely different

    Finally, I found it lacking a photo so the catalogue was "corrupted".  I just deleted the image and it started working.

    I hate Adobe and their total lack of support - thanks for nothing Adobe.  Also get this - they offered me to upgrade to 13.0 (12.0 My is only 6 months old but they still can't stand on errors.  Install only the errors!

    I've upgraded and buy this product 4 times now.  I'll find something else next time!

  • 6 s iPhone camera and flashlight does not work

    Help! My iPhone 6s camera and a flashlight do not work.

    I tried forcing him to leave the app, reboot, reset the phone using the home and power buttons, but nothing has worked. I just get a black screen. I can't use the camera front, no more.

    Other ways to solve the problems?

    Try below:

    Restore backup

    Restore like new

    http://support.Apple.com/en-us/HT201252

    If no joy, taking a go-bar genius with Apple for an assessment,

  • I have a Sony E-Reader. Can I transfer books from my library of books I have on my Sony camera and similarly in my library of books I have on my Sony camera?

    I have a Sony E-Reader. Can I transfer books from my library of books I have on my Sony camera and likewise my Sony camera to my library of books I?

    I believe that if you open iBooks, you can drag and drop books from your library on the desktop of your Macbook. It will export the books as an Epub file, you can install on your Ereader as you normally would.

    I think that you open your Ereader in Finder and drag and drop it in the folder it. At least this is how I do it on my Kindle.

    Give it a try, see if it works for you also.

    Concession.

  • IPhone 6s - microphone does not work on all applications except camera and calls

    Hey, I don't know exactly know what happened with my phone. Suddenly, my microphone work on LINE, Whatsapp and almost all other applications that use mic. Except, camera and when someone call me on my number.

    But it does not work on whatsapp and LINE calls. And it also does not work when I snapchat. Only works on the default camera Apps and call through my number.

    I tried:

    -restart my phone

    -hard reset and blink? Reset with the power and the "home" button.

    -read the micro support page. Still no solution.

    TL; Dr:

    my microphone does not work on every apps on my phone except calls through number and approx. of default camera it gives you just that silence when I play it on voice notes. But it works when I record yourself using videos on the default camera app.

    Hello Bllacke,

    Thank you for using communities of Apple Support.

    I see from your post, some applications have a problem to access your Microphone. I know how it is important to ensure that your applications have access to the Microphone and can use this feature. I have a few things I want to try.

    First, tap Settings on your iPhone and then scroll to the last section that lists your apps. Select the applications that use the microphone and make sure that the Microphone is activated (green).

    Then, follow the steps in the article below to close these applications:

    Force a nearby application on your iPhone, iPad or iPod touch

    Then, test the microphone in these applications again and see if it works.

    Best regards.

  • What are the permissions of camera and microphone?

    30.0 Firefox.
    I am not referring to a tablet or phone app - I use my laptop.

    Because these permissions are on the Info Page of the sites, what reason would they (any site) need permissions for microphone or camera? I'm in maintaining private as much as possible.
    Along the same vein, I was playing with authorities and had no idea that I could actually blocked my location.
    It's great.

    Thank you.

    You must grant permission to leave the Web sites to access the camera and microphone.

  • Why the android app does want my material contols (camera and audio, etc.)?

    Mozilla said that they are respectful of my privacy, then why do you want to use my camera phone and audio for NO REASON? I want to get away from Google because it is invasive... but what Firefox wants to "permissions" are just as bad. Is it possible to install without this requirement unreasonable?

    Hello

    Please read how we use permissions below

    https://support.Mozilla.org/en-us/KB/how-Firefox-Android-use-permissions-it-requests

    We ask only the camera and the microphone when you opt - in the camera and microphone for the sites that make use of selectively to the WebRTC (see http://www.webrtc.org/). We provide a browser menu dialog drop-down where you can select your camera and microphone. It's only on media that support this feature (which is part of the HTML5 draft specification) for example, https://apprtc.appspot.com

    Hope that clears that up.

  • How to re - activate the functions 'Restore previous Session', "Recently closed tabs" and "Recently closed Windows" in the menu of history?

    For some time, four choices in the restore section (tabs of other devices, Previous Session Restore recently closed tabs and recently closed Windows) have been shaded. Keyboard shortcuts do not work, and didn't undo closed tab in the context menu of the tab.

    I found and tried various patches to do this, including:

    • From Firefox in Mode safe without addons.
    • Firefox reset.
    • Change the values of browser.sessionstore.max_tabs_undo and browser.sessionstore.max_windows_undo in all: config.
    • Check to see if I have a user.js in profile Firefox. (I don't).
    • Verify that the private browsing is not the default mode. (It is not).
    • Create a profile to see if it had the same problem. (He did.)
    • Running anti-malware analysis. (BitDefender and SpyBot).
    • Temporarily disable my anti-virus and anti-malware.

    Any of these solve my problems.

    Other devices tab is grayed out, but I've never used, and it might have previously grayed out.

    The story works in general. Sites I visit are added to the log.

    Preferences are saved correctly when I change them.

    Any advice on how to solve the problem would be much appreciated, as I am very fond of these features and often served until they stopped working.

    ADDITIVE

    After that looking through the list of preferences of change created by the resolution of the problems, I tried now also reset the following text:

    • browser.places.smartBookmarksVersion
    • browser.newtabpage.storageVersion
    • Browser.cache.Disk.Capacity
    • Browser.cache.Disk.smart_size.first_run
    • Browser.cache.Disk.smart_size.use_old_max
    • Browser.cache.Disk.smart_size_cached_value

    The problem persists.

    I finally managed to understand this. In searching the Web, I found a thread detailing a similar problem on the Mozillazine forum. The problem has been identified as a missing browser.sessionstore.enabled set, so I went looking in Subject: config and couldn't find it. After creating the entry, by assigning the value true and restart Firefox, the functions of recovery/recently started working again. Apparently, some bookmark plugins and session-based can cause this problem, but in my case, it must have been something else, that I never had no such plug-ins installed.

    If you have this problem, here's a detailed itinerary of the way I fixed it. Whereas there seems to be several problems that can cause restore/recently functions to stop working, it is not a guaranteed fix, but it is still a thing to try, at least.

    1. Open a new tab or window.
    2. Type of topic: config address in the box and press ENTER.
    3. Read reviews and promise to be careful.
    4. Copy this: browser.sessionstore.enabled - and paste in Subject: config'search box in s. press ENTER.
    5. If you copied the text at the top right, the setting should appear in the list. If it is not the case, you have the same problem, I did. (I would say that you copy/paste the text indicated and only this text before moving on to double check).
    6. If the parameter does not exist, right click on the parameters of the list and choose new-> Boolean. Paste the parameter name that you copied previously in the name box, click OK and then set the Boolean true. Once you have click OK, restart Firefox, and (hopefully) things should work properly again.

    Thanks to everyone who offered help and thoughts!

  • Recent update asking for permission to put on my camera and audio without my knowledge, what then?

    Recent update asking for permission to put on my camera and audio without my knowledge, what then? Does this mean that Big Brother or anyone who can turn my Audio/video and see what I do?

    Firefox will always ask permission each time before the video/audio recording is turned on - then only you can activate it.

    the authorization is used for technologies such as webrtc: https://blog.mozilla.org/blog/2013/09/17/webrtc-now-available-across-mobile-and-desktop-with-new-firefox-for-android-compatibility/

  • On Facebook, the cat came and fixed to the front on the keyboard and now FB is SUPER TINY, help

    I don't know how it happened. My stupid cat came and laid down in front of me, on the keyboard, back bent and suddenly, the web page is teeny tiny. I can't read yet.

    See also:

    Reset the page zoom on pages that cause problems: view > Zoom > reset (Ctrl + 0 (zero); Cmd + 0 on Mac)

Maybe you are looking for

  • My iPhone 6 s deleted all my music

    Hi guys My iPhone 6s deleted all my music last week. Is there a way to get music, because now when I search the songs I had iTunes gives me the opportunity to buy again. I do not use the the iCloud, so I don't think its there. Please help, thanks

  • gs803uar #aba: I can't find recovery

    I can't find recovery for my laptop, my name is HP pavilion DV 6948se and when searching by my product number, which is gs803uar #aba, I received another product name HP pavilion DV 6648se. I can't do recovery or find drivers for 6948se and where to

  • M300 update Bios v1.2 or v1.3?

    I was just downloading a driver for "Call display for external monitor" for my M300 (http://tinyurl.com/7ble8) that mentions this part of the correct action is updated to v1.30 BIOS. However, the update to the newest BIOS listed on the page files dow

  • Y510P issue of parameters power (SLI GT 755 m)

    The other day, I tried to play then on the battery and got terrible frame rates. I got the power settings on maximum Performance. Are there any other settings that I'm missing? Thank you -Phil

  • x4000b

    Hello I have a lenovo ultrabook 8 pro 64-bit windows-based Helix.  The lack of USB ports (I know I could buy a hub), I decided to buy a Bluetooth mouse.  I was in a hurry so bought the HP x4000b mouse.  I have successfully connected to the Tablet, bu