PDA

View Full Version : Geolocation issue when app saved to homescreen on iPhone



MrNibbles
27 Oct 2010, 6:40 AM
So far, loving Sencha Touch!

I am using the geolocation api in the following way:


var geo = new Ext.util.GeoLocation({
autoUpdate: false,
listeners: {
locationupdate: function (geo) {
Ext.getBody().unmask();
},
locationerror: function ( geo,
bTimeout,
bPermissionDenied,
bLocationUnavailable,
message) {
Ext.getBody().unmask();
Ext.getBody().mask(false, 'Permission Denied: ' + bPermissionDenied + ' ' + 'bLocation Unavailable : ' + bLocationUnavailable);
}
}
});


Everything works fine in the iPhone and android browser, but when the app is saved to the homescreen, when updating the location, the locationerror event instantly fires with bPermissionDenied returning true.

I cant see why this would be the case!

If anyone could shed some light on this, that would be fantastic

thanks very much for sencha :)

xnakxx
27 Oct 2010, 8:12 AM
not to insult your intelligence or anything, but you DO have Location Services turned on on the phone rt?

MrNibbles
27 Oct 2010, 9:08 AM
you DO have Location Services turned on on the phone rt?

I do, unfortunately!

To add to this mystery, when saved to the homescreen in the simulator, the program does not instantly fire the permission denied event. Instead the timeout event is true, and the permission denied is false.
:-/

xnakxx
27 Oct 2010, 9:26 AM
can you post a link to your app?

MrNibbles
28 Oct 2010, 12:56 AM
Will PM you a link, this is client work so i am unfortunately unable to make this public yet!

I am migrating it to a non ip-masked server at the mo, will send when ready.

Many thanks

evant
28 Oct 2010, 1:20 AM
I highly doubt it has anything to do with Touch, it's just using the underlying stuff in the browser.

MrNibbles
28 Oct 2010, 2:11 AM
I highly doubt it has anything to do with Touch, it's just using the underlying stuff in the browser.

I completely agree, but it certainly seems like an odd behaviour! I will pm you the dev link as well (as long as you dont mind)

MrNibbles
28 Oct 2010, 4:15 AM
Hmm well i am somewhere nearer to solving the mystery.

It appears to only happen on my particular phone. I am on 4.2 beta 3.

I have tested it on another 3 iphones all running 4.1 and it works fine.

Sorry for the fuss

siebmanb
7 Nov 2011, 6:49 AM
From what I've read around the web and on that forum, apps don't behave the same when saved on the Home Screen compared to Safari. It seems that Apple is decreasing the performances of those apps, and things like auto-loading stores don't seem possible...

Apparently it started recently : http://www.theregister.co.uk/2011/03/17/apple_confirms_ios_webview_apps_dont_include_same_optimizations_as_safari/

veronicaB
8 Jan 2012, 11:56 PM
Walmart bought app developer Kosmix and introduced @WalmartLabs, an e-commerce division of the retail company. Since that time, @WalmartLabs has acquired three other mobile development corporations, such as the newest purchase of Small Society. Walmart purchases fourth social app developer (http://www.appisaurus.com/2303-walmart-app/). These companies are all mobile commerce, e-commerce and mobile shopping focused. Thess apps are well timed release comes ahead of the holiday shopping season. The first purchase that was used to create @WalMartLabs was Kosmix, a company that categorized the web into topic areas and encyclopedia-like display, which shows the relationship between the topics. Grapple, a mobile point-of-sale app creator, was also purchased by @WalmartLabs.