Cannot find the location of the gps on the device

in my application, I'm trying to find the location of the user.my code owrks in Simulator for the curve8300 and the 9000 "BOLD"

but he does not get the cordinates on the device even though I update the gps manually using the options--> options--> gps.

What to do

 package com.MyChamberApp;

    import javax.microedition.location.Criteria;
    import javax.microedition.location.Location;
    import javax.microedition.location.LocationListener;
    import javax.microedition.location.LocationProvider;

    public class GPS_Location {
     static double longi;
     static double lati;

     public GPS_Location() {

     }

     public void location()
     {
      new LocationTracker();
     }

     class LocationTracker
     {
      private LocationProvider provider;
      Criteria cr;

      public LocationTracker()
      {
       resetGPS();
      }

      public void resetGPS() {

      try {
      cr = new Criteria();
      cr.setPreferredPowerConsumption(Criteria.POWER_USAGE_HIGH);
      cr.setPreferredResponseTime(120000);
                cr.setCostAllowed(true);
      provider = LocationProvider.getInstance(cr);
      provider.getLocation(120);
      if (provider != null)
       {
        provider.setLocationListener(new MyLocationListener(), 1,1,1);
       }
      } catch (Exception e) {}

      }

      public void run(){}

     private class MyLocationListener implements LocationListener
         {
       public void providerStateChanged(LocationProvider provider,int newState)
       {
        if (newState == LocationProvider.TEMPORARILY_UNAVAILABLE)
        {
          provider.reset();
          resetGPS();
        }
       if (newState == LocationProvider.OUT_OF_SERVICE)
       {
        provider.reset();
        resetGPS();
       }
     }

     public void locationUpdated(LocationProvider provider,Location location)
      {
       if (location != null && location.isValid()) {
        try {
      lati = location.getQualifiedCoordinates().getLatitude();
      longi = location.getQualifiedCoordinates().getLongitude();
         } catch (Exception e) {}
     }
      }
    }
   }
 }

Although the code seems fine for me, check with this code...

Criteria criteria = new Criteria();

criteria.setHorizontalAccuracy(50);
            criteria.setVerticalAccuracy(50);
            criteria.setCostAllowed(true);
            criteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_HIGH);
            _locationProvider = LocationProvider.getInstance(criteria);
              Location location =_locationProvider.getLocation(-1);
            _longitude = location.getQualifiedCoordinates().getLongitude();
            _latitude = location.getQualifiedCoordinates().getLatitude();
             _altitude = location.getQualifiedCoordinates().getAltitude();
             _speed = location.getSpeed();
            if(_locationProvider!=null)
             {
              _locationProvider.setLocationListener(new LocationListenerImpl(), _interval, 1, 1);

            }

Tags: BlackBerry Developers

