[android-developers] Re: onLocationChanged Not Calling
Thanks Manoj.. The firmware on Tatoo is 1.6... On May 1, 12:57 am, MB manoj.bi...@gmail.com wrote: I am facing a similar issue on emulator running 1.5. It does not happen on emulator running 2.1 You can find more details regarding these difference in the following thread (A few comments are conflicting). http://code.google.com/p/android/issues/detail?id=2545 Perhaps this bug exists even on real devices running firmware 1.5. I hope some experience developers can comment on this. What is the firmware version on your Tatoo? On Apr 30, 7:46 am, Nithin nithin.war...@gmail.com wrote: Hi, I write a class which implements LocationListener. Its just listeneing to the location. I tried the code in Tatoo, but its not working. The code is.. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); tv = new TextView(this); latLongString = Lat: + currLat + \nLong: + currLong; tv.setText(latLongString); setContentView(tv, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); } public void onLocationChanged(Location location) { // TODO Auto-generated method stub System.out.println( onLocationChanged :: ); if (location != null) { latLongString = Lat : + location.getLatitude() + Long : + location.getLongitude(); Log.i(onLocationChanged(): , latLongString); Toast.makeText(this, latLongString, Toast.LENGTH_SHORT).show(); tv.setText(latLongString); } else { latLongString = Location not found; tv.setText(latLongString); } // tv.invalidate(); } onLocationChanged is not calling at all. GPS is enabled in the device and I put all permissions in manifest also. uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / Nithin -- 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, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- 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, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- 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, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: onLocationChanged Not Calling
In my case, the problem was, I was checking inside the building. I just go out and checked. Its working fine. Nithin On May 1, 1:21 pm, Nithin nithin.war...@gmail.com wrote: Thanks Manoj.. The firmware on Tatoo is 1.6... On May 1, 12:57 am, MB manoj.bi...@gmail.com wrote: I am facing a similar issue on emulator running 1.5. It does not happen on emulator running 2.1 You can find more details regarding these difference in the following thread (A few comments are conflicting). http://code.google.com/p/android/issues/detail?id=2545 Perhaps this bug exists even on real devices running firmware 1.5. I hope some experience developers can comment on this. What is the firmware version on your Tatoo? On Apr 30, 7:46 am, Nithin nithin.war...@gmail.com wrote: Hi, I write a class which implements LocationListener. Its just listeneing to the location. I tried the code in Tatoo, but its not working. The code is.. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); tv = new TextView(this); latLongString = Lat: + currLat + \nLong: + currLong; tv.setText(latLongString); setContentView(tv, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); } public void onLocationChanged(Location location) { // TODO Auto-generated method stub System.out.println( onLocationChanged :: ); if (location != null) { latLongString = Lat : + location.getLatitude() + Long : + location.getLongitude(); Log.i(onLocationChanged(): , latLongString); Toast.makeText(this, latLongString, Toast.LENGTH_SHORT).show(); tv.setText(latLongString); } else { latLongString = Location not found; tv.setText(latLongString); } // tv.invalidate(); } onLocationChanged is not calling at all. GPS is enabled in the device and I put all permissions in manifest also. uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / Nithin -- 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, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- 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, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- 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, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- 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, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: onLocationChanged Not Calling
I am facing a similar issue on emulator running 1.5. It does not happen on emulator running 2.1 You can find more details regarding these difference in the following thread (A few comments are conflicting). http://code.google.com/p/android/issues/detail?id=2545 Perhaps this bug exists even on real devices running firmware 1.5. I hope some experience developers can comment on this. What is the firmware version on your Tatoo? On Apr 30, 7:46 am, Nithin nithin.war...@gmail.com wrote: Hi, I write a class which implements LocationListener. Its just listeneing to the location. I tried the code in Tatoo, but its not working. The code is.. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); tv = new TextView(this); latLongString = Lat: + currLat + \nLong: + currLong; tv.setText(latLongString); setContentView(tv, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); } public void onLocationChanged(Location location) { // TODO Auto-generated method stub System.out.println( onLocationChanged :: ); if (location != null) { latLongString = Lat : + location.getLatitude() + Long : + location.getLongitude(); Log.i(onLocationChanged(): , latLongString); Toast.makeText(this, latLongString, Toast.LENGTH_SHORT).show(); tv.setText(latLongString); } else { latLongString = Location not found; tv.setText(latLongString); } // tv.invalidate(); } onLocationChanged is not calling at all. GPS is enabled in the device and I put all permissions in manifest also. uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / Nithin -- 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, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- 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, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en