The right way to face the camera and camera on standby?

How one brings the camera back to life after the unit returns to standby mode?  What is the right way to manage the device sleep and wake?  Any help is appreciated.

Hi Sucroid,

I intend to produce a sample that shows this I hope that during the holiday season.

Here is some information that can hopefully help you get started...

When the screen goes to sleep, off camera equipment.  There is nothing you can do about it today, outside of the application one keep awake in your application window. (value SCREEN_PROPERTY_IDLE_MODE SCREEN_IDLE_MODE_KEEP_AWAKE).  Note that this won't save you a user who clicks the power button to force the unit in standby mode.  It will protect you against a situation where your application goes to background or another application requires video resources that are used by the camera.  In these two situations, your application will lose his viewfinder.

But all is not lost!  There are some events of status, you can listen to that lets you know that the camera stops.  You can listen to these events either with an attached status_callback (applied when starting the viewfinder for example), or by authorizing explicitly state the events using camera_enable_status_event() and waiting for impulses of status.  All these things are detailed in the documentation for the API of photo here: http://developer.blackberry.com/native/reference/bb10/com.qnx.doc.camera.lib_ref/topic/overview.html

The corresponding lights events are:

CAMERA_STATUS_RESOURCENOTAVAIL - this event is logged every time that the camera is about to close.  If you have previously called camera_register_resource(), this is the event that listen to you to know that all your camera buffers are about to be démappés - so stop all logic that looks at them and then camera_deregister_resource() camm.  If you do not physically the buffers of viewfinder, then necessarily no need to use this registry/invert mechanism.  It's just there to provide warning and to activate the drivers of the device for you to recognize that it is safe to unamp wait for memory.  Each time the screen goes to sleep, the power button is pressed, or another application has need of resources of the camera, you will get this signal.  If you are curious to know the reason, you can check the 'extra' uint16_t argument in the callback of the situation for one of the camera_powerdownreason_t values.  All video recordings currently active or encodings auto-terminera when this signal is received.

CAMERA_STATUS_POWERDOWN - event status is reported immediately after the hardware of the device is turned off.  You can't interact more with the camera until this condition is removed.  Note that to capture this event, you will need the user of the status of the event-mode (camera_enable_status_event()) interface, because any reminder of status you can have attached when starting the viewfinder will be cleaned up when the viewfinder stops.

CAMERA_STATUS_POWERUP - event status is reported immediately after that camera material is fed up after having previously be put off.  Even not not on using status of event-mode interface (camera_enable_status_event()) applies in this case too.

So, what can you do with this information?

Well, tuned for CAMERA_STATUS_RESOURCENOTAVAIL will tell you when your viewfinder will close.  At this point, your application must enter a State where he is waiting for an event that will wake it again...

In most cases, this is the event browser that indicates your application is active or foreground again (NAVIGATOR_WINDOW_ACTIVE or equivalent).

So when your application is told by browser is it back to the foreground, you can then restart the viewfinder using camera_start_photo_viewfinder() or camera_start_video_viewfinder() according to the requirements of your application.  You will still need to follow the same recipe to start the viewfinder as a cold start your application (for example. Wait for the window of your viewfinder to be filled), but you will not need to reconfigure all the settings.

OK... which covers 99% of the use cases that you will encounter.  Use case for the 1% remaining, you will need to follow for this CAMERA_STATUS_POWERUP event.  Why?  Well, there is a race condition when things down, in which case if the user wakes up the device while the camera is closing (eg. they struck twice in quick succession, the power button), then the camera will enter its off State, but navigator may actually not report your application it becomes idle.  This is because the infrastructure of power management is waiting actually for the material from the camera to the power off until the system goes to sleep.  If the user wakes up the device upward, then this action is canceled, and the unit enters never actually standby.  In this case of corner, navigator does not say your app to become active, again because he never told your application becomes idle.  So what are you doing?  Well, I have 2 suggestions:

  1. You can follow to CAMERA_STATUS_POWERUP using the event interface mode for the camera equipment.  It's actually the more correct approach and what we are doing internally with the BB10 camera App.
  2. You can use a timer to try to wake up the camera in the case of this corner case occurred.  for example. wait 5 seconds after the signal CAMERA_STATUS_RESOURCENOTAVAIL.  If your application has not been made inactive by browser, then you can try turning it back on the camera.

