Re: [android-developers] Re: Android Geocoder Issues
ok fine i think u not get lat long first check lat long On Wed, Oct 20, 2010 at 5:53 PM, Spiral123 wrote: > > > Yes, getFromLocation does sometimes return no results for no visible > reason. > > I put the command within a TryCatch and throw an exception if I > get 0 results returned. The whole thing is then wrapped in a > countdown loop and I allow up to 3 exceptions before giving up. It's > not pretty but it works for me (>95% of the time anyways). > > > Another suggestion: if you are only going to ever look at the first > result returned, don't request 10 - and certainly not 100! > > > > > > On Oct 19, 5:36 pm, Tommy wrote: > > Hi everyone, > > > > I am using the Geocoder.getFromLocation(lat,lon,1) and it seems that a > > lot of the time nothing gets returned to the List array > > sometimes it works as it is suppose to. Is there a better way to get > > the city/state from the lat/lon that is more reliable? the code I use > > is below: > > > > Geocoder gc = new Geocoder(this, Locale.getDefault()); > > List addresses = null; > > > > addresses = > gc.getFromLocation(lat, lon, 10); > > cityState = > addresses.get(0).getLocality(); > > stateAbrv = > addresses.get(0).getAdminArea(); > > > > When it doesn't work it is because addresses is null > > > > Thanks in advance for the help,tips, and/or advice, > > > > Tommy > > -- > 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 > -- 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
Re: [android-developers] Re: Android Geocoder Issues
I am used this code for get all details from Geo coding : Geocoder gcd = new Geocoder(this, Locale.getDefault()); // 37.775,-122.19 List addresses = gcd.getFromLocation(currentLatitude, currentLongitude, 100); if (addresses.size() > 0) { StringBuilder result = new StringBuilder(); for (int i = 0; i < addresses.size(); i++) { Address address = addresses.get(i); int maxIndex = address.getMaxAddressLineIndex(); for (int x = 0; x <= maxIndex; x++) { result.append(address.getAddressLine(x)); result.append(","); if (address.getLocality() != null) { city = address.getAdminArea(); } } if (address.getPostalCode() != null) { zipcode = address.getPostalCode(); } else if (address.getCountryName() != null) { country = address.getCountryName(); } else { } result.append(address.getLocality()); result.append(","); result.append(address.getPostalCode()); result.append("\n\n"); } On Wed, Oct 20, 2010 at 1:31 PM, James Elsey wrote: > You could try to use the Yahoo APIs for geocoding > > I wrote a quick tutorial here : > > http://www.jameselsey.co.uk/blogs/techblog/tutorial-how-to-call-yahoo-rest-web-services-the-easy-way/ > > On Oct 19, 10:36 pm, Tommy wrote: > > Hi everyone, > > > > I am using the Geocoder.getFromLocation(lat,lon,1) and it seems that a > > lot of the time nothing gets returned to the List array > > sometimes it works as it is suppose to. Is there a better way to get > > the city/state from the lat/lon that is more reliable? the code I use > > is below: > > > > Geocoder gc = new Geocoder(this, Locale.getDefault()); > > List addresses = null; > > > > addresses = > gc.getFromLocation(lat, lon, 10); > > cityState = > addresses.get(0).getLocality(); > > stateAbrv = > addresses.get(0).getAdminArea(); > > > > When it doesn't work it is because addresses is null > > > > Thanks in advance for the help,tips, and/or advice, > > > > Tommy > > -- > 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 > -- 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
Re: [android-developers] How to import the License Verification Library into workspace?
see there other option available chose other and the select android project On Tue, Oct 19, 2010 at 2:09 PM, jlopeznava...@gmail.com < jlopeznava...@gmail.com> wrote: > I can't import the License Verification Library to the workspace. In > the Eclipse wizard I click "File > import" but no Android option > available, if I choose normal Java project then it doesn't work > because it has no Android api reference. How to do? > > Thanks in advance. > > -- > 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 -- 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
Re: [android-developers] Re: how to use alert dialog in services
its is possible just bind your service with activity On Tue, Oct 19, 2010 at 4:31 PM, Rocky wrote: > thanx for tremendous ans. > > but i want to thr alertdialog in any way, like first call activity den thr > alert dialog, or call any java class, den any activity class, and den alert > dialog, > > so i mean, in any way, (any steps), it is not possible. > > > On Tue, Oct 19, 2010 at 4:25 PM, damodhar meshran wrote: > >> Notification ,toast easy implemented in service >> >> On Tue, Oct 19, 2010 at 4:21 PM, Nithin wrote: >> >>> >>> Service, normally use notifications.. not dialog.. >>> >>> Nithin >>> >>> >>> >>> >>> >>> On Oct 19, 3:35 pm, damodhar meshran wrote: >>> > As per my knowledge its is not possible to display dialog in service >>> > >>> > On Tue, Oct 19, 2010 at 3:17 PM, RKJ (Android developer) < >>> > >>> > rkjhaw1...@gmail.com> wrote: >>> > > Hey i want to use alert dialog in services, but i'm not getting the >>> > > dialog, >>> > >>> > > public void myEventOccurred(Event evt) { >>> > >// TODO Auto-generated method stub >>> > >System.out.print(">>>>><<<<<< Event fired..."); >>> > >new AlertDialog.Builder( this ) >>> > >.setTitle( R.string.SaveConnectionChangeWarningTitle ) >>> > >.setMessage( "Alert !" ) >>> > >.setPositiveButton( android.R.string.ok, >>> > > new DialogInterface.OnClickListener() >>> > > { >>> > > public void onClick( DialogInterface dialog, int >>> > > whichButton) >>> > > { >>> > >dialog.dismiss(); >>> > > } >>> > > }) >>> > >.show(); >>> > > } >>> > >>> > > is i'm doing wrong, (this alert dialog code is working in activity). >>> > >>> > > -- >>> > > 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 >>> >>> -- >>> 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 >>> >> >> -- >> 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 >> > > > > -- > Thanks & Regards > > Rakesh Kumar Jha > Software Developer > Symphony Services Corp (India) Pvt Ltd > Bangalore > (O) +918030274295 > (R) +919886336619 > > -- > 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 -- 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
Re: [android-developers] Can I get the facebook profile picture in my application?
ya its is possible . just used facebook SDK On Tue, Oct 19, 2010 at 4:24 PM, rokson wrote: > Hi Friends, > > I am developing a application in android in which i have to get the > facebook profile picture in to my application. > > Is it possible in android? > > I have done the wallpost and share functionalities in my app with > facebook. > > please help me. > > Thanks and Regards, > > Kiran. > > > > -- > 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 -- 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
Re: [android-developers] Re: how to use alert dialog in services
Notification ,toast easy implemented in service On Tue, Oct 19, 2010 at 4:21 PM, Nithin wrote: > > Service, normally use notifications.. not dialog.. > > Nithin > > > > > > On Oct 19, 3:35 pm, damodhar meshran wrote: > > As per my knowledge its is not possible to display dialog in service > > > > On Tue, Oct 19, 2010 at 3:17 PM, RKJ (Android developer) < > > > > rkjhaw1...@gmail.com> wrote: > > > Hey i want to use alert dialog in services, but i'm not getting the > > > dialog, > > > > > public void myEventOccurred(Event evt) { > > >// TODO Auto-generated method stub > > >System.out.print(">>>>><<<<<< Event fired..."); > > >new AlertDialog.Builder( this ) > > >.setTitle( R.string.SaveConnectionChangeWarningTitle ) > > >.setMessage( "Alert !" ) > > >.setPositiveButton( android.R.string.ok, > > > new DialogInterface.OnClickListener() > > > { > > > public void onClick( DialogInterface dialog, int > > > whichButton) > > > { > > >dialog.dismiss(); > > > } > > > }) > > >.show(); > > > } > > > > > is i'm doing wrong, (this alert dialog code is working in activity). > > > > > -- > > > 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 > > -- > 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 > -- 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
Re: [android-developers] how to use alert dialog in services
As per my knowledge its is not possible to display dialog in service On Tue, Oct 19, 2010 at 3:17 PM, RKJ (Android developer) < rkjhaw1...@gmail.com> wrote: > Hey i want to use alert dialog in services, but i'm not getting the > dialog, > > public void myEventOccurred(Event evt) { >// TODO Auto-generated method stub >System.out.print("><< Event fired..."); >new AlertDialog.Builder( this ) >.setTitle( R.string.SaveConnectionChangeWarningTitle ) >.setMessage( "Alert !" ) >.setPositiveButton( android.R.string.ok, > new DialogInterface.OnClickListener() > { > public void onClick( DialogInterface dialog, int > whichButton) > { >dialog.dismiss(); > } > }) >.show(); > } > > is i'm doing wrong, (this alert dialog code is working in activity). > > -- > 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 -- 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
Re: [android-developers] requestLocationUpdates / non-UI-thread / getMainLooper()
why u used loop update-location lister update location automatically On Wed, Sep 29, 2010 at 9:05 PM, Pent wrote: > Is there anything wrong with specifying the main thread looper to > handle messages about location update like this: > > lm.requestLocationUpdates( > LocationManager.GPS_PROVIDER, > 0L, > 0L, > locListenerGPS, > Looper.getMainLooper() > ); > > (call is made from a non-UI thread) > > Am I going to start getting weird unexplicable errors in other places > due to the looper voodoo ? > > Thanks, > > Pent > > -- > 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 -- 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