requestLocationUpdates

by dave.marsden » Tue, 11 Nov 2008 04:09:47 GMT


Sponsored Links
 I'm using the following statement to request updates on my G1s
position :

lm.requestLocationUpdates(
            LocationManager.GPS_PROVIDER,
            30000,
            30,
            locationListener);

Which I reckon shuold give me an update every 30sec when the device
has moved more than 30 metres.

However the device seems to get updates much more frequently. Anybody
any ideas?
--~--~---------~--~----~------------~-------~--~----~



requestLocationUpdates

by Christine » Tue, 11 Nov 2008 04:23:23 GMT


 The documentation says that you can specify these parameters but you
have no guarantee that you will get updates as you specify them.

On Nov 10, 9:09pm, "dave.marsden" <[EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


requestLocationUpdates

by crontabpy » Thu, 27 Nov 2008 20:57:38 GMT


 "In case the provider is disabled by the user, updates will stop, and
the onProviderDisabled(String)  method will be called. As soon as the
provider is enabled again, the onProviderEnabled(String) method will
be called and location updates will start again. "

Is there a way to enable or disable gps provider in the emulator to
get to run this methods?





--~--~---------~--~----~------------~-------~--~----~



requestLocationUpdates

by iAmACyborg » Mon, 22 Dec 2008 10:12:37 GMT


 You'll have to store the last time and place the update was received
for. Then when you get a new update; compare it to the saved values.
If the difference is >= your minimum, update the stored values and
pass the update on.

On Nov 10, 12:09pm, "dave.marsden" <dave.mars...@dragonfly-



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. is there a way to disable the GSM(phone) part of the phone only?

I am trying to disable the GSM on my phone while still being able to
use wifi and/or bluetooth. Airplane mode does not work for me because
it disable all connections. does anybody have any ideas??

Thank You
Haitiankid4lyf

--~--~---------~--~----~------------~-------~--~----~

2. WifiManager

I'm testing WifiManager on a G1 phone, and I have a couple questions.
I don't think I'm thinking about this thing correctly yet.

Anyway, I have an Activity class which is derived from ListActivity,
because I want to list all of the SSID's and their signal strengths.
This class has a member which is a WifiManager.  This calls
WifiManager.startScan().  I have another class which is derived from
BroadcastReceiver, which is only set up for this purpose (it captures
the android.net.wifi.SCAN_RESULTS" action):

<code>
<receiver android:name="ScanReceiver" android:enabled="true">
                <intent-filter>
                        <action android:name="android.net.wifi.SCAN_RESULTS" />
                </intent-filter>
        </receiver>
</code>


How can I call WifiManager.getScanResults() in this BroadcastReceiver
class?  How can I populate the Activity GUI with information?  Do I
have to create an intent, which is handled by the Activity class?  Am
I doing this correctly?

I think the short answer for you guys would be to point me to the G1
source for listing SSIDs (if it's part of the release), since I have
that at my disposal.

Thanks,
Benry

--~--~---------~--~----~------------~-------~--~----~

3. PhoneStateListener not being called back

4. market posting negative installs

5. great idea

6. How to build android

7. Add your application to Android Market for FREE!