[android-developers] Re: Displays on emulator, not on phone

2010-04-05 Thread RMD
I think I found it. getBestProvider() Thanks again for your help everyone, rd42 On Apr 5, 8:41 am, RMD wrote: > >No, LocationManager.GPS_PROVIDER, presently, has a value of "gps". It's > >more that, in case for some crazy reason they change that convention, > > Great info, thanks. > > Would wo

[android-developers] Re: Displays on emulator, not on phone

2010-04-05 Thread RMD
>No, LocationManager.GPS_PROVIDER, presently, has a value of "gps". It's >more that, in case for some crazy reason they change that convention, Great info, thanks. Would would be a good way to code it if I want the LocationManager to use network if GPS is not available, like when your in a buildi

[android-developers] Re: Displays on emulator, not on phone

2010-04-04 Thread Bob Kerns
In addition to this fine reason, using the provided symbol will allow the compiler to catch any typos, while simultaneously making it clear that you are using a standard value, and allowing you to see the documentation for that value with the mouse. It's a big win all around. On Apr 4, 5:09 am, M

Re: [android-developers] Re: Displays on emulator, not on phone

2010-04-04 Thread Mark Murphy
RMD wrote: > I had tried LocationManager.GPS_PROVIDER but for some reason I didn't > work. I can't remember now if I tried it before or after I realized > the GPS was off :) > > LocationManager.GPS_PROVIDER is supposed to use whatever location > source is available right? No, LocationManager.GPS

[android-developers] Re: Displays on emulator, not on phone

2010-04-04 Thread RMD
I had tried LocationManager.GPS_PROVIDER but for some reason I didn't work. I can't remember now if I tried it before or after I realized the GPS was off :) LocationManager.GPS_PROVIDER is supposed to use whatever location source is available right? Thanks, RMD On Apr 3, 8:05 am, Mark Murphy

Re: [android-developers] Re: Displays on emulator, not on phone

2010-04-03 Thread ~ TreKing
On Fri, Apr 2, 2010 at 5:16 PM, HeHe wrote: > is there any way that an apk can know whether it is running in 'debug' or > 'production' mode? > If you always set debuggable=true for debug builds and debuggable=false for release, then you can check if the "debuggable" attribute is set in your mani

Re: [android-developers] Re: Displays on emulator, not on phone

2010-04-03 Thread Mark Murphy
RMD wrote: > Thanks for all the responses. I'm embarrassed to admit, but I had the > GPS turned off in the phone. Since, > > locm.requestLocationUpdates("gps", 0, 0,onLocationChange); > > was specifically set to "gps" it wouldn't work. > > To address that I have it check if the gps is on and u

[android-developers] Re: Displays on emulator, not on phone

2010-04-03 Thread RMD
Thanks for all the responses. I'm embarrassed to admit, but I had the GPS turned off in the phone. Since, locm.requestLocationUpdates("gps", 0, 0,onLocationChange); was specifically set to "gps" it wouldn't work. To address that I have it check if the gps is on and use network if the gps is di

[android-developers] Re: Displays on emulator, not on phone

2010-04-02 Thread HeHe
someone said Config.DEBUG or Config.RELEASE may help. however, when i build and run my apk by the "Debug" menu item within Eclipse IDE, my apk always logs "Config.DEBUG" to be "false". do you or anyone else have an idea of how to have a DEBUG build and have Config.DEBUG to have correct value ("tr

Re: [android-developers] Re: Displays on emulator, not on phone

2010-04-02 Thread Mark Murphy
HeHe wrote: > Mark, > > thanks for the information. > > before it, i've been the wrong knowledge that apk running on real > phone is in 'production' mode and should use 'production' map api key - > _|| > > is there any way that an apk can know whether it is running in 'debug' > or 'production' m

[android-developers] Re: Displays on emulator, not on phone

2010-04-02 Thread HeHe
Mark, thanks for the information. before it, i've been the wrong knowledge that apk running on real phone is in 'production' mode and should use 'production' map api key - _|| is there any way that an apk can know whether it is running in 'debug' or 'production' mode? thanks! On Apr 2, 12:51 p

Re: [android-developers] Re: Displays on emulator, not on phone

2010-04-02 Thread Mark Murphy
HeHe wrote: > perhaps need to check map api key. > > map api key for emulator seems not usable for phone. The same Google Maps add-on API key works fine on both the emulator and the device. Where things differ is when you change the APK signing from debug mode (normal) to production mode -- *then

[android-developers] Re: Displays on emulator, not on phone

2010-04-02 Thread HeHe
perhaps need to check map api key. map api key for emulator seems not usable for phone. On Apr 2, 5:51 am, RMD wrote: > The following code will display location data  on the screen in the > emulator but not on an actual device.  Any ideas on why? > > Thank you for any help. > > line from android