(Android)
You can script the "event proxy" that runs onLoad by adding the Javascript interface to your WebView, here is some pseudo code:
[...] mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setDomStorageEnabled(true); mWebView.addJavascriptInterface(new JavaScriptInterface(), "android"); mWebView.loadUrl("file:///android_asset/www/index.html"); } final class JavaScriptInterface { JavaScriptInterface () { } public void startEventProxy() {
(iPhone)
You can interact with the Device Motion API available in Safari Mobile.
http://plugins.jquery.com/project/tilt
source share