I hope this help get you pointed in the right direction and still... I plan on collecting a best-practice appropriate sample that illustrates exactly how to do this when the weather!

See you soon,.

Sean

Tags: BlackBerry Developers

Similar Questions

  • What is the right way to compare, synonym, trigger and the Type using DBMS_METADATA_DIFF?

    I use this "Select dbms_metadata_diff.compare_alter('TABLE','COMP1','COMP2') from double;" compare two tables and see the result as below, but when I use "Select dbms_metadata_diff.compare_alter ('VIEW ',' VIEW_NAME1, 'VIEW_NAME2',"USER1","User2") double" to compare my opinion I do not see the result as below? But the query runs without error...! I want to compare, synonym, trigger and the Type. Thank you!

    Result:

    ALTER TABLE "USER1". "" ADD TBL_A "("FIELD_A6"NUMBER (2.0) NOT NULL ACTIVATE)

    ALTER TABLE "USER1". "" TBL_A "DROP ("FIELD_A3")

    ALTER TABLE "USER1". "" CHANGE TBL_A ' ("FIELD_A2' VARCHAR2 (20))

    ALTER TABLE "USER1". "" CHANGE TBL_A "("FIELD_A4"NUMBER (5.2))

    ALTER TABLE "USER1". "" CHANGE TBL_A ' ('FIELD_A4' ACTIVATE NOT NULL)

    ALTER TABLE "USER1". "" CHANGE TBL_A ' ('FIELD_A5' NULL)

    USER1:

    create table TBL_A (FIELD_A1 number not null,

    FIELD_A2 varchar2 (50).

    Date of FIELD_A3,

    FIELD_A4 number (5.2) default 0,

    FIELD_A5 varchar2 (10) not null

    );

    CREATE VIEW view_TBL_A AS

    SELECT FIELD_A1, FIELD_A2

    OF TBL_A

    WHERE FIELD_A1 = 114

    USER 2:

    create table TBL_A (FIELD_A1 number not null,

    FIELD_A2 varchar2 (20).

    FIELD_A4 number (5.2) not null,

    FIELD_A5 varchar2 (10),

    FIELD_A6 number (2) not null

    );

    CREATE VIEW view_TBL_A AS

    SELECT FIELD_A1, FIELD_A2

    OF TBL_A

    WHERE FIELD_A1 = 111;

    When I use "select dbms_metadata_diff.compare_alter ('VIEW ',' VIEW_NAME1, 'VIEW_NAME2',"USER1","User2") of the double ' compare my opinion I do not see the result as below?

    Isn't that strange? Even abroad-, we see NO results at all. Maybe because you don't post it to watch us.

    For an example of how to use the DBMS_METADATA_DIFF package to compare objects, see database utilities

    http://docs.Oracle.com/CD/E11882_01/server.112/e22490/metadata_api.htm#BABIDHGE

  • Is there a way to change the camera settings if you do not see your own face?

    It may be a stupid and obvious question, but is there a way to change the settings of the camera on Skype, so you can see the other person and not yourself? He kills sort of the illusion of a conversation face to face when you have a clumsy mirror of yourself that you can not get rid of! I looked online for help with this and found nothing, and minimizes the cheat only I understand Skype altogether and end up with only a tiny picture of the other person. Looks like there must be a better way!

    Thank you!

    There is no option to remove the image of P - P yourself, but if you click on this image it will reduce to a small thumbnail image.

  • What is the right way to use variables controlled by the two buttons and programming?

    First of all, I apologize if this has been discussed before.  I know not how to phrase succinctly the application, so maybe I just missed the search terms.

    We have several pieces of the Labview software in the laboratory that automatically control things like the taps and heaters.  Sometimes we also manually control these same things.  I'm moving old NI PCI (and older versions of Labview) maps to a variable and based on compactRIO system shared network.  However, I'm still not on best practices to achieve.  I need to be able to have a script running at any time control panel so that I can access, for example, a valve controller (which is just a Boolean), and I need power open and close the valve by programming other scripts.  I need, of course, the control panel to track the State of the valve until it opens another script, the Panel indicates that it is open, and the next push on the control panel it will close.

    Historically, this has been processed using structures business to move from a "computer control" and "hands-on" with global variables that define the State of the valves.  Of course, this is not recommended.

    So far, I've played with the help of two variables, a status of valve and the other for the State of button.  The Panel configuration then loops, reads the status of the valve and puts the State of button if the State of the valve has changed.  I can do this with registers at offset or with the structures of the event, but anyway, it gets very crowded and seems inefficient.  Is there a good way to do this in Labview?  It seems this is a common problem, so I hope there is an easy and elegant solution that I've missed.

    Variable published use shared network.  Your scenario and your manual of the interface and change the variable and then shared your cRIO reads fair value and writes the appropriate values.

    Now for a cool part.  On your manual interface, right-click on your heart control that you want to use to control the shared variable and go to properties.  There should be a data binding tab in the Properties dialog box.  You can bind a control/indicator to a published network shared variable.  So this button will always be attributed to the current state.

    Your script should just read the shared variable before resuming to verify that it is in the correct state.

  • The camera is on the way of selfie and I can't work out what to press to change it, I can't take normal peaks facing outwards.

    Original title: camera acer

    Just got an Acer Tablet. The camera is on the way of selfie and I can't work out what to press to change it, I can't take normal peaks facing outwards. Help is greatly appreciated.

    Hello

    Go to http://us.acer.com/ac/en/US/content/support to find and download the manual for your tablet.

    Don

  • How to change dyou from Korean to English and time date thing dones t work is English version 1.0 of the right way to do it on a wiodows xp home

    How can we change from Korean to English and time date thing doesn t work is English version 1.0 of the right way to do it on a windows xp family

    Hello

    Refer to these...

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-windows_programs/how-do-you-change-Korean-to-English-please-help/0adfb674-886d-440d-8a86-37adcb9a305b

    It comes to English instruction to change the regional language. This will not change any Korean in all English unless your computer is running XP Pro Corporate. The only way to change all Korean at all English is by reinstalling Windows with the English version.

    http://www.computing.NET/answers/Windows-XP/Windows-XP-language-from-Korean-to-English/178270.html

  • I wipe my keyboard and mouse with a paper towel and the screen flipped sideways, how I recover the right way? /

    I wipe my laptop and keyboard mouse with a paper towel and the screen turned sideways, how I recover the right way?

    Hi ken1957,

    Try pressing Ctrl +or to rotate the screen.

  • Two quick questions (hopefully) - right way to dynamically change the CSS class and put of Splash screen implemented

    Couple of quick questions have left me speechless!

    So, it seems obvious that many JavaFX applications want to dynamically change the CSS styles.  Is the best way to do it through la.getStyleClass () .add ("classname") < node >?  The underlying data structure is a list of observable.  So let's say we have 5 styles that simply to change the fill color of a circle of 5 different colors, respectively.  So if I have a condition in which I want to dynamically apply 1 of these 5 styles, as I do now it's by setting all 5 styles as a string in a list by using a static initializer, then I call < node > .getStyleClass () .removeAll (list), then getStyleClass () .add ("classname").  I do this to avoid adding again and still the same style and inflate the underlying list.  What is the right way to manage dynamic CSS styles?

    Finally a very simple I think.  So I know there's a little differently to implement a splash screen.  My app has certainly got bigger in the last few months of development and I noticed there are about a 5 second delay between when I run the application when I see the main stage.  I was thinking what a splash screen would be nice to fill that time.  I had no time to prototype using a Preloader and I fear that using another, early stage start-up again would be too long of a delay.  "I actually thought that using the Nice and simple JVM argument" - splash: image name > "would be simple, easy and effective.  Unfortunately when I try to do, the splash screen appears but never goes away.  Anyone know what is happening with this?

    Your mechanism to manage the css style classes is a good approach; I've used several times. I wonder why the style classes have been implemented as a list, instead of a game, but there may be cases of good use for the use of a list.

    In some cases you can also consider using CSS PsuedoClasses, which were presented in JavaFX 8. Here is a little easier to use, especially if you have two options. But a use case might look like:

    public class Message {
        public enum Status { NORMAL, WARNING, CRITICAL }
    
        private final ObjectProperty status = new SimpleObjectProperty<>(Status.NORMAL);
        private final StringProperty message = new SimpleStringProperty();
    
        // constructor, getters, setters, and property accessors....
    }
    
    public Label createLabel(Message message) {
        PseudoClass warning = PseudoClass.getPseudoClass("warning");
        PseudoClass critical = PseudoClass.getPseudoClass("critical");
    
        Label label = new Label();
        label.textProperty().bind(message.messageProperty());
        message.statusProperty().addListener((obs, oldStatus, newStatus) -> {
            label.pseudoClassStateChanged(warning, newStatus == Message.Status.WARNING);
            label.pseudoClassStateChanged(critical, newStatus == Message.Status.CRITICAL);
        }
        return label ;
    }
    

    And then your css looks like

    .label:warning {
        -fx-text-fill: orange ;
    }
    .label:critical {
        -fx-text-fill: red ;
    }
    
  • What is the 'right' way to add a partial outline / shadow to the text? And when outline you text?

    This is part of a book cover, I do it for a project that will move to a digital printing press. I like the combination of white and blue green, but I wanted to add a little more punch, so I added the part contour black.

    Screen Shot 2016-02-13 at 5.18.52 PM.png

    Issues related to the:

    (1) is there a way to right way/wrong to do this? I simply made a copy of the live black text, then sent behind the white copy and pushed him down and more. Is there a reason why it's a lower approach to the use of a shadow effect?

    (2) currently, all text is still alive. Should I change it to outlines before the last PDF to send to the printer?

    Shadow wouldn't be too good, because it causes the pixelation.

    But you can create a fill of the text object in the appearance Panel. Move it below the characters. Apply the effect > Distort & transform > Transform to move down and to the right.

    In this way, the text can be changed easily if necessary

    When you create the PDF file for printing just incorporate the police. Should happen automatically if you do not change the embed settings

  • What is the right way to migrate from the PS CS5 and LR5 from my old Mac Pro to my new iMac 5 k?

    I am ready to migrate my boot drive for the new iMac and I worry about the right way to take my Adobe Ps and Lr, Br on the new computer. I migrate disable on the old machine, or disable and remove and reinstall on the new iMac? I don't want to spoil!

    Yes, you can install from your original discs as well.

  • A way to return to the controls at the top of the files and thumbnails when hovering over the name of the file?  I can't even read the sticker because it has been moved to a separate column on the right.

    A way to return to the controls at the top of the files and thumbnails when hovering over the name of the file?

    I can't even read the sticker because it has been moved to a separate column on the right.

    Hi Bobca,

    I'm sorry, but the forecast of nail has been deprecated in the latest version due to security problems.

    Kind regards

    Nicos

  • Arabic font, it is not written in the correct way alphbet is not connected and he writes from left to right.  How can I solve this problem?

    Arabic font, it is not written in the correct way alphbet is not connected and he writes from left to right.  How can I solve this problem?

    CS6 and below: How to access the features of Arabic and Hebrew in Photoshop CS6 - YouTube

    Creative cloud. CC to CC 2015:

    First install the value in the parameter of English/Arabic language: change the language setting of your Cloud Creative applications

    Then enable Middle Eastern features in Photoshop: How to write in Arabic in Photoshop CC (and other adobe programs)

    I would like to know if it works.

    Gene

  • How to increase or decrease the effect of an adjustment brush in Lightroom CC? In Lightroom 5, I could hover over the PIN and drag the two-way arrow left or right. This feature seems to have disappeared in the CC version.

    How to increase or decrease the effect of an adjustment brush in Lightroom CC? In Lightroom 5, I could hover over the PIN and drag the two-way arrow left or right. This feature seems to have disappeared in the CC version.

    I'll answer one of your three messages that asked this question.  If possible, please remove the other two.

    Hover and dragging moves the axis as it should.  The cursor turns into a hand to indicate the area brushed, it moves.

    Hover over the pin code, press the Alt/Opt key and drag left and right and the effect will become less and more.   The cursor turns into a two-headed arrow to indicate that the function of the drag has changed.  If you are not hovering over a pin code and press the Alt/Opt, then the cursor turns into a brush to erase to remove the adjustment every time you paint.

  • Attach and detach a document observers, what is the right way?

    Hello

    I came across the below excerpt of code in a large number of sample PLugins where observers are:

    • Tied on the kAfterOpenDocSignalResponderService
    • Detached on the on kBeforeCloseDocSignalResponderService

    Even DocRef is used in both cases, but the observer that is referenced is new every time, so it's a good way to do it? and it'll work?

    GTTxtEdtResponder::attachDetachStoryObserver(UIDRef storyUIDRef, bool16 bAttach)
    {
      ErrorCode status = kFailure;
      do{
      // while we observe all stories (whether they are accessible or not), we only let accessible
      // stories affect the cache. See the observer implementation for this logic.
      InterfacePtr<IObserver> iGTTxtEdtObserver(storyUIDRef,IID_IGTTXTEDTSTORYOBSERVER);           //<--new reference created
      if (iGTTxtEdtObserver == nil){
      ASSERT_FAIL("GTTxtEdtResponder::attachDetachStoryObserver - no observer on story?");
      break;
      }
      bAttach ? iGTTxtEdtObserver->AutoAttach() :iGTTxtEdtObserver->AutoDetach();
      status = kSuccess;
      }while (kFalse);
      return status;
    }
    

    If you look closely, you can see that whenever a posting is called after joining, a new reference to the observer is created.

    Is a way to do it?

    Hello kapoor_aman27,

    I see no error. Attach is called when the answering machine receives the signal of kAfterOpenDocSignalResponderService for each observer, which has been created for the document just opend. Detach is called when the answering machine receives the Signal of kBeforeCloseDocSignalResopnderService for each observer of the document before it will be closed and the observer will be destroyed.

    Markus

  • How to, and the right way of Scheduling

    Hello world

    I look forward to planning to locate some files that I downloaded and I wanted to confirm before doing so if that's what I intend to do.

    I base my calendar on: http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/odi/odi_11g/Creat_Schedul_Scen/Creating_Scheduling_Scenario.htm

    On the one hand, I have an Excel and an Oracle table, and on the other side, I have an Oracle table to another Oracle table. Two different scenarios.

    I have already created two interfaces and executed, they work :-)
    First an Excel to Oracle
    The second an Oracle for Oracle

    That's what I do to create the calendar.

    1. go in the topology browser > physical Architecture > Agents > Agent Local

    2. develop the procedure and find the one I want? and if not I'll create. Like I did.

    What is and how to create a procedure? A procedure is a way to define a sequence of code executed in the order. A procedure is designed to be reused.

    As I don't have any, I guess I should create it first, right? I he create by clicking with the right button on procedures, and then selecting Insert procedure, no?

    I just want to confirm that it is the correct way to do it; I got this info looking at different posts OBEs.

    On the field in name only, name it as I want.
    On the source of the technology, according to the source could be either Oracle, Excel, etc..
    In my case I need one for excel and for Oracle, which means I should create the procedures as much as I need? For example, I have four excel models, which means that four procedures? Or could create schedules instead of four? And when I discuss the Oracle tables, I should create as many procedures or a procedure different from Excel as the source will be different and many annexes?

    Should take a look on another tab? In fact, I have, but all fields are turned off a little for me? Would it be some permission issues?

    3. on the procedure that I have created so far, I have a right click on it and select Generate script like tell me on the OBE. And left by default the fields name and the version.

    4. my agent is running I will carry out certain Interfaces now.

    5. when I increase my new script and get to the establishment of the calendar, I right click on it and I don't get the new planning option. Would it be because of a question of law?

    I really appreciate your help with this! I'm trying to get a book on ODI, as the course is very expensive, but the book is not yet out until the end of the month!

    Do not hesitate to contact me if any other info is needed.

    Best regards.

    Jaison

    Published by: Stephanie on 2012-ene-13 05:27

    Hi stephanie,.
    No worries, not happy your on your way, and welcome to ODI.
    Your use of the term 'procedure' is it was a little confusing because I feel that you where logically to speak of a 'procedure' of events you wanted to take place (in the form of interfaces running one after another), whereas an ODI procedure is something different, indeed as a procedure of RDBMS.

Maybe you are looking for