[android-developers] Re: LocationManager with 3G

2013-04-09 Thread Diego Nunes
I realized that it works after I reboot the device. Att, On Monday, April 8, 2013 3:31:38 PM UTC-3, Diego Nunes wrote: > > Someone? > > On Thursday, April 4, 2013 6:27:39 PM UTC-3, Diego Nunes wrote: >> >> Good afternoon. >> >> I have an application that retrieves the location from the Provider

[android-developers] Re: LocationManager with 3G

2013-04-08 Thread Diego Nunes
Someone? On Thursday, April 4, 2013 6:27:39 PM UTC-3, Diego Nunes wrote: > > Good afternoon. > > I have an application that retrieves the location from the Provider > network, the problem is that the location is no longer being recovered ( > not happening in onLocationChange) when using 3G, Wi-Fi

[android-developers] Re: LocationManager - called very often when moving

2011-07-23 Thread Jan Nielsen
The problem was a bug removeing, and re-requesting updates very often. The minTime as you all know if not a gurantee, so when you unregister, and re-register and theres a gps update ready it gets fired right after you request it. If you then unregister and re-register ... :) On 21 Jul., 21:00, Ja

[android-developers] Re: LocationManager - called very often when moving

2011-07-21 Thread Jan Nielsen
I dont think there is any other programs requesting GPS, I have navigation app, but not running when I tested my app. I only request the update one place and before that I remove any registered listeners. LocationManager mlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); m

[android-developers] Re: LocationManager - called very often when moving

2011-07-21 Thread lbendlin
Is your app the only one consuming the GPS? Did you maybe register another listener? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, s

[android-developers] Re: LocationManager speed

2011-01-01 Thread ip332
IMHO hasSpeed() is an attribute of the LocationProvider, not the LocationManager and most likely the GPS_PROVIDER doesn't have speed in case of emulator. In other words, speed is an optional attribute not every LocationProvider has. I would assume that any real GPS_PROVIDER has it but not NETWORK_P

Re: [android-developers] Re: LocationManager requestLocationUpdates and pending intents

2010-09-12 Thread Federico Paolinelli
On Sun, Sep 12, 2010 at 12:09 PM, Mark Murphy wrote: > On Sun, Sep 12, 2010 at 5:23 AM, Federico Paolinelli > wrote: >> I think a classic service would be more suitable than an IntentService >> for this purpouse. > > Correct. > >> The intent service, and therefore your wakeful one, does its job

Re: [android-developers] Re: LocationManager requestLocationUpdates and pending intents

2010-09-12 Thread Mark Murphy
On Sun, Sep 12, 2010 at 5:23 AM, Federico Paolinelli wrote: > I think a classic service would be more suitable than an IntentService > for this purpouse. Correct. > The intent service, and therefore your wakeful one, does its job and > then dies after the onHandleIntent is called. > If you imple

Re: [android-developers] Re: LocationManager requestLocationUpdates and pending intents

2010-09-12 Thread Federico Paolinelli
>> Another option >> could be periodically starting a service with an alarm, try to get the >> location and then shut down the location updates. In this way I would >> be pretty sure the radio is off when I don't need location updates. > > Right. Creating a variation on WakefulIntentService that su

Re: [android-developers] Re: LocationManager requestLocationUpdates and pending intents

2010-09-09 Thread Mark Murphy
On Thu, Sep 9, 2010 at 8:34 AM, Federico Paolinelli wrote: > Would this be true also for coarse locations? If you mean the network provider, that should be a lot less, but I haven't experimented much with this provider. > Another option > could be periodically starting a service with an alarm, t

Re: [android-developers] Re: LocationManager requestLocationUpdates and pending intents

2010-09-09 Thread Federico Paolinelli
>> In this way I would use the resources only after the event I am >> interested to (the change of the location) and could prevent me to >> keep a service always running with an active location listener. > > Bear in mind that the battery cost of the GPS radio being on will > swamp any other battery

Re: [android-developers] Re: LocationManager requestLocationUpdates and pending intents

