I have YouTube videos in my site opening in a modal window (ColorBox). When I try it on my iPhone, the window launches but the video doesn't play.
How can I prevent the modal window script from being served to smartphones, so that videos launch normally on those devices?
Thanks!
You could sniff the user agent with some javascript or even server side code, but make sure to give your users a way to switch manually between the two.
Nothing sucks more than getting the phone version on a computer because you're using an unknown browser like konqueror or getting the computer version on a phone because you're using a windows 7 phone.
Related
I would like to inject an external javascript code into a certain webpage in a mobile phone browser such as chrome or opera mini. On computers, we can do this directly in the console or through extensions such as Scripty. Unfortunately, phone browsers don't show consoles nor do they have extensions. Please how can I achieve this?
You can use eruda. It's a console for mobile browsers. It also has many plugins such as eruda-touches which visualizes all current touches and their positions.
Personally, I made a bookmark using chrome browser on my phone to implement this console directly in any page when i search for its name. Watch this youtube video for more details.
If you are using android, then you can use chrome inspect to access console on phone browser using a computer.
First you should connect your phone to your computer via USB and authorize it.
In Chrome on your computer open the following link chrome://inspect
There you can see opened tabs on your mobile device, and open their console.
You can use the address-bar to run javascript in that page.
(Tested in Chrome)
Like this:
Since all the codes will be in one line, make sure you use semicolons properly.
I need to remove the notification you receive in mobile Safari in Aframe that you receive when you first open the site, the one that says "Setyour browser to request the mobile version of this site and reload to enjoy immersive mode."
The reason is that the project will be deployed on company issued devices where settings are managed by IT or the users may be too confused to go through the experience.
You can disable via the device-permission-ui component. Notice that magic window and vr mode won’t be available if the site is requested using desktop mode.
Problem:
We would like to open the mobile devices own share dialog when the user clicks on a button in our website, so that they have their local apps available.
Now: Is it even possible to get to the devices share dialog through the web browser on a phone?
We use only HTML5, CSS3 and Javascript for the websites, so no Android SDK or iPhone equivalent.
Apparently as José said it is not possible to access the devices share dialog directly through a web browser. Further investigations into other possibilities will be done on our side.
I have seen several of these question from 1-2 years ago about Android pre-4.0. I want to ask this again for Android 4+.
I have a galaxy s3 running 4.3 and when I click on a pdf link it downloads the document rather than opening it in the browser.
I am building a website and it will have links to pdf documents. The desired behavior when one of my users clicks on the pdf link on their Android device is for the pdf document to just open like it would on a desktop browser.
Is there anything I can do to achieve this functionality, or does Android still not support this?
I cannot control the device that a user is using, so I'm looking for a solution that would achieve this functionality in as many cases as possible.
The stock browser does not support native viewing of PDFs. You can however redirect the link to google docs and view internally that way. To do this, launch your implicit view intent, as I suspect you are already doing, but prepend the URI with "https://docs.google.com/gview?url=" and Google will take care of the rest
Alternately, there are a few libraries that you will see linked around SO, but from what I saw while researching, most are proprietary and cost and even then they might not work 100%. Google docs is free and works as often as Google does, which given that this is their platform you have to imagine they make certain their service works close to 100% of the time.
it downloads the document rather than opening it in the browser.
"it" is a Web browser. There are many Web browsers for Android. A Web browser can do whatever it wants when the user clicks on a link to a PDF file.
The desired behavior when one of my users clicks on the pdf link on their Android device is for the pdf document to just open like it would on a desktop browser.
That is not the behavior of all desktop browsers, particularly depending upon user configuration (e.g., browser extensions). A desktop Web browser, like a mobile Web browser, is welcome to do whatever it wants when the user clicks on a link to a PDF file.
does Android still not support this?
Android is an OS. Android neither supports nor does not support this. Web browser applications will or will not support what you want.
I cannot control the device that a user is using, so I'm looking for a solution that would achieve this functionality in as many cases as possible.
You are welcome to test a variety of Android Web browsers, see if there are any that behave the way you like, and suggest to your users that you would prefer that they use those browsers. Your users, in turn, are welcome to honor or ignore your request.
Or, as Chris M points out, you are welcome to not show a PDF at all, but rather redirect the user to some URL that processes the PDF and renders it in some other way.
In my project as per client we need to access and upload picture from photo gallery to site. It is for iOS, Android and blackberry. I know we can access it for android using opera browser but my question is can we access it for all mobile device and from any device browser.
Yes, in fact iOS even has multi-upload functionality built in as well. I'm not sure about blackberry, but I'm almost positive that any mobile device has this feature. The best thing you can do is just more research online and testing on them.
HTML(you don't need javascript to do it)
<input type="file"/>