How do I get the acceleration and GPS at the same time?

Goal: Get an acceleration and GPS at the same time

Current situation: I can get acceleration or GPS. When I try to get the data, the code ends.

Mini Code

If (bps_event_get_domain (event) == sensor_get_domain()) {}
handle_acceleration_data();
}
If (bps_event_get_domain (event) is {geolocation_get_domain()})

handle_gps_data();

}

Question: Anyone know how to get data in an event or other methods?

Thank you for your attention,

Your code shows event handling, but not the request or to obtain events.  Can you show more of your code?  The following should work (note there is no error checking):

sensor_request_events(SENSOR_TYPE_ACCELEROMETER);
geolocation_set_period(1);
geolocation_request_events(0);

bps_event_t *event;
while (true) {

    bps_get_event(&event, -1);
    if (!event) {
        continue;
    }

    if (bps_event_get_domain(event) == sensor_get_domain()) {
        handle_acceleration_data(event);
    } else if (bps_event_get_domain(event) == geolocation_get_domain()) {
        handle_gps_data(event);
    }
}

Tags: BlackBerry Developers

Similar Questions

  • How can I get the exact time and date on my FAX LOG

    I have a new HP Officejet 6500 has more on my Dell Inspiron Windows XP computer.  How can I get the exact time and date on my FAX log?

    Hi FrederickFrank7,

    Journal of faxes would just follow the time of your printer. Please set the time and date of your printer.

    I am an employee of HP.
    Please indicate the position that solved your problem as "acceptable Solution".

  • I have a laptop broke the rocovery disk not good ahy, I need the windows vista disk operating system how do I get the same themes?

    I have a laptop broke the rocovery disk not good ahy, I need the windows vista disk operating system how do I get the same themes?

    If Windows Vista was preinstalled on your computer, contact the manufacturer of your computer for a replacement CD. If you purchased a retail version of Windows Vista, contact Microsoft.

    This article in the Microsoft Knowledge Base has the details: How to replace Microsoft software or hardware, order service packs and updates of product and replace product manuals . Boulder computer Maven
    Most Microsoft Valuable Professional

  • How to upgrade at the same time a table on multiple files?

    I use Dreamweaver CS3 update web/file aspx pages. There is a table with 20 cells (5 x 4) in a single file, I need to be updated by adding a line more. What I can do. However, each cell is a link to another file, and each of these 20 files contains the same table. How can I update the table on a single file and easily, or at the same time, do the same for the other 19 files (preferably without copy and paste 19 times)?

    I have not to create these files, but I need to update. If you need more information, let me know. Thank you in advance!

    Arrays are identical codewise?

    If Yes, an Include server-side won't work well.

    Put the table code in an include file.  Add a side server specifying your 19 pages. Next time you need to edit your map, simply open the include file.  Edit, save, and download.  Voila!

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • How can I get the same 'Flash' exact effect ('Text', 'Lights and optics') as shown in the preview?

    Whenever I drag the preset on the layer (or double click on the bridge) that what is happening is the kind of text of flutters in.

    I tried matching the outline and background colors and the effect is much better, but not what is displayed in the preview. It lacks real flashes, precisely what that screened on the subject.

    Any help?

    Many predefined with a fast path animations require motion blur to be active to get the desired result.  You have enabled for your layer and saw motion blur?

  • How can I get the same results from Google Images like in internet Explorer

    If I search Google Images in IE8, I get a list of result pages with a fixed number of items per page. These thumbnail images download quickly, and under each image there is useful information about the content of the image and its source. Images on the next page doesn't download not unless if I select the next page in the list, so that the modem activity stops quickly.

    When I use the same URL - www.google.com - in Firefox and go to Images, I get pages with an indefinitely large number of images of result. All images are stuck next to each other, and there is no other useful information from the text shown at all. If I try to scroll to the bottom of the screen, images more keep downloading. There seems to be no Google settings available in this view to limit the number of images per page.

    Only problems with this is that I am currently limited to 56 KB connection. Images from this point of view download so slowly that they simply never complete in a reasonable time.

    However, apart from the speed of connection, there is the question of the useful information from the missing text.

    I can search for photos on startpage.com and get something like the old format of Google, but I can't receive the best list of results that I expect from Google. StartPage uses Google for their research on the web regularly, according to a note on the web search display. But if I go to Images, this note disappears.

    I call it the traditional Google Images Search in Firefox?

    Problem solved by saving a bookmark to Google and then to add by changing the & sout = 1 keyword in the URL.

    When Google is accessible with this keyword, it will ship between web and image searches.

    This example gets always the classic view of Google images.

  • How do I get the total time elapsed displayed on the stage?

    Hello

    I have a program that will count every second past with a key press to the other, in the exit sign that I get all the time what past (per second), but here the total number displayed in a text box on the stage at the end.  This will be the total time between supports.

    Thanks for your help, it is very much appreciated as a newcomer in Actionscript.

    Also, I use video clips of Doug Winnie to help me so if you know a particular episode that will cover then please let me know.

    Mick

    use a variable to store this value and increment when appropriate.

  • How can I get the same screen on extra a vga monitor? I have a zd8000

    There is a photo on the two screans during the boot, but not XP

    Have you tried the F4 key?

    Normally in order to control what screen gets the video signal. Continue to press F4 for laptop, monitor or both.

    Paul

  • I had Norton Internet Security and Internet Explore have a tab to access my Identity Safe with etc. is log-ons. How can I get the same tab/tool appears on Firefox?

    With the help of MSVista

    I could not use NIS with 9.0 Update Firefox. even after trying to get using the ff.
    I had to go to Norton (worm 2012) and run an update and restart the computer. Then all the info was there and it was like before

  • How can we get the last time of reboot of the device in bb10

    Hello

    can we get last time when starting the device developing native blackberry 10.

    Yes you can.  This message has the answer: Re: 'Boot Time' BlackBerry 10

  • How do I get the same results in the Union vs join statement statement

    Hello

    I have 3 related tables and you must combine customers table1 and table3. My Control Panel is constantly evolving based schedule changes or order_completed qty. I have two problems that I can't solve.

    Table 1: Manager has fields {managerId, Mangager_name, customerId & customer}
    Table2: client includes the fields {customerId, orderId, product manager, managerId and}
    Table 3: order has fields {orderId, customerId, customer, date, amount_order, qty, order_completed}

    1. I need check what are customers or away from table Manager / order based on customerId and managerId

    Here is the example of union that I would like to convert a join because I need to include aggregated order table fields and the customer at table eating based on the field of the client:

    Select m.client
    Manager m
    where m.managerId = 22
    Union select m.client in order o where o.customerId = 65

    2. create a view or a temporary table (called State) to the report with an additional field that determines if the client has been found in the roll of the order and not in the table Manager.

    Example of a view of the State or the temporary table select output
    rownum. customer | status
    1. Mary | The two Tables
    2. Tomas | The two Tables
    3. John | Customer table
    4. April | Customer table

    Thanks for the help

    Hello

    SQL> create table manager (m_id number, m_name char(10), customer_id number, client char(10));
    
    Table created.
    
    SQL>
    SQL> insert into manager values (10,'M_1',111,'AAA');
    
    1 row created.
    
    SQL> insert into manager values (20,'M_2',222,'BBB');
    
    1 row created.
    
    SQL>
    SQL> create table customer (C_id number, m_id number, order_id number);
    
    Table created.
    
    SQL>
    SQL> insert into customer values (111,10,5000);
    
    1 row created.
    
    SQL> insert into customer values (222,20,5001);
    
    1 row created.
    
    SQL> insert into customer values (333,NULL,5002);
    
    1 row created.
    
    SQL> create table order_dt (Order_id number, c_id number, Client char(10));
    
    Table created.
    
    SQL> insert into order_dt values (5000,111,'AAA');
    
    1 row created.
    
    SQL> insert into order_dt  values (5002,333,'CCC');
    
    1 row created.
    
    SQL> select  rownum, a.c2, CASE WHEN ((a.ct2+a.ct1) = 2) THEN 'Both Tables'
      2         WHEN (a.ct2 = 1) THEN 'Client table'
      3         WHEN (a.ct1 = 1) THEN 'Manager table'
      4         ELSE 'NULL'
      5    END AS status
      6  from (
      7  select NVL(m.Client,o.Client) c2,count(m.Client) Ct1, count(O.Client) ct2
      8  from   manager m,
      9  customer c,
     10  order_dt O
     11  where m.m_id(+) = c.m_id
     12    and c.c_id = O.c_id(+)
     13  group by m.Client,O.Client
     14  ) A
     15  ;
    
        ROWNUM C2         STATUS
    ---------- ---------- -------------
             1 AAA        Both Tables
             2 CCC        Client table
             3 BBB        Manager table
    

    -Pavan Kumar N

  • Between two lines, how do you at the same time several distant equal lines outside?

    I've done this before in Quark and then in InDesign, but in Illustrator I have not yet found it by doing a search on these forums. I think it would be a part of the "Move" dialog box, but not here... To save an additional frustration I have to ask, and I do not know Illustrator can handle this easily, but I need your help...

    I selected two parallel lines, both of equal length, one copy of the other and spaced several inches outside. I would like to "fill" a selected number of rows between the two existing lines, to make a graph, spaced at equal distance from the apartment. Should what element of the dialog or menu I go to do that?


    TIA,

    Ken

    you want the gradient tool. It is in the tool palette. You can also press 'w' for it is shortened. Select the gradient tool, then click on a line, then the other. It will fill with the specified parameters. to change the settings, select your mixed forms, select the gradient tool and press return, this will bring up the options

  • How to run at the same time as the photoshop Lightroom?

    I usually start to adjust in lightroom and then make hard edits in photoshop.  When I work with Tiff files in Lightroom its great because I can't save my changes that I'm working on a batch of photos.  When I opened one of my lightroom tiffs in photoshop is a way for the changes I make in photoshop to be applied to this file in lightroom without saving the file again in photoshop?

    Josh phoenix wrote:

    is there a way for the changes I make in photoshop to be applied to this file in lightroom without saving the file again in photoshop?

    NO.

  • I had lost the cd key for my win7 home preium even the sticker is lost. How can I get the key again

    I HAVE A LAPTOP SONY THAT I BOUGHT IN AUGUST 2012.

    THE CD KEY STICKER IS TORN NOTEBOOK, & HDD THAT WENT WRONG. I REPLACED THE HARD DRIVE, BUT CAN NOT ABLE TO CONFIGURE WIN 7 AGAIN.

    FOR THIS I NEED MY CD WIN KEY. HOW CAN I GET THE SAME KEY?

    I HAVE A LAPTOP SONY THAT I BOUGHT IN AUGUST 2012.

    THE CD KEY STICKER IS TORN NOTEBOOK, & HDD THAT WENT WRONG. I REPLACED THE HARD DRIVE, BUT CAN NOT ABLE TO CONFIGURE WIN 7 AGAIN.

    FOR THIS I NEED MY CD WIN KEY. HOW CAN I GET THE SAME KEY?

    Contact Sony and get restore/recovery of them media as you will probably be impossible to recover the product key and the media they send should not he (and given the novelty of the laptop, I don't think that this should be a problem.)
     
    For later use, it's a product key - not a "CD Key" (Windows 7 is not yet on a CD.  (* smile *)

  • How can I remove everything unnecessary and/or deleted at the same time

    When I clear my balls and/or remove things from my e-mail, I can't remove it all at once... must be done individually. How can I at the same time instead of each of them

    Hello

    Thanks for posting in the Microsoft Community. The question that you stated that you want to delete the mails in the Mail application at the same time. We are here to help you.

    Here's what you need to do.

    a. open the folder in which you want to delete E-mails.

    b. Select one of the Emails.

    c. press the CTRL + A on the keyboard (this will select all Emails in the folder).

    d. press the clear key that will remove the selected emails.

    I hope this helps. Please get back to us if you have any other questions; We are here to help you.

Maybe you are looking for

  • Graphic driver Intel HD in Windows Server 2012

    Hey guys, I downloaded Windows Server 2012 through Dreamspark yesterday and installed on my desktop. But the system cannot identify the Intel HD graphics 2000.When I try to install the official driver for Windows 8 to Intel. An error window came out

  • Open selected files using Windows Explorer

    I created several Windows Explorer shortcuts on my desktop to access records, and records of LAN. I want the button files on the toolbar of Windows Explorer or automatically selected when I opened these files, in other words, the left pane should sho

  • How revrt to original windows vista by default for self-extracting zip files

    my vista does not automatically extract the zipped files How can I revrt to original windows vista by default for self-extracting zip files

  • Windows 7 - no Ethernet connection

    My Windows 7 desktop internet connection fails to connect with the wired ethernet connection. Wireless Internet is fine. The problem seemed to start after a series of updates to Windows in December. I have them down one by one, and KB2898785 seems to

  • Curve Smartphone Memory Card - 8 GB - blackBerry 8310

    I bought a 8 GB from ebay (new) and I have a problem with it. I took my AT & T phone and they told me it's too? He was only compatible for up to 4 GB... is this true? Otherwise, what I can do to make it work? It will not format... Please help. Charle