I need to put an iframe suggesting the installation of an app (which is on Google Play) if my webpage is opened from an Android browser.
How can I do it?
Check if browser/system is android.
The following jQuery plugin may help: https://github.com/gabceb/jquery-browser-plugin
If it is android, set the iframe visible.
jQuery('iframe').show();
Related
This question is related to my earlier question How to Debug Javascript in IOS Action App Extension. Basically, I am developing an mobile safari extension, and part of the work is to develop a javascript (operating on top of "document" provided by mobile safari) to run inside the app extension.
However, I have not found a way to debug a javascript file inside an app extension. Now, I am trying to ask the question a bit differently - given mobile safari on a page, can I somehow run an external javascript on that page and debug this external javascript? I suppose that Safari Web Inspector could help with that? Thanks.
(This is a slightly customized answer from your other question)
The official documentation for this is [here][1].
It's not too hard, although recently I've had an issue with the page showing up when connected to the iOS simulator. In that case I just ended up using my phone directly. (Apparently you need to start desktop Safari after the iOS Simulator has started to inspect "remote" Simulator sessions)
Ensure that on the device Settings->Safari->Advanced->Web Inspector is on.
(Make sure you've Trusted the computer from the device)
Start MobileSafari on your device.
Start Safari on your desktop, make sure Show Develop menu in menu bar is on in Preferences.
In the Develop menu you will see your device name, say 'BSharer's iPhone'.
select the page name underneath your device name, say 'en.m.wikipedia.org - Wikipedia'.
You are now debugging that device's page on your desktop. The developer page will open and you can debug as if it was running on the desktop machine. You should now see all the JavaScript that is available to that page and set breakpoints.
(The app extension requires the debugger; statement because we don't see the javascript files injected by the app extension. You can still use the debugger statement but it's not usually necessary.)
I have a web application which is build to run on mobile devices with any browser. but there are two links which I want to open in specific browser which is say Safari.
I think this might be what you need - application:openURL:options:
I've only glanced at the doc but it seems you can choose a particular app to handle a URL.
I create 'iframe' element, use the http scheme to open an app on Android Device, it works fine if the app is installed.
When the app is not installed, I use setTimeout function setting window.location = marketurl,
it will open market, and it works fine on Android Browser, but it doesn't work on chrome 25+.
I only see an error message in my browser.
What should I do?
I believe there are some new changes to the functionality in Chrome for Android v. 25 and later. You may need to implement Intent. This is created to prevent unsafe app open from the browser.
Here is one example from Google Chrome for developers that will open the Zxing barcode scanner app.
Take a QR code
Reference: https://developer.chrome.com/multidevice/android/intents
It is no longer possible to launch an Android app by setting an
iframe's src attribute. For example, navigating an iframe to a URI
with a custom scheme such as paulsawesomeapp:// will not work even if
the user has the appropriate app installed. Instead, you should
implement a user gesture to launch the app via a custom scheme, or use
the “intent:” syntax described in this article.
Hello I am new to Weinre and I need to debug my website which seems to act strange when opened using an IOS platform.
So I am using Weinre to debug it. I installed the tool and tested it running with the demo targets in the server itself.
Now I need to add my website as a target and run it with an iphon (or ipad) and debug it with Weinre. I don't know how to add my website as a target, I cannot manually add the
<script src="http://123.456.7.89:8080/target/target-script-min.js#anonymous"></script>
script (do not have permission to manually change the page). so How can I do my debugging with Weinre?
Thanks
You can try using a bookmarklet. The main weinre server page actually has a bookmarklet in it, for itself, that you should be able to use directly, if you can figure out how to set up a bookmarklet for your device. This seems to change release-release for mobile browsers, so you might want to do a google search on "bookmarklet" and your device's name or the OS release, to see if anyone has any tips.
I'm wondering if it is possible to invoke installed Facebook and twitter mobile app on any platform either Android, i-phone, BB e.t.c. thru some html/java script /jquery code.
for e.g.
Open Email
Hope i'm clear to you all.
Any code-snippet would highly be appreciated.
mrana
Well, in android is posible:
When we click on a link the browser sends an intent to the OS.
Check this article for more information:
http://blog.jayway.com/2009/09/24/the-browsable-category-revealed/