2010-09-09 Thread Mark Murphy
On Thu, Sep 9, 2010 at 2:30 AM, Federico Paolinelli wrote: > What I need to know (and probably I wasn't so clear) is: > Will the locationmanager fire the pending intents even if the caller > of requestLocationUpdate was killed? AFAIK, it should, as that is typically how the PendingIntent-based me

[android-developers] Re: LocationManager requestLocationUpdates and pending intents

2010-09-08 Thread Federico Paolinelli
On 9 Set, 00:51, "Maps.Huge.Info (Maps API Guru)" wrote: > Just kill the listener in the onStop or onDestroy (depending how you > structure your app) methods. That works pretty well. > > -John Coryat Well, what I need to do is to react to changes of location in background too, so it is the exact

[android-developers] Re: LocationManager requestLocationUpdates and pending intents

2010-09-08 Thread Maps.Huge.Info (Maps API Guru)
Just kill the listener in the onStop or onDestroy (depending how you structure your app) methods. That works pretty well. -John Coryat -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@

[android-developers] Re: LocationManager/Listener, use gps data

2010-07-27 Thread cookieLabs
just implement the LocationListener interface methods with the action you want to perform (e.g. for every location change update your application view) and instantiate the GeoDataGateway in your Activity. On Jul 25, 11:31 pm, ArtworkAD wrote: > Hi all, > > I am working on a gps gateway to provide

[android-developers] Re: LocationManager always returns null ... ?

2009-08-26 Thread Emre A. Yavuz
Thanks Mark, I'll give it a try ... Emre > Date: Wed, 26 Aug 2009 13:16:33 -0400 > Subject: [android-developers] Re: LocationManager always returns null ... ? > From: mmur...@commonsware.com > To: android-developers@googlegroups.com > > > > Anyway, the

[android-developers] Re: LocationManager always returns null ... ?

2009-08-26 Thread Mark Murphy
> Anyway, the code seems to work fine, but locationManager always returns > null even though I tried to send mock location data to the Android > Emulator via the DDMS application using the "Manual Location" tab. > Whatever I send seems to be ignored. I also tried establishing a telnet > connecton

[android-developers] Re: LocationManager and PendingIntent problem

2009-08-03 Thread Lutz Schönemann
Okay, I managed to get it to work on a real phone (Google Dev Phone 1). But why doesn't it work on an emulator? Is there more to do than just use the geo command? Am 03.08.2009 um 19:02 schrieb Dianne Hackborn: > Please look at the examples in ApiDemos. > > 2009/8/3 Lutz Schönemann > > I h

[android-developers] Re: LocationManager and PendingIntent problem

2009-08-03 Thread Dianne Hackborn
Please look at the examples in ApiDemos. 2009/8/3 Lutz Schönemann > > I have created a new project focusing on that problem. > Now the PendingIntent.getBroadcast() method doesn't try to start an > activity any longer. > > But the problem that the LocationManager doesn't fire the intent still > c

[android-developers] Re: LocationManager and PendingIntent problem

2009-08-03 Thread Lutz Schönemann
I have created a new project focusing on that problem. Now the PendingIntent.getBroadcast() method doesn't try to start an activity any longer. But the problem that the LocationManager doesn't fire the intent still consists. I have a Activity that creates a PendingIntent and calls the addPr

[android-developers] Re: LocationManager NullPointerException

2009-07-30 Thread Yusuf T. Mobile
Is there any more to the stack trace? The only thing I can think of is you providing a null criteria to getBestProvider(). Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not ne

[android-developers] Re: LocationManager causes application to crash

2009-02-04 Thread pulkit
Hi chander, permissions are already outside the application tag. Thanks anyway. On Feb 4, 8:26 pm, Chander Pechetty wrote: > Put the permissions outside the application tag. and try --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[android-developers] Re: LocationManager causes application to crash

2009-02-04 Thread Chander Pechetty
Put the permissions outside the application tag. and try --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsu

[android-developers] Re: LocationManager causes application to crash

2009-02-04 Thread pulkit
Mark, Thanks for the reply, but I guess all permissions are in right place as they are reflected in the Eclipse's view as well. JS, Thanks a lot for the suggestion. I'm able to see all the permissions in the Eclipse's view but still application crashes. No joy, we're really stuck here. Any other

[android-developers] Re: LocationManager causes application to crash

2009-02-03 Thread JS
The permissions xml tags are wierd. Try going to do "Permissions" tab in the Eclipse's AndroidManifest.xml view. Now see if all the permissions are shown in the List. Making sure they all show there usually solves my permission problems. Anyone what changes? On Feb 3, 6:12 am, Mark Murphy w

[android-developers] Re: LocationManager causes application to crash

2009-02-03 Thread Mark Murphy
pulkit wrote: > Pratap > > here is the logcat trace. What we understand from this is that it > requires ACCESS_FINE_LOCATION permission > which you suggested in first place. Now that we have specified it in > our manifest.xml, what might be the issue? > > We define permissions as:- > > >

[android-developers] Re: LocationManager causes application to crash

2009-02-02 Thread pulkit
Pratap here is the logcat trace. What we understand from this is that it requires ACCESS_FINE_LOCATION permission which you suggested in first place. Now that we have specified it in our manifest.xml, what might be the issue? We define permissions as:- Thank

[android-developers] Re: LocationManager causes application to crash

2009-02-02 Thread PRATAP SOLAPUR
post the stack trace of ur logcatso that i can kno wat kind of error ur getting. On 2/3/09, pulkit wrote: > > > Thanks for replying Pratap, but unfortunately it didn't fix the > problem. > Any other suggestion please? > > On Feb 3, 10:23 am, PRATAP SOLAPUR wrote: > > Add ACCESS_FINE_LOC

[android-developers] Re: LocationManager causes application to crash

2009-02-02 Thread pulkit
Thanks for replying Pratap, but unfortunately it didn't fix the problem. Any other suggestion please? On Feb 3, 10:23 am, PRATAP SOLAPUR wrote: > Add ACCESS_FINE_LOCATION permission and INTERNET permission > > On 2/3/09, pulkit wrote: > > > > > Hi, > > > We're working on Location b

[android-developers] Re: LocationManager causes application to crash

2009-02-02 Thread PRATAP SOLAPUR
Add ACCESS_FINE_LOCATION permission and INTERNET permission On 2/3/09, pulkit wrote: > > > Hi, > > We're working on Location based services with android emulator. But > the issue is that the application crashes when any of the following > statements executes:- > > Location location =

[android-developers] Re: LocationManager

2008-11-09 Thread Christine
The emulator doesn't have a gps device. If you want to test it, you have to use the location test tools that come with the sdk. In Eclipse, there's a tool in DDMS that allows you to enter gps coordinates for the emulator. Here (http://kurl.nl?44FE) is a tool that converts locations to gps coordina

[android-developers] Re: locationmanager,getLatitude function

2008-11-02 Thread CSUIDL PROGRAMMEr
Hello nkijak, I could not find your upated code. Also, i tried running the maps, ( including kml file, manually sending decimal) .But the Nullpointer exception exists. Is there anyone here who as got gps simulation working in android here. Thanks On Oct 23, 6:24 am, nkijak <[EMAIL PROTECTED]> wro

[android-developers] Re: locationmanager,getLatitude function

2008-10-23 Thread nkijak
Hello, I updated your code on that site to be more "correct". You should stick with the static variable instead of hardcoding the string "gps". You get a null pointer because you have to provide a location first, meaning run the KML, then you can call getLastKnownLocation. When the emulator star

[android-developers] Re: locationmanager,getLatitude function

2008-10-23 Thread Mast3rpyr0
does getLastKnownLocation have a location to give yet? try running maps first then run your app On Oct 22, 11:42 pm, CSUIDL PROGRAMMEr <[EMAIL PROTECTED]> wrote: > Hello, > I am a newbie android developer. I am trying to simulate gps > functionality in android sdk 1.0. > > I am using location man

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread code_android_festival_way
So I got it working now. I'm using the service thread to get the location. And that's the way I did it: http://paste.pocoo.org/show/b67L69qf5QDNtq1pTzZz/ It works pretty fine. But you should add some timeout to the condition.await() of the background thread. Regards! On 21 Aug., 16:45, code_a

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread code_android_festival_way
"The LocationManager.request*Updates methods must be called from a Looper thread, such as the main thread of an Activity. Additional method variants have been added that take an explicit Looper argument to allow for use outside of a main thread." This could be the solution for my problem. Now I h

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread code_android_festival_way
Thank you for your response. I will try handling this in a different way now. If I'm struggling I will come back to your offer. :-) Regards! On 21 Aug., 15:38, Mark Murphy <[EMAIL PROTECTED]> wrote: > code_android_festival_way wrote: > > In M5 I only called "getCurrentLocation()" and everything

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread Mark Murphy
code_android_festival_way wrote: > In M5 I only called "getCurrentLocation()" and everything was fine. > Now as the methode is gone I need to set this update request to the > LocationManager in order to get a not outdatet position. To achieve > that I have to loop inside my "geo location" class an

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread code_android_festival_way
Well I'm starting a service from my main thread. (some activity) In the service I'm starting a new thread and do some work. (communication with external APIs (flickr)) While that work I need the position of the device. To get the position I had written this class: http://paste.pocoo.org/show/80yp

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread Reto
I agree. There's definitely a very good chance that the while loop is blocking the listener callback. Note: I believe he's running the whole lot in a new thread (and forcing the update requests to fire on that same thread) rather than the main event thread, but it still turns in to the same probl

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread Eng . Mazen
hello dears, sorry for this interrupted question but i'm tring to download the SDK 0.9 but the following error appears: The requested URL /android/android-sdk-windows-0.9_beta.zip was not found on this server. any help ! On 8/21/08, code_android_festival_way <[EMAIL PROTECTED]> wrote: > > >

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread Mark Murphy
code_android_festival_way wrote: > Could it be that my "while" loop blocks the class (thread) and so the > listenere cant be invoked? Sorry, I haven't looked at your code. But you may be right on this. Android applications have the main event thread, plus any secondary threads you create on you

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread code_android_festival_way
Well I've chosen the 0 because the sample appliction provided by google uses the same parameter value. Could it be that my "while" loop blocks the class (thread) and so the listenere cant be invoked? On 21 Aug., 13:57, Reto <[EMAIL PROTECTED]> wrote: > Getting the status bar icon is a good sign

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread Reto
Getting the status bar icon is a good sign -- that means the GPS_PROVIDER is receiving the updates. I've got one more cheap/easy idea for you. I'm not sure if 0 is a valid limit to set for the refresh time / distance. Try setting it to 1000 (milliseconds) and 1 (meter) to see if that helps. On 2

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread code_android_festival_way
Thank you for your reponse. I've changed the order the other way round but get the same result. Waiting for the Listener to be invoked but nothing happens. I tried it with the DDMS again and get an icon in the status bar (http:// img.skitch.com/20080821-eypgin7w8fd9ku3ftj1ix38s7.jpg) after pushin

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread Reto
I'm not at a PC I can test with, but try switching the order of your setTestProviderEnabled and setTestProviderStatus commands. I know in my code I've done it the other way around :) On 21 Aug, 11:10, code_android_festival_way <[EMAIL PROTECTED]> wrote: > I've added > > Location loc = new Locatio

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread code_android_festival_way
I've added Location loc = new Location(lP.getName()); loc.setLatitude(37.422006); loc.setLongitude(-122.084095); lM.setTestProviderLocation(lP.getName(), loc); but the LocationListener doesnt get called. So I get no location update. On 21 Aug., 11:46, code_android_festival_way <[EMAIL PROTECT

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread code_android_festival_way
Ok. It was a silly question. Looper.prepare(); added. But I dont get any LocationUpdates. I have pushed locations to the device through the DDMS interface but get no LocationUpdate. On 21 Aug., 11:40, code_android_festival_way <[EMAIL PROTECTED]> wrote: > Thank you for your reponse. I'm trying

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-21 Thread code_android_festival_way
Thank you for your reponse. I'm trying to implement the requestUpdates() now. At the moment I'm faced with the follwing problem. I've implemented the LocationListener but always get the following LogCat error. Can't create handler inside thread that has not called Looper.prepare() Well I'm calli

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-20 Thread Reto
The getLastKnownLocation method will return null until the provider you specify has gotten at least one update. In practice that means you need to have an application (any application, doesn't have to be the one your testing) request (and receive) updates at least once in your emulator session bef

[android-developers] Re: LocationManager - getLastKnownLocation() - NullPointer Exception

2008-08-20 Thread Reto
The getLastKnownLocation method will return null until the provider you specify has gotten at least one update. In practice that means you need to have an application (any application, doesn't have to be the one your testing) request (and receive) updates at least once in your emulator session bef

[android-developers] Re: LocationManager: getLastKnownLocation and getBestProvider broken?

2008-04-10 Thread Ram
>Should I simulate location through code, bypassing the locationProvider? This is what I plan to do. I don't think there are any specific recommendations on what to do. Some apps will probably use the mock gps provider and some more will simulate location. Since your app supports people picking

[android-developers] Re: LocationManager: getLastKnownLocation and getBestProvider broken?

2008-04-10 Thread [EMAIL PROTECTED]
Hey Ram , I see I can't provide a 'provider' . Is there any recommendation about what we should do? My app will be boring if it is stuck in Mountain View on the gps the whole time. Should I simulate location through code, bypassing the locationProvider? Or provide an option to switch between the

[android-developers] Re: LocationManager: getLastKnownLocation and getBestProvider broken?

2008-04-10 Thread Ram
That is good to know, btw please remember that you cannot use a custom mock location provider for challenge-submissions. The judges will not adb-push kml or properties files On Apr 10, 9:08 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thanks Ram. I have a properties file and my provider

[android-developers] Re: LocationManager: getLastKnownLocation and getBestProvider broken?

2008-04-10 Thread [EMAIL PROTECTED]
Thanks Ram. I have a properties file and my provider is working now. However, I still get null from getBestProvider and getLastKnownLocation. I guess I can workaround this for now. On Apr 10, 12:22 am, Ram <[EMAIL PROTECTED]> wrote: > >>I have realized now I can implement a mock location provide

[android-developers] Re: LocationManager: addProximityAlert not working

2008-04-10 Thread john
Whoops! Sorry I did not see the other posts on this not working. I guess I will have to write my own proximity alert function for the contest until this one is working. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

[android-developers] Re: LocationManager: getLastKnownLocation and getBestProvider broken?

2008-04-10 Thread Ram
>>I have realized now I can implement a mock location provider, Btw you may want to keep in mind that as per http://groups.google.com/group/android-challenge/browse_thread/thread/4412631fb4d5e285/27e9df98fd31c5c1#27e9df98fd31c5c1 challenge entries cannot submit kml files and so they cannot rely o

[android-developers] Re: LocationManager: getLastKnownLocation and getBestProvider broken?

2008-04-10 Thread [EMAIL PROTECTED]
Made some more progress here. Cut my kml file down from 280k to 10k and that sped up emulator load time from 7 minutes to 2minutes. Also fixed a typo in my properties file and got rid of the NPEs. However, I still get NULL back from getBestProvider and getLastKnownLocation everytime. getCurrentL

[android-developers] Re: LocationManager: getLastKnownLocation and getBestProvider broken?

2008-04-09 Thread [EMAIL PROTECTED]
I also changed my filename to kml instead of location or location.kml and I still have the same problem: ERROR/JavaBinder(516): java.lang.NullPointerException ERROR/JavaBinder(516): at android.server.LocationManagerService.readLastKnownLocation(LocationManagerService.java: 226) ERROR/JavaBind

[android-developers] Re: LocationManager: getLastKnownLocation and getBestProvider broken?

2008-04-09 Thread [EMAIL PROTECTED]
Here is the exception I mentioned in the first post. I get this when calling getLastKnownLocation using the gps provider: E/LocationManagerService( 516): NumberFormatException reading /data/ misc/location/gps/location E/LocationManagerService( 516): java.lang.NumberFormatException: E/LocationMa

[android-developers] Re: LocationManager: getLastKnownLocation and getBestProvider broken?

2008-04-09 Thread [EMAIL PROTECTED]
I have realized now I can implement a mock location provider, and have done that by creating a kml file from google earth, creating a directory parallel to gps, and placed 2 files in it: location and properties. I have also tried location.kml, but both return null from getCurrentLocation and getLa

[android-developers] Re: LocationManager crashes app, every time

2008-04-03 Thread JoeB
No, only one emulator, but thanks for asking. After wiping emulator data and launching in debug mode from eclipse a few times, I was finally able to see logcat output. Ultimately it was a permission typo causing the crash. Still no idea why I couldn't get log info before. For anyone who is cur

[android-developers] Re: LocationManager crashes app, every time

2008-04-02 Thread guzarva
On Apr 3, 7:09 am, "Harsh Jain" <[EMAIL PROTECTED]> wrote: > are you running this in a second emulator by any chance ? > > > > On Thu, Apr 3, 2008 at 5:35 AM, JoeB <[EMAIL PROTECTED]> wrote: > > > Hi, > > > Any advice on this would help--I can never get a provider from > > LocationManager (there

[android-developers] Re: LocationManager crashes app, every time

2008-04-02 Thread guzarva
On Apr 3, 7:05 am, JoeB <[EMAIL PROTECTED]> wrote: > Hi, > > Any advice on this would help--I can never get a provider from > LocationManager (there is supposed to be a mock one at least, and I > can see the data for it by using "adb shell").  I also can't get > locations or anything else.  Any

[android-developers] Re: LocationManager crashes app, every time

2008-04-02 Thread Harsh Jain
are you running this in a second emulator by any chance ? On Thu, Apr 3, 2008 at 5:35 AM, JoeB <[EMAIL PROTECTED]> wrote: > > Hi, > > Any advice on this would help--I can never get a provider from > LocationManager (there is supposed to be a mock one at least, and I > can see the data for it by u