Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7668511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:22:56+00:00 2026-05-31T15:22:56+00:00

I use PhoneGap 1.5.0 Cordova for Android, I modified PhoneGap Android official test/example project

  • 0

I use PhoneGap 1.5.0 Cordova for Android,
I modified PhoneGap Android official test/example project and tested it on two different phones.
I send Google geocoding requests but after a few iterations it just stops working.
the same code was ok with PhoneGap 1.4.1

Can you please explain this? Did you already found a solution?

Here is the code:

Geocoder: function() {
    var serviceurl = 'http://maps.googleapis.com/maps/api/geocode/json', geocode, geocodeCoords, geocodeAddress;

    geocode = function(req, cb) {
        $.extend(req, {
            sensor : true,
            region : 'it',
            language : 'it'
        });
        var qs = $.param(req);
        $.ajax({
            type: 'GET',
            url : serviceurl,
            data : qs,
            success : function(d) {
                cb(d.results, d.status);
            },
            error : function(xhr, status, e) {
                alert('geocode error: ' + status);
                console.log(e);
                cb([], status || 'http error');
            }
        });
    };

    geocodeCoords = function(coords, cb) {
        var req = {
            latlng : [coords.latitude, coords.longitude].join(',')
        };
        geocode(req, function(arr, s) {
            cb(arr, s);
        });
    };

    geocodeAddress = function(addr, cb) {
        var req = {
            address : addr
        };
        geocode(req, function(arr, s) {
            cb(arr, s);
        });
    };

    /*
     * 1: obj.coords => { latitude: 0, longitude: 0 } 2: obj.address =>
     * string
     */
    this.geocode = function(obj, cb) {
        if (obj && obj.coords) {
            geocodeCoords(obj.coords, cb);
        } else if (obj && obj.address) {
            geocodeAddress(obj.address, cb);
        } else {
            throw new Error('geocoder failure: nothing to geocode');
        }
    };

    return this;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:22:58+00:00Added an answer on May 31, 2026 at 3:22 pm

    here the explaination and the fix:
    Override Android Backbutton behavior only works on the first page with PhoneGap (last post: link to google group post).

    The problem is in the cordova scripts for androids, line 4831:
    change

    channel.onNativeReady.subscribe(_self.boot);
    

    with

    channel.onNativeReady.subscribeOnce(_self.boot);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on PhoneGap for android and it use cordova-1.5.0.jar, I want to
I'm working on a PhoneGap (aka Cordova) project which makes use of ShareKit 2.0
I'm trying to use PhoneGap DatePicker plugin (PhoneGap 1.5 (Cordova) in Xcode 4.2) for
I'm building a PhoneGap 1.5 (Cordova) application for iOS and want to use the
I'm attempting to use phonegap/cordova to develop an application that contains a music player.
I'm trying to upgrade a phonegap-1.4.1 project that uses the LocalNotification plugin for Android
package com.phonegap; import org.apache.cordova.*; import android.os.Bundle; public class PhoneGapSampleActivity extends DroidGap { /** Called
I am new to Android development with Phonegap and just got through these two
I am making application using phonegap in android. I am using cordova 1.6.1 I
I'm trying to use PhoneGap on Dreamweaver CS6 with the Android SDK. Under Phonegap

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.