1. #1
    Ext User
    Join Date
    Sep 2010
    Posts
    1
    Vote Rating
    0
    JoshAAiM is on a distinguished road

      0  

    Default Issue with Android geolocation...

    Issue with Android geolocation...


    Hello everyone - loving Sencha...absolutely incredible! I am...of course having an issue or wouldn't be posting

    Any help on the following would be much appreciated - I'm sure it is something stupid but I cannot find the issue anywhere.

    I am doing a geolocation on a map object. Everything works wonderfully in the iPhone (3, 3g, 4), iPad, etc. Android for some reason will not locate at all. This only seems to have become an issue in some of the later Sencha releases, however, I'm not exactly sure when it stopped working!

    I have used the android emulator and ADB - and have looked in the console and am getting the following error when trying to invoke the geolocation from android...

    E/LocationManagerService( 51): requestUpdates got exception: E/LocationManagerService( 51): java.lang.IllegalArgumentException: provider=network E/LocationManagerService( 51): at com.android.server.LocationManagerService.requestLocationUpdatesLocked(LocationManagerService.java:861) E/LocationManagerService( 51): at com.android.server.LocationManagerService.requestLocationUpdates(LocationManagerService.java:831) E/LocationManagerService( 51): at android.location.ILocationManager$Stub.onTransact(ILocationManager.java:79) E/LocationManagerService( 51): at android.os.Binder.execTransact(Binder.java:287) E/LocationManagerService( 51): at dalvik.system.NativeStart.run(Native Method)


    Has anyone experienced this or have any thoughts?

    Thanks!

  2. #2
    Sencha User
    Join Date
    Dec 2010
    Posts
    69
    Vote Rating
    0
    irocker is on a distinguished road

      0  

    Default


    I'd like to get an answer to this too... I am having the same problem, geolocation works on iPhone but not Android.

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    3
    Vote Rating
    0
    WEBcast is on a distinguished road

      0  

    Default


    I think there is a bad evaluation for GeoLocation provider in original code.

    To fix that in your code when you initiate Ext.util.GeoLocation object specify manually the provider: navigator.geolocation


    Code:
    this.geo = new Ext.util.GeoLocation({
                provider: navigator.geolocation ? navigator.geolocation : google.gears.factory.create('beta.geolocation'),
                listeners: {
                    locationupdate: function (geo) {
                        console.dir(geo);
                    },
                    locationerror: function (   geo,
                                                bTimeout,
                                                bPermissionDenied,
                                                bLocationUnavailable,
                                                message) {
                        if(bTimeout){
                            console.error('Timeout occurred.');
                        }else{
                            console.error('Error occurred. '+message);
                        }
                    }
                }
            });

Similar Threads

  1. Geolocation issue when app saved to homescreen on iPhone
    By MrNibbles in forum Sencha Touch 1.x: Discussion
    Replies: 9
    Last Post: 8 Jan 2012, 11:56 PM
  2. Android 2.2 - Jumping Forms Issue
    By meQ in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 6 Oct 2010, 1:56 AM
  3. Geolocation working on Android? Timeline on release for camera access
    By olin in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 10 Aug 2010, 12:32 AM
  4. Android issue - Standard links broken inside TabPanel
    By mrjameshall in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 31 Jul 2010, 9:16 AM

Thread Participants: 2