What has happened to NetworkLocationProvider.java ?

721 views
Skip to first unread message

Ne0

unread,
Apr 26, 2010, 11:42:17 AM4/26/10
to android-platform
Hi All,

I have noticed on my Nexus One (so Android 2.1) that logcat displays

D/LocationMasfClient( 68): getNetworkLocation(): Returning cache
location with accuracy 1597.0
D/NetworkLocationProvider( 68): removeListener():
apps.genie.geniewidget
D/NetworkLocationProvider( 68): enableLocationTracking(): false

PID 68 is the system_process and as you can see has it appears to have
a LocationMasfClient class and NetworkLocationProvider class. After
being unable to find this code in my Android source tree, i did a
quick search on google, which lead me to the below source code.

http://www.netmite.com/android/mydroid/frameworks/base/location/java/com/android/internal/location/

This however differs from the "open source" and lead me to believe
that this code has been removed, does anyone have any idea why? This
code looks to be Google code as it imports Google named packages.I
would very much like to use this code as it obtains location info
using wifi scan results.

If anyone has any info about this code, please let me know.

Thanks

Ne0

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Mike Lockwood

unread,
Apr 26, 2010, 2:11:18 PM4/26/10
to android-...@googlegroups.com
Hi Ne0,

Yes, the network location provider used to be in the open source, but
has since been removed. We did this because we want the core android
framework to be independent of any Google's services. We were also
concerned that someone might ship a phone that uses network location
without informing the user of its existence. Since it does
communicate the user's location to our servers, we want to ensure that
it is strictly an opt-in service and the users are made aware of our
privacy guidelines. So now we only make NetworkLocation.apk available
in binary form to partners that agree to follow our guidelines on how
it is used.

Mike
--
Mike Lockwood
Google android team

Ne0

unread,
Apr 27, 2010, 4:16:23 AM4/27/10
to android-platform
Thank you for the explanation Mike. This is probably best placed in
the Android-Developers group, but is it possible to write an app that
uses the NetworkLocation package if the user has opted in? My
intentions are for tracking company phones, doing so in one of two
ways. Either have an app on the phone that logs location using GPS/
Cell/Wifi or logs Cell/Wifi data for position finding at a later date
if gps is not available.

Ne0
> >http://www.netmite.com/android/mydroid/frameworks/base/location/java/...
>
> > This however differs from the "open source" and lead me to believe
> > that this code has been removed, does anyone have any idea why? This
> > code looks to be Google code as it imports Google named packages.I
> > would very much like to use this code as it obtains location info
> > using wifi scan results.
>
> > If anyone has any info about this code, please let me know.
>
> > Thanks
>
> > Ne0
>
> > --
> > You received this message because you are subscribed to the Google Groups "android-platform" group.
> > To post to this group, send email to android-...@googlegroups.com.
> > To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/android-platform?hl=en.

Mike Lockwood

unread,
Apr 27, 2010, 8:18:57 AM4/27/10
to android-...@googlegroups.com
Yes, you can access network location via the Location Manager:
http://developer.android.com/reference/android/location/LocationManager.html

Mike

Ne0

unread,
Apr 27, 2010, 9:27:30 AM4/27/10
to android-platform
Thanks, i don't think i explained myself well enough. I have used the
Network Location to get current location though I end up with gaps in
my data. This happens when i lose data connectivity. What i would like
to do is store the current Network info (Cell states and wifi scans)
then request the location for that data at a later stage, when data
connections are possible.

From what i have learnt so far it would appear that it is not
possible. Do you know if this assumption is correct?

On 27 Apr, 13:18, Mike Lockwood <lockw...@android.com> wrote:
> Yes, you can access network location via the Location Manager:http://developer.android.com/reference/android/location/LocationManag...

Mike Lockwood

unread,
Apr 27, 2010, 10:43:52 AM4/27/10
to android-...@googlegroups.com
Right - we don't have support for that.

Mike
Reply all
Reply to author
Forward
0 new messages