Similar Questions

  • LaserJet Pro M127fn Installer cannot find the device on the network

    Hello

    I just bought the product, but during the installation - setup is unable to find the device on the network. Device is properly registered to the address 192.168.0.14 (with static IP address), I can see the dashboard configiration at the same address via browser and all works well with the network itself.

    Try to ping the IP - it's ok. Tried to install without active firewall - also fails.

    Double checked the installation process - with automatic search and provide the IP address of the printer - both failed.

    Also, I rebooted the router and the switch and the computer. Is not new. I also tried downloading the last executable configuration on the site - and even once, it fails with 'device not found on the network.

    Then what do I do to fix this?

    Thank you

    Finally found a solution. It is strange as it may seem, but after all, it's a solution.

    -Rinse your DNS and your ARP cache (see the Google if you don't know what that means)

    -Reboot the router (or, where appropriate - switches)

    -Change the IP address of the device on your network. Try with round numbers like (192.168.0.20)

    -Restart your router (and if applicable - switches)

    -Restart your computer (s)

    -Don't run the Setup again and the hoprefully you will have no errors and everything works perfectly for you

    If your problem, similar to mine, persists, repeat the above process again and again... and again...

    Good luck

  • iPhone 6 cannot find the device bluetooth audio

    My iPhone 6 (IOS version 9.3.5) Impossible to find a new bluetooth device and keep the search bluetooth unanswered.  In addition, reception (when listening i-tune) is bad and intermittent.  Appreciate advice how to solve this problem.  Thank you.

    Hello ChengMY,

    Thank you for using communities of Apple Support.

    If I understand your message that your iPhone 6 (which is updated to iOS 9.3.5) cannot find a new Bluetooth device and don't stop looking for him. What type of device Bluetooth you are willing to pair with your iPhone? The reason why I ask, is that there are only some that the iPhone supports Bluetooth profiles. Here is a list of the supported Bluetooth profiles:

    iOS: supported Bluetooth profiles

    If the device you are using uses one of the supported Bluetooth profiles, the steps described in the following article can help solve the problem for you:

    Get help connection an accessory with your iPad, iPhone or iPod touch Bluetooth

    Best regards

  • Tecra A2 - audio lost and cannot find the device

    The other day, lost all the sounds on the laptop. Nothing else did it and no new software has been loaded for possibly in conflict or cause a problem. Have you tried to uninstall and reinstall the driver and add hardware (Media Audio Controller) even one time, but system now can't find the (impossible to install this hardware) device.

    You have any recommendations as to the difficulty.

    Thank you
    phwoodford

    Hello

    Have you tried reinstalling the audio driver with the driver of one or the other of Toshiba?

    In addition, it would be interesting to know what operating system you have.
    There is a yellow exclamation marks in Device Manager now?

    Maybe you should try to update the BIOS too. If it doesn t work it seems to be time to reinstall Windows. Maybe something messed with the registry or the system.

  • OfficeJet 4500: Capture and scanning Hp cannot find the device

    I can print on my printer without a problem, but when I tried to run Capture and scanning HP, he invited to select a device and then could not find it. I even entered the IP address and it says that no device was found.

    When I ran everything in a remote printer, it says the printer status is unknown.

    I have something to him printed literally just 5 minutes before.

    Thanks for any info.

    Hi @gasman00,

    Thanks for the reply.

    If you want to use HP app scanning and Capture, you must upgrade to Windows 10. In addition, scan windows is also not compatible with Windows 8.1, so this will not work.

    You don't need or the other of these applications to analyze these are alternative methods of analysis.

    You have installed full feature software?

    If you do not have the use of the software installed HP the HP printer Install Wizard. The Wizard Installer HP printer detects automatically the best print available for your HP printer driver. It is only available for Windows 7, 8 and 10. Download and run The Installation Wizard for printer a free tool from HP. When you click this link, HP printer installation wizard is downloaded using the download of your Internet browser capabilities.

    Once installation is complete, try to scan using HP Scan by following the instructions from my first post.

     
  • During the installation of Windows 7, cannot find the location to store the files for installation of profit. Error code 0 x 80070490

    When I try to install the windows operating system 7 in my pc. installation of window cannot find a location to store temporary installation window installation files to ensure that a partition on your startup disk has at least 686 MB of free space - error code 0 * 80070490.   Please tell me how to solve this problem?

    If you have any non essential devices connected to your computer such as external hard drive, USB stick or micro-SD memory card, unplug them, they might interfere with installation.

  • Setup error "the system cannot find the specified file" (hpzprl40.exe)

    Trying to install HP Photosmart c5180 all-in-one using the latest version of the software download at HP and have Windows 7 Asus desktop computer. Receive error install "the system cannot find the specified file" (hpzprl40.exe), and the wizard stops.  Help, please.

    Hi loveisus,

    Try using the brush included in the CD or download. Let me know what you find?

    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. run the uninstall_L4 (exe or 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://www.Adobe.com/support/flashplayer/downloads.html

    9 download drivers and full software features

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=MP-76232-1 & CC = US & DLC = in & LC = on & os = 4063 & Product = 1153481 & sw_lang=.

    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. run the uninstall_L4 (exe or 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://www.Adobe.com/support/flashplayer/downloads.html

    9 download drivers and full software features

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=MP-76232-1 & CC = US & DLC = in & LC = on & os = 4063 & Product = 1153481 & sw_lang=.

    10. run the download to reinstall the printer

  • Vista cannot find the mouse USB - Satellite P100 - 434 PSPADE driver

    * Need help to install a mouse optical usb on vista32 *.

    I have two mice, two optical usb, 1 wired and 1 wireless. They are the two plug-and-play so when to plug their vista must locate and install the right drivers automatically... it can't.
    Vista search drivers on the disk and hard on the internet.

    "" looking software... looking for an online software.. "."

    Then says:
    "Windows encountered a problem installing the software driver for your device."
    Windows found driver software for your device but encountered an error trying to install it.
    USB Human Interface Device
    The system cannot find the specified file. »

    They are plug-and-play and just install automatically, there is no driver CD that come with the mouse.

    I have a Toshiba Satellite PSPADE P100-434 with Vista 32 bit purchsed new 2 weeks ago.

    Help, please... Thank you!

    It's strange, because the standard optical mouse should be installed without time and without the need of specific drivers.
    Did you check the homepage of the manufacturer for drivers?

    And have you installed all the latest updates for microsoft windows and SP1?

  • Satellite T110-11U - cannot find the router WLAN

    Hello

    I have a Toshiba Satellite T110-11U. Have had since February and loved it-fortunately it wireless used throughout the House. Then one day on a month, unless I was in the same room that the wireless router, Wireless does not work. I have 2 other laptops (and iPhone) which still connect wirelessly throughout the House and the garden without problem.
    As you can imagine, it was very strange. When I take in the garden, my other laptops are all networks wireless in the region, but my Toshiba can't find any.

    Suspecting it was a driver problem, I made sure that the wireless drivers are up-to-date. With no joy, I got the system as it was at the time of purchase (do a complete restoration by interupting, starting and leaving the hard drive to be deleted and reinstalled etc.). Still the same problem. I even changed the rooms in which the router is, and the same problem - the Toshiba cannot find the router unless the router is located a few meters from the laptop.

    Until I lose the will to live, can anyone suggest the cause of my problems, or is it time I admitted defeat and brought back to the Comet under warranty (where likely test next to a wireless router and tell me everything is fine!).

    Thank you very much

    Steve.

    Hey Buddy,

    Did you check if the wireless network card is recognized correctly in the Device Manager? There may be a yellow exclamation or unknown device. Try also updating the driver WLAN from Toshiba Web site:
    http://APS2.toshiba-tro.de/WLAN/

    See all other WLAN routers?
    The wireless network card can be activated using a combination of keys FN + F8 and in the BIOS. In the BIOS, you should also load default settings and test again.

  • Build error cannot find the distribution under construction

    I had a similar problem like this thread.

    http://forums.NI.com/T5/LabVIEW/build-error-can-t-find-distribution-being-built/TD-p/1462842/page/2

    My old guard Installer and ask for copy of the installation is finish. Quite annoying because it takes so long to get there. Any advice would be appreciated. I've attached a screenshot of my error message.

    You created this problem by running a build already install on your development computer. If you are distributing drivers with your installer you should NEVER run the installation program on the machine on which you build.

    Here's what happens:

    All software shops NOR where it was installed since in the Windows registry. When you initially installed it note where you install (DVD, network drive, etc.).

    When you build an installer in TestStand will prompt for this location if it cannot find the original installation files (that is, if you take the DVD from the drive disconnected from the PC from the network, etc.)

    What happened on this PC is you have to build a Setup program, and then you run this installer on the PC, and because the pilots were already present it replaced the path stored in the registry with the path where your Installer (e.g.) was C:\Temp\long path)

    I'm guessing that you have now deleted this former Installer. That means that you have to re - run installers for ALL the software to, OR that you have installed on this machine so the registry is updated to point to the path of DVD or the network path.

  • Installation Wizard cannot find the software for samsung technologies, how to solve this problem?

    I'm not very good with computers and what not. I am using media player 10 I think (I have windows xp) and when I plug my samsung reality screan phone to connect to the computer and the computer does not find my device. He tried to download one software called samsung technology something or other, and he says that it cannot find its location. then he said to retaliate if I know where he is, but I don't have a clue as to what it means. Can someone guide me through this with the limited information I gave.

    Hi Grainger,

    We would require the following details to help you best.

    (1) you try to sync your phone to your computer using Windows Media Player?

    (2) did you get an installation as well as the phone disc?

    (3) what is the exact full error message you get with regard to the location?

    (4) did you connect your device with your computer as soon as possible?

    Alternatively, you can contact Samsung support team for assistance. You can contact them on the link below.

    Online Service Center

    https://www.Samsung.com/in/support/main/supportMain.do

    You can check the version of the operating system installed on your computer using the steps below.

    Operating system Windows am I running?

     

    http://Windows.Microsoft.com/en-in/Windows/which-operating-system

    Your answers are important for us to help you with the issue further. Write us with the details asked.

  • Update Windows XP SP3 is abandoned during the installation of UNIDRV. DLL and displays the message "the system cannot find the file specified."

    When the update of Windows XP is install SP3, the sequence is abandoned at the location of the process.  After you download the SP3, the progresses set install through the normal initialization sequence, inspection, creating list of 3rd drive part, backup files, etc., begins to install the files but when to reach the "UNIDRV. The installation of the file "DLL" stops and I get a message "the system cannot find the file specified".  The close message will invalidate all the installation and possible automatic restart.  I did not locate a UNIDRV. DLL file and copy it to my C:\ root directory but have tried almost everything in the 22/01/12 'terribrownQF' and the response "Tommy Stanley" 22/01/12 no change where the installation of SP3 crashes.  Should I try to put the UNIDRV. DLL file on my computer?  Any other ideas?

    Please respond to each of the following diagnostic questions in a numbered list type in your very next answer (no need to quote this post):

    1. What is the full name of your application or the installed antivirus security suite and when (date about) is your subscription current expires?  What (other than Defender) anti-spyware applications are installed?  What third-party firewall (if applicable)?

    2 a Norton or McAfee application ALREADY installed on the computer?

    3. do you have a free trial Norton or a test of free McAfee [CHOOSE ONE ANSWER] come preinstalled on the computer when you bought it? (No matter if you have never used or activated).

    4. why has not been installed SP3 years? [1]

    5. is Firefox, Chrome or any other alternative browser installed?

    6. are you familiar with "Registry cleaners" (e.g., Registry Mechanic;) System Mechanic; RegCure; RegClean Pro. Advanced SystemCare. Registry Booster; McAfee QuickClean. AVG PC TuneUp. Norton Registry Cleaner; PCTools optimizer; SpeedUpMyPC; PC Doctor; TuneUp Utilities; WinMaximizer; WinSweeper; Comodo System Cleaner. Advanced System Optimizer. CCleaner)?

    7 have you ever had the opportunity to do a repair install or clean install of Windows XP for some reason any?

    =====================================================================
    [1] note: support for WinXP SP2 ended the July 13, 2010! "Computers running WinXP SP2" will no longer receive software updates from Windows Update "[i.e., updated on and after August 2, 2010 so now that you're missing more than two years worth of updates to security critical! ] until SP3 has been installed.

  • Imaging a computer error, "the system cannot find the file specified."

    I tried an imaging machine and it fails because "the system cannot find the specified file" I can boot and crossed to the file, the system does not find.  If I remove the file from the location and try to reimage the machine, he succeeded. And I need this file on the machine, why would that be?

    Hello K.C.Clayton,

    Thanks for the return of the response.  Because you're imaging a computer Server 2003, it would be better displayed on the Microsoft TechNet forums.

    Systems Management Server 2003

    http://social.technet.Microsoft.com/forums/en-us/SMS/threads

    Thank you

    James

  • Not able to repair Windows XP computer error cannot find the file [e1e5132.sys].

    Original title: need help to use the repair feature when you use the disk of resettlement for XP Media Center 2005.

    I cannot using the repair on Windows XP Media Center 2005 feature.  I started the repair process and enter the installation phase, but the installation stops because it cannot find the file [e1e5132.sys] which is a Windows\System32 folder.  I managed to download a Pack which included the file (using another computer), but I can't properly cancellation of the installation in order to install the file in the appropriate location.  Whenever I try to restart the computer, it goes immediately to this part of the installation of the repair process.  Even when I try to restart without reinstall into the CD drive; When the reinstallation disk is removed and I try to restart, it requires me to insert the disc to continue to the reinstall.  Help - How can I back out of the reinstall, so that I can add the missing file first?

    Hi Stephdan,

    1. have you done any hardware changes or software on your computer before this problem?

    2. Why are you trying to fix the computer?

    It would be possible that the Windows XP installation disc is damaged.

    (a) you can try to do a Windows XP disk which should correspond to the same edition, as it is installed on your machine.

    (b) later, try to repair the installation and check if you are able to boot to the desktop normally.

    Perform a repair Installation


    Note:
    however, you should not have Service Pack 3 installed on the computer before you run repair installation.

    Hope the helps of information.
    Please post back and we do know.

  • While booting XP machine, get error "the application cannot continue because it cannot find the uncdms.dll file.

    just after the start of the desktop windows appears and then I get the error message "the application cannot continue because it cannot find the uncdms.dll file" I searched using windows search, nothing helps.

    Hello

    · Do you remember all the recent changes on the computer before the show?

    · What is the service pack installed on the computer?

    Uncdms.dll file is associated with the Application of desktop search in Windows that is used to find and view an overview of the different types of files, such as documents, e-mail, photos and music files on a computer.

    By default, the uncdms.dll file is located in the folder C:\Windows\System32. The file is more common in 143 872 bytes.

    Follow the methods below

    Method 1:

    To uninstall the Windows Desktop Search from your computer, you must complete the following two tasks:

    Step 1: Remove Windows Desktop Search from the boot sequence

    To do this, follow the steps below:

    a. click on the start menu, click Run.

    (b) in the Open box, type msconfig and press ENTER.

    c. in the System Configuration Utility dialog box, click the Startup tab.

    d. search and clear the check box for any option that is related to Windows Desktop Search or uncdms.dll.

    e. restart your computer.

    Step 2: Uninstall Windows Desktop Search applications

    To uninstall the Windows Desktop Search using the Add / Remove Programs, perform the following steps:

    a. click the start menu and select Control Panel utility.

    b. double-click the icon Add / Remove programs.

    c. in the Add / Remove Programs, locate and select the Windows Desktop Search.

    d. press the button Delete.

    e. restart your computer.

    Method 2:

    Run the verification and virus scan online if any malware or virus detected on the computer activity. You can run the scan for viruses online from the link below: http://www.microsoft.com/security/scanner/en-us/default.aspx

    NOTE: Make sure that you select the correct version of the operating system before downloading the scanner)

  • The following error occurred while importing IMG_ #. JPG: The system cannot find the specified file.

    It really starts to annoy me. For some reason, Windows does not allow me to import my photos with Windows more, I was able to import pictures all the time, but all of a sudden it stopped. I tried the import with the program auto-importation of Windows and then I tried to use the import software called Windows Live Gallery. Both gave me the same error message "the following error occurred while importing IMG_ #.» JPG: The system cannot find the specified file. "I tried looking up this error on many sites and have not led to what. I tried to re-formating my memory card but it did not work. Please help me, I can not import all the images and is running out of memory cards, I don't want to delete the images I took because I can not import to my computer.

    Thank you.

    Hello
     
    1. you try to import these images on the camera?
    2. have you checked if the image files are present on the device?
     
    First cross check if the photos are present on the device and if you are importing from the right location. Try to copy the files manually and paste it on the desktop and see if it works.
     
    For more information on troubleshooting camera connection problems, visit this link:
    http://Windows.Microsoft.com/en-us/Windows-Vista/Troubleshoot-camera-connection-problems
     
    Post back with the results, so that we can help you better.
     
    Kind regards
    Syed
    Answers from Microsoft supports the engineer.

