What is a good way to determine the validity of the GPS with BPS?


I use bps for a native application on the Playbook. There are a lot of functions to call to get information about the events of geolocation, which is great. But I'm looking to distill information into something that could tell me if yes or no position (lon, lat at least) is designed to use in my application... it is to tell whether or not I am a "GPS coordinates". You can check the validity of all to a large number of parameters (altitude, heading, speed, etc.) ... but nothing that tells you if lon and lat are valid.

Does anyone have advice as to how I can a true/false 'gpsIsValid' extracts the available data?




If you get a reading at all, it should be "valid" in the sense that it came from calculated data based on the satellites used.

What you need to do is to decide 'how' it is valid, that's up to you: https://developer.blackberry.com/native/reference/playbook/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.l...

Tags: BlackBerry Developers

Similar Questions

  • What is a good way to use the queues for the model of consumers/producers?

    Hi all

    I am following the model of consumers/producers to use the queue to synchronize the following process: the producer is a loop to produce a number N, I will put each number generated in a table and after each 5 numbers generated, I put the table in the queue and pass it on to the consumer. I have to wait the use by consumers of the data and it will then remove the item from queue so that producers will have the chance to produce another 5 numbers. As I put the maximum size of the queue one, I expect that the producer and the consumer turns to produce / consume all five numbers and the opportunity to another. Here is my code

    When the checkbox is false, the code will be

    For the first 5 numbers, product will generate every thing right and put it in the table, and it's going to pass the array to the quere so that the consumer will have the chance to loop through the table. I except the procude loop will continue only when the queue is available (i.e. all items are deleted), but it seems that once the consumer starts the loop loop of the product will continue (if the indicator x + 1 and x 2 will be changed to numbers). But this isn't what I want, I know there must be something wrong, but I can't say it is.

    dragondriver wrote:

    As you say in 1, sequency structure to enforce the order of execution, that's why I put it here, in this example, the simple question, I replace the complete code with increase in the number, in the real case, the first markers + 1 and + 2 must be performed in this order.

    Mikeporter says:
    1. get rid of all the structures of the sequence. None of them are nothing but apply a work order which would have been the same without them.

    So even if you delete the sequence structure, there will be a fixed & defined order and it is because LabVIEW follows the MODEL of FLOW OF DATA.

    Data flow model (more precisely in the context of LabVIEW): a block diagram node runs when it receives the required inputs. When a node is running, it produces output data and transmits data to the next node in the path of the data stream. The flow of data on the nodes determines the order of execution of the VIs and functions on the block diagram (click here for reference).

    Now in your code, just remove the sequence structure will not make you order will be going to stay the same, but you need to do some very minor changes (as thread of the error in loop, before that he go to the node "Élément Dequeue").

    Come to the main point: it's a good way to use the queue for the consumer/pmodel that?
    The model you are using (and qualifying as consumer/pmodel) is much too deviated from the original consumer/pmodel which model.

    dragondriver wrote:

    For the second, Yes, it's my fault for delete, though. I'm actually the example of model of producer/consumer design pattern, but I do not pay attention to the while loop in the part of the consumer.

    While loops (two producers & consumers) are the essential part of this architecture and cannot be deleted. You can start your code using standard model.

  • Is there a way to determine the representation of a digital control through the property?


    It is perhaps a silly question.  Is there a way to determine the representation of a digital control of its reference?  For example, U8 vs DBL. I want to fill in the data of a file to a vi and then run it.  I can't seam to find the property that I need.

    Thank you


    Hi rich,

    You should find this property where all others are found

  • What is a good way to check if the selection ADB sql cursor returns nothing

    Hi all

    I am trying to find a good way to identify that a select SQL basic cursor return nothing.
    I know that or we use exception when no data found or count (*) to check how many rows are returned.

    I have a cursor based on a long statement select.
         CURSOR long_cursor IS
              --long select statement(with input variable) ;
         Select count(*) 
         Into v_count
      -- a long select statment with input again ;
      IF v_count > 0 then
        For record in long_cursor loop
         --Get information from cursor
            --other processing for output
        End loop;
      END IF;
    Is there a way other than the above?
    I would like to reduce the amount of typing. I know that repetition in code is not good.

    Thanks in advance,

    Published by: Ann586341 on February 28, 2013 14:29

    Hello Ann,.

    Apart from the possibility has already been mentioned that other users can change the data during execution of your process, you can check if something needs to be done without the COUNTY. Set a flag in the cursor for loop. When there is no data, then the flag will not change one you can perform the necessary procedure.

        v_data_found    BOOLEAN := FALSE;
        CURSOR long_cursor IS
            --long select statement(with input variable) ;
        For record in long_cursor loop
            v_data_found := TRUE;
            --Get information from cursor
            --other processing for output
        End loop;
        IF NOT v_data_found THEN
            -- set processed flag
        END IF;


  • Good way to recharge the computer to increase autonomy

    Dear support Member,

    I use a HP-Envy-Spectra-14-3010NR model that runs on Lithium-Ion battery.

    I'm not very sure about what is the best way to increase the life of my battery systems. In previous models, I have suggested to me that I must leave my battery discharge completely at least once a week and then reload.

    What is the mode of operation in suggested Lithium-Ion batteries?

    Should I still keep running on the load (with power on) or should I let it load completely, then turn off the sector until the battery is completely empty - or there is another way that is more suitable.

    Please suggest.

    Thank you.

    Hi NMahajanCA,

    It is not necessary to do the foregoing. Drain the battery or charge not completely will increase or decrease the battery life. Here is a link to understand your battery.


    Calibrate the battery resets the battery indicator to accurately display the charge level in Windows. Here is a document on how to do it.


    I hope this helps.

    Thank you.

  • Good way to use the concurrent data store


    I'm developing a multithreaded C++ application that uses the C++ of Berkeley DB Library.

    In my case, I have several databases that I composed in a wooded area. It is important for me to use an environment because I need control over the cachesize parameter.

    I don't need no guarantee of transaction and have for most of the readings, so I decided to use the "simultaneous database.

    I first pre-fill all databases with a number of entries (configuration single-threaded phase) and then work on it at the same time (for most readings, but also insertions and deletions).

    I tried all kinds of different configurations, but I can't work without specifying DB_THREAD as a flag of the environment.

    I don't want to because then access all handles is synchronized sequentially according to the documentation:

    "... Note that the activation of this indicator will serialize calls to DB using the handle between the threads. If

    simultaneous scaling is important for your application, we recommend handles separate for each thread opening

    (and do not specify this indicator), rather than share handles between threads. "

    (Berkeley DB QAnywhere C++)

    So I tried to open the environment with the following indicators:


    All data in this environment handles are open only with the DB_CREATE flag.

    So, since my understanding this same basic access handles need to be synchronized, I opened separate handles foreach database for each thread (opening the handles is still single-threaded).

    In my first approach, I have only made use of the object of global environment. Which does not work and gives the following during operations error message:

    DB_LOCK-> lock_put: Lock is no longer valid

    So I thought, since the same handle global env is passed to all handles separate DB, it is perhaps a race condition critical on the handful of approx.

    So in my next test, I opened also handles separate EPS in each thread (and db handles owned each).

    That does not produce an error in db, but now it seems that each thread sees its own version of the databases (I call it stat early in the life of each thread and he sees all of the empty dbs).

    What is the right way to use the concurrent data store? Each thread should really open his own set of db handles? What about the number of open handles env?

    PS: Without specifying that the DB_PRIVATE flag seems to do the job, but for performance reasons, I want all operations to perform in the cache and do not specify product DB_PRIVATE average of several writes to the disk for my scenario.

    Thanks a lot for your help.

    CD (simultaneous database) allows a single editor with multiple drives, access to the db at a given point in time.    The handle for the writer doesn't have to be shared with readers.   If you share the DB handle then calls are synchronized, but if each thread has its own handle DB then this is not the case.     Since you have an environment, DB_THREAD must be at the level of the environment.   This will allow the sharing of the environment handle.     This type of error "DB_LOCK-> lock_put: Lock is no longer valid" you can provide us your code so we can take a look.   Also what BDB version are you using?

  • What is an effective way to adjust the position of all the clips on the timeline

    In one of my projects, I leave cuts on a timeline. And it seems that the position of a few clips has been accidentally changes. I need to have the same position for all the clips. Is there a way to define the position of all the clips in the world - what is the best way to tacke this? Thanks in advance. -renized

    Press A key for the track Selection tool.  Click the first clip that you want to settle and every item after that will be also selected.  You can move them as a group.

    If you need clips on more than a selected track, hold CTRL when you click.

  • What is the best way to place the image (with legend) in a book?

    I am preparing a model for an encyclopedia project, the encyclopedia will be in addition to 10000 pages, so what is the best way to place the images (Photos, graphic illustration,... etc) with a legend?

    The problem that when I change the text; the image does not move with it, and when I place it in the text, it is difficult to control text flow.

    Please help

    I think so, but it can be a little weird, if the position of the anchor is on the second page of a two page spread. Really, I jumped in to suggest the image and the legend of consolidation before anchoring.

  • Is there a way to determine the current amount of data collected using CounterReader and AsyncCallback?

    I collect a quadrupole encoder using CounterReader and AsyncCallback.  At any time, I would like to know how much value is currently stored/collected before receiving the AsyncCallback and calling EndReadMultiSampleDouble.

    Hi MYR.

    If I understand what you're asking, you should try the DaqStream.AvailableSamplesPerChannel property:

    If you perform a task of counter entry in the buffer, then this property can be used to query the number of samples available in the input buffer that have not yet been read in the application memory.

    Best regards


  • Is there a good way to replace the text "See basket" by another text?

    I have a big problem, I'm still stuck with that, I hope someone can help me.

    I need to change the text "See basket" in the cart summary module. I learned that I can do this with javascript: http://forums.adobe.com/message/4409239#4409239

    But there are problems:

    When I use this javascript:

    " < script src =" https://AJAX.googleapis.com/AJAX/libs/jQuery/1.7.2/jQuery.min.js "type =" text/javascript"> < / script > "

    < script >

    $(function () {})
    $(".cartSummaryLink").text ("Afrekenen");
    $(function () {})
    $(".cartLink").text ("Winkelwagen is alone");

    < /script >

    The 'see the basket' is replaced by 'afrekenen.


    1. When I add another product to the presentation of big product the text "see basket" is back...
    2. When I delete a product in the basket the text "See basket" is also back
    3. When I refres page the text "See basket" is replaced with "afrekenen.

    So I thought to use javascript to refresh the page when a product is added:

    < script type = "text/javascript" >

    function AddProductExtras() {}
    document. Location.Reload (true);

    < /script >

    This works, but you can see that the text changes from 'afrekenen' to 'view basket' and "afrekenen" as the page is again a regeneration which is not a very good solution.  So here are my questions:

    1. Is there a better work around?
    2. If not, is it possible that when a product is removed from the basket page can also be updated?

    Thank you


    Hi Frank,.

    I suggest that you use CSS and replace the basket with an image. The following should help:


    background: url(your-image.png) 0 0 no-repeat;

    Width: 120px;

    height: 27px;

    vertical-align: middle;

    display: - moz - inline-block; / * for Firefox * /.

    display: - moz - inline-box; / * for Firefox * /.

    Display: inline-block;

    text-indent:-9999px; / * mask the text * /.


    See you soon,.


  • Flex Hero - good way to change the style/color

    There must be an easy way to change the hue of the view... or more precisely the ActionBar/header at the top.

    For example, as I see on this site:


    I would like to be able to change the background colors for something else then the default value is black.  I need to create a new skin for this?


    You can set the ActionBar chromeColor.

  • Good way to implement the page transition?

    Hi, I have a Flex application that uses several pages, along with a ViewStack. Page transition is managed by the attached function (which, according to the commentary, causes the massive memory leak). This function is called in about 40 locations throughout the Flex application. The function calls then removeAllChildren and createComponentsFromDescriptors so that the pages with forms pick up their empty, rather than having to manually go through each component in a page and give them to their initialized state. Preferably, I'd like to preserve the form reset the behavior of this function, but cut the memory leak. Any advice on what would be the best solution to this problem?

    Just a follow-up. We were able to solve the problem of memory leak by applying a patch to the SDK, provided on the Adobe bug tracking forum. y http://bugs.adobe.com/jira/secure/IssueNavigator.jspa?reset=true&&query=memory+leak&summar = true & description = true & body = true & pid = 10080 & pid = 10012

  • Best way to integrate the Macbooks with Windows AD

    Hi guys,.

    I'm really new to the Mac platform!

    I'm a windows administrator and I have around 30-40 MacBooks in my organization. I want to join all the MacBook to windows active directory and all users need to connect with their AD accounts.

    I saw an option in the client machines to join the domain. but its getting removed from the field after two or three days.

    I got to know that mac has a server version and it has a feature of Directory Service. Could one of you give me an idea about this feature, and I can use this feature to add my MacBook to Windows Active Directory.

    Help, please.

    Thank you


    Welcome to the fold.  In General, if you have the AD, you do want to reinvent the wheel by also deploying OD.  While OS X Server can play a role in an AD environment, to use for authentication and authorization is not a good plan.  You end up decentralization accounts/groups/password which is what AD is there for in the first place.

    If you link and everything works for a while, I suspect that you may need to adjust the binding registration password reset.  When you bind a device to the domain, the registration of the computer saves a password in the two AD and Mac.  By default this password will be randomly pull every 14 days.  In some environments AD result is a problem where the Mac "will fall the area" exactly 14 days after the link.

    To test this theory, bind a Mac.  After binding, run this command on the Mac to set the password reset registration link forever reset:

    sudo dsconfigad - passinterval 0

    Wait 15 days.  If you are always connected to the field, it's your problem.

    Run a dsconfigad man to check other hidden options.  Not everything is presented in the directory utility, and certainly not in system preferences.

    If this isn't the issue, I suggest you look in odutil.  With this command, you can enable the logging of directory services debugging.  You can reveal the issue with the drop off the coast.

    (It has been my experience that the Mac is usually not the issue - it tends to be a DNS or the issue of time that cause the problem - are all of your Mac in sync with AD DCs for time?)


    Apple Consultants Network

    Author - "El Capitan Server - Foundation Services.

    Author - "El Capitan Server - Collaboration & control»

    Author - "El Capitan Server - Advanced Services '.

  • C20/SX20: is there a way to get the cdr with loss/jitter of the stats?

    I'm trying to get a report with loss/jitter, but doesn't cdr can not find a way to do it.

    (a) TMS is able to report COR but only on the participants/duration/encryption/protocol of appeal

    (b) C20 web gui has information but only with a number of clicks on and only for a call each time

    (c) API C20 (cli) I found some commands, but nothing for the loss/jitter
    I tried xstatus Diagnostics appeal channels-> only for calls in progress.
    tried xHistory recent CallLogs | Call-> nothing usable

    Is it possible to get the cdr with jitter/loss for each C20/SX20 counters in a framework?

    Methods to obtain these data is exactly what you have listed and must be carried out during the call.

  • When Adobe or Microsoft will provide a way to disable the debugger with integrated flash player

    I have a problem I've noticed a lot of people have that running windows 8, 8.1, and 10 with the embedded version of Flash Player (called Shockwave Flash lens on my system).  This has to do with the version of debugging that is automatically installed with windows 8.1.  There are many developers who love and use the debugger, but there are many of us, users who don't and we cause anxiety and frustration.  He is currently doesn't seem to be a way to disable the debugger which translates as us users to get windows with different error codes that indicates an error Script of action has occurred.  This happens quite often, and even if it can be closed by clicking the ignore, it is aggravating and frustrating to have this pop up window at all.  I'm not a developer and do not use the debugger and dislike not being able to disable this feature on my PC.  Microsoft or Adobe will fix this problem and propose a solution for us?

    Hi Bill,

    Please ttry the following:

    • Make a right click Start Menu button in the lower-left-> programs and features
    • Click View Installed Updates in the left upper corner of the window
    • Locate the debugger for Internet Explorer Flash Player for Windows 8.1 in the list
    • If she is there-> to highlight and click Uninstall
    • You will be asked to reboot, and Flash Player should be uninstalled once it is complete
    • After the reboot, launch IE and go to https://helpx.adobe.com/flash-player.html and click on the check now button
    • What version of Flash Player is installed?

    If he still has the or "debugger for Internet Flash Player for Windows 8.1 did not appear in the 'View' list updates installed, please try to clear the browser cache (I don't think it's a matter of caching, but it's worth a try):

    • Right click the Start Menu button in the bottom left-> Control Panel
    • Select Internet Options
    • in the general tab, go to the browsing history section and click the delete... button
    • In the remove history window:
      • Uncheck the first item on the list "Web site data preserve Favorites" (having this check mark element isn't just erase).
      • Check the following "files temporary Internet and Web site files", "Cookies and Web site data.
      • Click the Remove button
    • After clearing the cache, go to https://helpx.adobe.com/flash-player.html and click the check now button.
    • What version of Flash Player is installed?

    Please post the results of these two.

    We have this scope within our contact at Microsoft.  I'll make the results for them.

    Thank you.



Maybe you are looking for