Angular 4 disable file chooser for HTML5 camera attribute on desktops - html

Hi I have a file uploader application which uploads images.
I'm using HTML5 file chooser-
<input type="file" accept="image/*;" capture="camera">
I'm getting file chooser while using this app on desktop.
I wanted to disable file chooser for this application if not opened in mobile.
HTML5 by default opens file chooser on desktop.
I wanted to open camera on desktop or disable this application on desktop.
I don't want application to work on the chrome dev tools mobile view.
Any suggestions how to implement it?

Related

How to open a HTML file in the apple tv app?

I am working on a tvOS app and I need to open a HTML file in the app. This HTML file is available locally in the app bundle. How can I open such file in the tv app as WebKit is not available in the tv app
There is no web browser or even WKWebView available in tvOS.
Nevertheless to display simple HTML content as Privacy Policies or similar... you could still use UITextView as described here

View PDF on Mobile with downloading

I have the following link to a PDF document on my website:
Example
On PC it opens up the document using a PDF reader, however on mobile and tablet devices it asks the user to "Download" the PDF to their local storage. Is there a way to make it open PDF documents on mobile and tablet without downloading? I want the view to remain in the browser.
Try to use Google Docs Viewer by appending URL
https://docs.google.com/viewer?url=
https://docs.google.com/viewer?url=https://mywebsite.com/mydocument.pdf

Open pdf using android intents with chrome

Using an Android phone, when i click on a pdf link (i.e. example.com/abc.pdf), Chrome downloads it. I want Chrome to directly open it with the default pdf viewer of the user. So i think i need to use:
https://developer.chrome.com/multidevice/android/intents
I do not want to force user to open it with a specific app (i.e. adobe reader) so i do not know the package name.
Any help?
If it is not possible, how to open it with adobe reader?
many hours of trying...and at last...
open pdf

HTML5 offline enabled web app

I'm trying to build a html5 web app to be used in offline mode on iOS devices.
I've created the cache.manifest file and put my html, css & img files.
I have two main issues with my offline web app:
1) Offline Mode Problem. Procedure:
a) open the webpage in Mobile Safari
b) bookmark it to the Home Screen.
c) I close the safari
d) put the app on airplane mode.
e) open the app from home screen app icon
I get the error "Turn on cellular data or use Wi-Fi to access data", but if I open the same location from Safari it works fine.
The only way I can solve this is before I put the device on airplane mode, I have to open the app from homescreen and close it and put the device on airplane and when I open the app afterwards it works fine.
Is there anything wrong in my way of making the app or is this the way Apple has implemented the "add to home screen" feature, so whenever a user add a offline enabled webapp the user should at least open it once before its working as an offline version?
I thought this was the entire purpose of an offline app!
2) Multiple pages
I have created two sample pages(index.html & subpage.html) for the web app offline purpose.
When I click the app icon from the home screen the web app is opening fine in the full screen mode, but when I click the link to the subpage.html from index.html it opens it on safari browser thereby goes out of the fullscreen app mode.
I have tested the above mentioned problems in the following devices and same errors/userexperience I get.
iPhone 4S - iOS v6.1
iPad Retina - iOS v6.1
I'm no expert, but from what I've learned, the page must loaded at least once while connected to the internet. The Html5 offline works great, but it can only load the page offline after it has been loaded before. The iPhone cannot open an app when it hasn't downloaded the .manifest file and .html, .js, .css, etc.

Download .apk or .jar file using HTML5 anchor tag download attribute

I am developing HTML5 based web application. In that web application i am trying to download a file from server. I have tested it on Chrome & Safari desktop browser. It is working fine on the desktop browser. But When i try to download the file using web application on the Android mobile using Chrome Browser and Android Default browser then the file gets downloaded but the extension of file and the name of the file is wrong (downloadApplication.bin) instead of (demo.apk).