Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-10309

Android: Ti.Geolocation.forwardGeocoder() callback is not called for a bad address

    Details

      Description

      Issue

      When an address is passed into Ti.Geolocation.forwardGeocoder() the callback function is not called and it gets stuck in an infinite loop. It should behave just like it does on iOS where the callback is called upon success/failure. The sample code is attached. On iOS we receive both alerts that the callback was successful and the finished alert. On Android we do not see the alert that the callback was successful just that we started the fowardGeocoder().

      Sample Code

      var win = Ti.UI.createWindow({
          backgroundColor : 'white'
      });
      //create object instance, a parasitic subclass of Observable
      var self = Ti.UI.createView();
      win.add(self);
       
      win.open();
       
      var addr = '94302';
       
      setTimeout(function() {
          alert('Start forwardGeocoder for: ' + addr);
          try {
              Ti.Geolocation.forwardGeocoder(addr, function(evt) {
                  alert('Foward Geocoder Callback for 94302 Successful');
              });
          } catch(err) {
              alert("Error");
          }
       
      }, 2000);
       
      setTimeout(function() {
          addr = 'hhhhhhgggggg';
          alert('Start forwardGeocoder for: ' + addr);
          try {
              Ti.Geolocation.forwardGeocoder(addr, function(evt) {
                  alert('Foward Geocoder Callback for ' + addr + ' Successful');
                  setTimeout(function() {
                      alert('finished');
                  }, 2000);
              });
          } catch(err) {
              alert("Error 2");
          }
       
      }, 8000); 
      

        Attachments

          Activity

            People

            • Assignee:
              pwang Ping Wang
              Reporter:
              vjoshi Varun Joshi
              Tester:
              Lokesh Choudhary
            • Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-5627
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code