PhoneGap Direct user to safari - javascript

I am developing a iphone app using phoneGap. How can I direct user to safari when he clicks on a link or button inside of the application.
example:
When user taps a button, safari browser will come to front and load corresponding site.

you can use the childbrowser plugin to do that. Take a look here: https://github.com/purplecabbage/phonegap-plugins/tree/master/iPhone/ChildBrowser

This line just worked for me..
location.href="http://www.google.com";

Related

Is it possible to open a new URL in Safari from Chrome if the page is being viewed on an iOS device?

Let’s say I have a webpage and it has a button with an HREF attribute. I want the HREF of that button to be opened on Safari browser if the button is being clicked from an iOS device, even if the user is accessing the page on Google Chrome.
As of now, I only need to handle this situation for Chrome and not any generic browser. The way I see it, there are two parts to the problem:
Identifying the OS of the Client Machine: This I might be able to do easily.
Opening the Popup on Safari from Chrome: This is the tricky part I am not sure if it is possible.
I am looking for possibilities of accomplishing the second part.
Short Answer: no.
Long Answer: Some iOS apps have defined URL schemes that can be used to access the app directly from the browser. For example, twitter://timeline. But Safari for iOS does not have one.
You can detect the OS the user is using and if it Chrome then suggest the user to open it in Safari and also provide the link where to download it from. Or you can also suggest the user to make safari their default browser. ( Also provide a link on how to do that to them).

how to programmatically create a desktop shortcut for a website on android/ios with js?

is there a way to let the user add a desktop shortcut of a website with just javascript or a simple link? I mean on mobile devices, especially android and ios.
There are other questions similar to this but they didn't give me a useful answer till now.
I don't know about android, but on iOS no. I'm not sure why you would want to do this anyway in mobile safari it's as simple as clicking the share button in the tool bar and the click "add to home screen"

Linking to iOS Safari's Share Menu

I'm helping to build a webpage that is mobile friendly. We are currently in beta and using the "Add to Homescreen" function of Safari on iOS to make the webpage appear as an app. Is there a way through javascript or html to code a link to Safari's share menu? We want to be able to access this share menu from the bookmark shortcut rather than having to be in the actual Safari browser on the phone.
This is an old question, but as of iOS Safari 12.2 and macOS Safari 12.1, Safari supports Navigator.share() to display the system share menu.
The Share menu in Safari is a component of the browser, not the web page. It cannot be linked to.
If you want your users to activate the "Add to Homescreen" function of Safari, you will need to instruct them to press the Share button themselves.

Google+ Sign-in Button in iOS

I have integrated google+ signin into a php-based web application. It works great in desktop browsers but in iOS6 Safari pressing the signin button does not trigger the appropriate behavior. If I open the app subsequently, it does work, suggesting an issue with caching. I've created a stripped down version, (similar to the one on the google site) of this at http://www.purpool.com/po/test.html . (It doesn't include any of the javascript handlers needed to complete the authentication.) Does anyone have suggestions as to fixing this?
I might add that in iOS6 Chrome the button works but the full authentication process (the opening of a new tab where the user agrees to the service, etc..) does not work as smoothly as it should.
Thanks for your help.
Peter

open native select pop-up in android with js

I'm developing android and ios app with phonegap, so i have a select and i want to open it with js, on ios simply focusing element works nice, but in android it does nothing, simulating click on select also gave no result, maybe there are some plugin for that?
finaly i found a plugin for this issue, you can download it from here

Categories