HTML5 Javascript Windows 8 store app camera - javascript

Morning,
I have created an app using html5 and javascript for the store, as part of this app, the users can take photos using Windows.Media.Capture.CameraCaptureUI() which is then sent to an API and subsequent database.
All is working fine and dandy on the Dell Lattitude ST2 running windows 8.
The users are going to be in some dark and stinky places, so the flash must fire off at least on automatic.
As this isn't a current OS, we are testing a few other tablets with the app running Windows 8.1 e.g. Lenovo Thinkpad. We have found that the flash doesn't fire at all using this, in fact the dialog that opens looks totally different from the camera app in the programs.
Does anyone know why this is and how to make the flash fire using the Windows.Media.Capture.CameraCaptureUI() method, short of sending this through PhoneGap which we will consider if that's the only option.

Related

How to open iOS App Store from website in a WebView wrapped app?

We have an old iOS app which used WebView to load our website at "m.blablabla.com" (basically, it was wrapping our mobile website).
It's really old. We don't even have build files for that anymore. It has been replaced by a new native app.
But we still have thousands of users who haven't upgraded (even though they can), probably because they turned off auto-update and don't check for updates.
So we added an html/css/javascript message to the mobile website saying "We have a new app! This one will stop being supported soon. [ Update Now ]"
Here I am, genius with no iOS WebView experience (and no environment to test this old app either). I linked the "Update Now" button to our app on the itunes websites, thinking -- it's a WebView, I'm sure the Apple device will figure out it needs to open the app store.
Nope!
Button click does nothing.
I'm actually not sure why it's not working -- not sure if the button click is not registering, or because the device doesn't know what to do with the link.
Any suggestions?
Is there perhaps a specific way to launch app store using JavaScript when this button is clicked...?
Code sample: HTML
Update Now
Code sample: JavaScript
function update () {
window.location = 'https://itunes.apple.com/app/blablabla/id123456789';
}
(Just extracted the relevant code. Implementation is slightly different. On our Android WebView app, it redirects user inside the WebView to the Google Play store app page [using the google play store url]. So the surrounding code is fine, we tested it by mocking the app in Google Chrome. But in the iOS app, just looks like the app doesn't know what to do with the url.)

Opening a JavaScript based Android app remotely using NodeJS

I'm writing a JavaScript based Android application (using PhoneGap) to track patients' compliance with their medical regimen. This requires the app to run in the background and remind the patients at specified times to take their medication. Since PhoneGap based apps do not run in the background, I was wondering if I could remotely start the app on the patients' phones (assuming I have their permission, of course) using NodeJS (which I'm using for this app anyway - to gather the compliance data).
Alternately, I was wondering whether I could trigger a dialog box on the mobile phone remotely using NodeJS.
I'm sorry if these questions sound silly... I'm new to this stuff.
Thanks in advance.

Discover devices vendor and model on a local network

I need to find out if it's possible and if so, what is the API for that.
The required scenario:
connect to a wifi network.
from an android app or using javascript from a webpage find out the make and model of devices that are connected to the same router.
I found a way to find the IP addresses, and I saw that Find app can see the manufacturers, but can't tell if it's a mobile device, a tablet, a laptop or a printer.
I thought that a possible way would be to use jmDNS (which I can't get my android project to compile with), and service discovery, but I'm not sure that it will tell me if the device is a tablet or a smartphone.
For Android I can also think of the linux build number to search against a device list compatible with that build. However, I'm not sure about Apple devices.
Is there a way to do that or am I wasting my time?
If there is, will it work in Android or with JS?
Thanks.

How do I launch a standalone web app from mobile safari using javascript?

I am developing a standalone web app that installs on iphone homescreen.
It has a calendar function that the user can download an *.ics file directly into the iphone.
However, that cannot be done from within the standalone web app, so I have a punch out url to mobile safari so that it will work.
All that works fine...
However, after the ics file is loaded into the calendar and closed, it returns to the mobile safari page where I in turn close that by using onclick='self.close()'. That works fine too...
After that page closes I want to then launch back into standalone app so the user is returned to where they were...
How do I launch my own web app from a mobile safari javascript code?
All the searching shows me how to go from standalone to mobile safari,...I want mobile safari to standalone.
I have seen the windows.location="myapp://myparam" but cannot find proper syntax to get it to work.
What is the syntax for this?
Any other solution is well received too...will need to find Android solution too, but it is not as crucial...
Thanks

Need Mobile Safari to run a java script while my iPhone is in sleep-mode

Recently I submitted an iPhone app that was rejected because it uses the APNS to push messages that could contain marketing and advertising information. Because of this, I now need to create a web app instead of a native phone app.
My problem is that I need to poll the phone’s location in the background. When Safari is in sleep mode I need to somehow have a java script running in the background to monitor location changes. Has anyone been able to do this?

Categories

Resources