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

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?

Related

How can I code an iOS app while on my iPhone without a pc

Is it possible for me to develop and iOS app on my phone? I wanna either code an app off my iPhone 5 or just make my website into an app. Is there somewhere I can go to do this or is it not possible?
You can only programming on Xcode. And if you want to make your website into an app, you can use WKWebView. You can build a wkwebview with a url, then your app would just like a browser. And you can what you want in the website.
It is not possible to make an app from your iPhone 5. You can only create iPhone apps with a native programming language using Xcode. But, you can convert your website to an app using an application like PhoneGap, or you could use a JavaScript library like Electron.js.

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.

How to detect phone function

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

Can a HTML5 web application access the camera on a Windows 7 tablet

I have a HTML/Javascript web application which integrates with a device's camera using PhoneGap.
Is there any way we can run the application on a Windows 7 tablet (e.g. as a normal website) and be able to integrate with the camera on the device.
You will be, eventually, when the getUserMedia API is implemented in more browsers (currently only available in Opera and special builds of other browsers), but at the moment, no.
I don't believe there is a way to do this.
We enabled photos to be dragged into the application to support this feature. It means the user takes a photo as dictated by the tablet and then has to drag/select the appropriate photo file to add to the application.