BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-28-2008, 08:03 AM   #21
eforr
Knows Where the Search Button Is
 
Join Date: May 2008
Model: 7100i
PIN: N/A
Carrier: nextel
Posts: 23
Default Getting only one coordinate

Please Login to Remove!

in my code that is above is there a way to get the coordinates only once instead of it continuously grabbing the coordinates.
Offline  
Old 07-28-2008, 08:35 AM   #22
jenselense
Thumbs Must Hurt
 
Join Date: Nov 2007
Location: atm: Kunming norm: Berlin
Model: 8700v
PIN: N/A
Carrier: ChinaMobile
Posts: 55
Default

HI,
this is what I want to do too(get location only once).
I try so with locationProvider.getLocation(60) in an extra thread, but it always times out (in the simulator)...
( "javax.microedition.location.LocationException : Timed out while waiting for GPS Location" )

("bluetooth gps in range" is on and I entered a location...) any ideas why it times out?

thanks in advance
JJ
Offline  
Old 07-28-2008, 08:40 AM   #23
eforr
Knows Where the Search Button Is
 
Join Date: May 2008
Model: 7100i
PIN: N/A
Carrier: nextel
Posts: 23
Default reply

from what i understand the location provide doesn't work in the simulator. ( i could be wrong but i think that that is what i read in a blog somewhere). my app timesout in simulator too but on a real phone it works fine. it just won't pick up coordinates and then stop. every 30 seconds it grabs the coordinates again.
Offline  
Old 07-28-2008, 09:28 AM   #24
jenselense
Thumbs Must Hurt
 
Join Date: Nov 2007
Location: atm: Kunming norm: Berlin
Model: 8700v
PIN: N/A
Carrier: ChinaMobile
Posts: 55
Default

It does work in the simulator....

I just exported my project from eclipse to the BB JDE and there it worked!
So my code obviously is correct! But why doesn't i work when I start it out of eclipse!?!?!? any ideas?

@EFORR:
if you want to get your position only once you don't need a locationlistener...
just start a new thread and do getLocation(-1) on your LocationProvider (lp.getLocation(-1))...
Offline  
Old 07-28-2008, 09:31 AM   #25
eforr
Knows Where the Search Button Is
 
Join Date: May 2008
Model: 7100i
PIN: N/A
Carrier: nextel
Posts: 23
Default sorry

i didn't use eclispe, i coded straight in BB JDE
Sorry no ideas
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


AVNET ULTRAZED SOM ZYNQ ULTRASCALE+ XCZU3EG SYSTEM ON MODULE -  picture

AVNET ULTRAZED SOM ZYNQ ULTRASCALE+ XCZU3EG SYSTEM ON MODULE -

$98.67



Voice Activated Listening Device Audio 150 Day Battery Spy Recorder 16 GB picture

Voice Activated Listening Device Audio 150 Day Battery Spy Recorder 16 GB

$109.00



New Factory Sealed AB 1756-L61 SER B ControlLogix 2MB Memory Controller 1756L61 picture

New Factory Sealed AB 1756-L61 SER B ControlLogix 2MB Memory Controller 1756L61

$304.69



Avnet UltraZed-EG AES-ZU3EG-1-SOM-I-G Zynq UltraScale+ MPSoC System-on-Module picture

Avnet UltraZed-EG AES-ZU3EG-1-SOM-I-G Zynq UltraScale+ MPSoC System-on-Module

$129.99



SIMATIC, Memory Card, 4 Mbytes, 24 Mbytes, 256 Mbytes picture

SIMATIC, Memory Card, 4 Mbytes, 24 Mbytes, 256 Mbytes

$237.75



Nakajima WPT-160 Electronic Portable Typewriter with Display and Memory picture

Nakajima WPT-160 Electronic Portable Typewriter with Display and Memory

$279.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.