How to detect phone function - html

I am building an html5 web-app which will hopefully be mainly run from a mobile device. The app has a phone number which when clicked, calls the number displayed.
This works great if the user is using an iPhone or Android etc, but what if the user is using an iPod Touch or iPad with no phone capabilities? On the iPhone simulator in XCode, i get an error message saying that safari cannot open the page.
Is it possible to detect if the device has a phone, and if not, disable the link
Thanks

Related

IOS 8, Link on mobile device using construct2 caus the application to crash and close

i would like to know if there is a way, to monitor IOS 8 errors on a mobile web site.
Our site is a game site, and we are using construct2 as a game platform.
by pressing a link(js - location.href), in my construct2, the mobile site crash and close (without any error report/handling).
how can i catch the error?
thank you
Ariel

How can I check a function that uses the accelerometer in a mobile app on my pc?

I'm trying to create a mobile web application using html5. I want to check a function that is called when the user shakes his phone. How can I test this on my computer?
When developing in OSX: Download xCode. It come's with a iPhone Simulator with 'Shake' support, see also how to check shake effect in iPhone simulator?

How to launch mobile app on mobile site

I am designing my first mobile site for a small local business.
The most two most important features were a built in 'call us' button and a map function.
The phone call part was pretty easy. But the part that I'm confused about is how to get the maps part to work with both iphone and android users. I can find how to do each one specifically, but how do I cause the button to open up the map app for both iphone and android users?

Samsung Smart-TV SDK Internet Browser not available

I just recently downloaded and installed the Samsung Smart-TV SDK 4 (without the IDE, just the emulator). I'm doing this because I want to test the Web browser only, nothing else.
However, when I start up the emulator (2012 version), I can't find any apps when I get to smarthub. I've created a Samsung account but I see no default apps that would usually appear on the TV, not even the Internet browser.
Is there something I'm missing?! I just want to test the Internet Browser.
Cheers.
The emulator is provided for testing your own apps, not to run the apps that people who buy TVs/BRPs/etc get with their device.
Only apps you write and place in the apps/ directory will appear.
That said, you can write an app that does nothing except:
location.href = "http://example.com/";
if i write an app with just location.href = "http://example.com/ is working (i have sdk 5.0) but the browser i get on the TV is not the same browser i get on the tv if i just lunch the integrated web browser app.
The big difference i see is that my app has a browser without the top bar with navigation controls and also there is no mouse pointer and i need to connect an external usb mouse to the tv
how should i do to implement this ?

A universal cross-platform way (mobile) to show alerts to a user

I have a task to create a client application which can show notifications to a user with a high probability of notifications being noticed.
The application should work on Android (2.0+)/iOS/WP.
Here is the use case:
The user starts the Application and performs some Action. Then he switches to the home screen/another application.
The response to the Action makes the Application to issue a notification. The notification is noticed by the user disregarding of what another application (or home screen) he uses on his mobile device at the moment.
There is no requirement for the application to be a native app or to be a web browser-based mobile app. The notification could be a sound or a vibration on the device, but I know that accessing the vibrations from within a browser is still tricky.
Here are my research results of making universal sound/vibro notification mechanism so far:
it seems that making a mobile device vibrate from a browser works only in mobile Firefox (no iOS, no WP);
the support of the audio html5 tag is still experimental, it doesn't work on each and every browser/device;
the sound alert from this example works only in mobile Firefox (asks for a plugin to play an mp3 sound), the Android browser just remains silent.
So, the question is:
Is there any way to force a user of a mobile device (Android 2.0+/iOS/WP) to view a notification from a mobile application? Is the only way to do this is to write a native app for each mobile platform?
I would propose PhoneGap for that particular problem.
Among other things it features cross-platform alert, sound and vibrator notifications.
Only quirk for Windows Phone 7 is that the Cordova lib includes a generic beep file that is used. You should consult the Notification reference page to make sure if it can help you.