gwt geolocation - PositionError on Safari - gwt

I use the gwt Geolocation-Package (com.google.gwt.geolocation.client.Geolocation) to read the current Location on a gwt client.
All woks fine on iPhone, iPad, Android and the Chrome-Browser on desktop.
But when I use it on Safari (5.1.2) on desktop, the Safari asks if he can use the position. When I click "Allow" I get a PositionError with errorCode 2 (POSITION_UNAVAILABLE).
Has anyone else this problem/solved it?

If you're using a wired connection, that's why. Safari 5 apparently returns an error when navigator.geolocation is used on a wired connection. To test it out, open the console in Safari 5 and try this:
navigator.geolocation.getCurrentPosition(
function(){console.log("Success!")}, function(){console.log("error")}
);
Basically, the Geolocation package is just a wrapper for HTML5's geolocation functionality. In this case, the functionality fails and you get a PositionError.

Related

Error 419 login laravel in some phone browsers

I have developed an app in Laravel, and it works correctly, except when running from apple and android phones using chrome or safari. It returns error 419 and does not create the session. In the rest of browsers it works perfectly. This means that Laravel cannot be used for iphone?
I use Laravel 7.0, and the app works correctly except on apple phones with safari and android with chrome
Seems like a bug with "same-site" option, check out here: https://github.com/Fyrd/caniuse/issues/4813
I don't know very well the cause of the problem, but I see that the session is always created well except from the mentioned browsers. In this case the session file is not generated inside storage / framework / session.
I can not understand the reason why it only happens in those browsers and in the rest it does not

Is there a web app that emulates the iPhone browser?

I'm trying to get an iPhone browser emulator to work on my website so it will work on all platforms. Are there any Javascript snippets that emulate the iPhone browser? I need it to zoom and browse the web, but the bookmark function is not required.
There isn't such a thing, as the iOS browser has a number of differences to any desktop browser.
The closest you could have is an iFrame surrounded by a picture of an iPhone, and instruct people to use Safari 5.
If you're on a Mac, you can use the iOS Simulator. Download Xcode from the App Store and with it comes the iOS Simulator, which also has the Safari app virtually exactly as is on the iPhone.
http://www.browserstack.com/ does exactly that. It ain't perfect, but it works..

How can you test conditional CSS meant for an iPhone on a desktop browser like safari, chrome, or firefox?

Specifically, the "max-device-width:" condition
If you're on a Mac, you can use the iPhone simulator that comes with XCode. I've also used a Firefox add-on called "Modify Headers" and I send iPhone headers, however, that may not help much with max-device-width.
For mac or PC, if you can upload your files to any temporary server, you can check the results online in TestiPhone: http://www.testiphone.com/
This is a web browser based simulator for quickly testing your iPhone
web applications. This tool has been so far tested and working using
Internet Explorer 7, FireFox 2 and Safari 3.
The firefox plugin Developer toolbar let you change the browser size with just one click to the device size. I bet there is plugins like that to the other browsers. If you can't find that to all browsers then I suggest that you just upload your code to a server and surf to it using an iPhone.

Safari doesn't open Native Map application from url iOS5

I am having a problem in safari, that it stopped opening native map application in iPhone device from url like http://maps.google.com/maps?saddr=&daddr=, it is always opening google map inside the browser, in new iOS safari browser, where as the same url works fine in older devices.
Any help would be very appreciated..
Thanks.
Contrary to what you find on the internet, you should not use "http://" but should use "maps://". So "http://maps.google.com/?q=paris" will open the Google Maps website but "maps://maps.google.com/?q=paris" will open the native Maps application.

How to initiate/send SMS from a HTML5 webpage using devices native functions?

I am wondering how can I open the send SMS application by using a web control of a HTML5 page on Android and iPhone. I want to use the device native SMS sending app, with a prepopulated value from the web.
Further to other answers I can confirm that smsto:555:bodytext does not work on an iPhone running iOS5.
What does work (and I've tested it) on Android is the format:
sms:444?body=hello
Example:
Tap to say hello!
On iPhone the ?body=hello will prevent it working at all, and you should use just sms:555 instead.
sms:555
Example
Tap to text us!
I have tested the below and it works:
Using HTML Anchor tag:
Subscribe
Using JavaScript:
window.open('sms:111?body=SUBSCRIBE', '_self');
With Android 3.0 SDK Google has started exposing API in HTML5 for device access. An example is listed here. It may not be enough for what you seek to do.
I dont know enough about iphone to advise either way.