Maybe you are looking for

  • Terminal do not include all the files in the directory

    Hello I'm on MacBook Pro (retina, 15 inches, mi 2014) OSx 10.11.5 El Capitan. I recently tried on cd for some files which are there and I get a no file or directory. The record includes 18 but Terminal displays only 2 of them. Thanks in advance

  • No sound on internet videos. Works fine on IE & local audio files.

    I am not getting any audio on videos from the internet. No problem with IE or audio files on CD or hard drive.FF 8.0.1Windows 7 Home Premium v 6.1.7601 Service Pack 1.Plugins:Hulu Desktop 0.9.13.1Java Deployment Toolkit 6.0.290.11The Java SE 6 U29 6.

  • Contacts Outlook sync for iOS fails miserably

    I became completely frustrated with iCloud app on Windows and with iCloud generally and the apparent inability to sync contacts Outlook 2013 for iPad running iOS 9.2. I have Windows7 x 64 and 2013 Outlook installed. I have app iCloud 5.1 installed on

  • What is the solution for no more than space because windows xp files

    XP running on six different PCs and a laptop and I have no space on any left all have CCCleaner and no program other than what is required to run the pc hard disk. Windows xp and its updates and patches have taken rooms. I'm available on more than 2%

  • 22 on 1218nfs MFP scanner error

    Under warranty printer (purchased on 8 January 2014).  He started showing 'error Scanner 22' on the screen. Scanner does not, even does not printing several times. Web forums say that the error will once we have unplug the power plug from 30 seconds.