I would like to detect user tapping on the device's back, NOT screen
Since users cannot touch the screen wearing VR headset.
It would be great if I can use JS for this, neither android studio or swift IOS is fine too.
Kindly, share your ideas.
This is one of the ideas: http://mylifewithandroid.blogspot.kr/2013/06/tap-detection-supported-by-gyroscope.html
Thanks
If there are no sensors for that, so it is not directly possible. Some devices have fingerprint sensors on the back, but those are small and not directly accessible from the code.
You could try calculating this using the gyrometer, but it would not be too accurate I fear.
Related
I am building a web application for use by visually impaired users to explore SVG diagrams via a tactile printout. In order to allow this I need to calibrate the tactile printout to the image on the device. Thus I need to be able to receive the x and y coordinates of a click when using a screen reader, specifically VoiceOver for iOS.
Using Talkback, I would tap and hold until I hear an audible click and then use my second finger to double tap and send clicks to the application itself from that position.
When using VoiceOver, I understand how to send swipes by tap and holding until a triple bell and then swipe. However, I cannot for the life of me find out how to send a positioned click.
On a side note, I am using Hammer.js.
Any ideas?
Thanks
As far as I can tell, this functionality was supplanted by the interactive drag-and-drop support added to VoiceOver in iOS 11.
I'm making an HTML5 mobile game for my company. It needs to use devicemotion and device orientation to detect respectively shake and tilt. The game is in a webview so worst case scenario I can call it from the native counterpart. Anyway, device orientation should work on all android devices starting 3.0 according to this canIuse page:
http://caniuse.com/#feat=deviceorientation
But it does not on at least one of the devices we got, a Huawei y300-0100 with android 4.1.1
The tilting feature works on native applications but does not on the browser, including the demos from HTML5 rocks and the first one linked in the canIuse page. Thoses sames demos work well on a 4.0 samsung device we have.
The window.DeviceOrientationEvent exists, and the event deviceorientation is call once, but all angles are at null instead of a value. And after this first call, you can move the device as you want, the event is not called again.
Are you aware of some device that do not work with JavaScript deviceOrientation? Or do you think there is something wrong with this particuliar device?
I have seen Detecting whether Android device is a phone or a tablet with javascript but I want to know if there has been any newer, more stable way to do this as it seems the method described on the answer section is inconsistent.
Basically, I have a website that I have an Android app for but I only want to alert those who are on mobile devices as I want to show the full site to tablet users.
Another method would be to go by screen width/height. Tablets are larger than phones after all.
For example, if you know you're dealing with either an android phone / tablet check the screen.width property.
This method can be particularly useful if you're interested in taking advantage of larger resolutions which some tablets may have. Not all tablets will have a larger screen after all.
I'd advise against using User Agents. They're dependant on the browser which the user is currently using.
I'm using phonegap in order to capture an image in my application.
My application is configured to work in landscape orientation mode, with the button on the right.
The thing is that I need to keep that orientation when taking a photo with the camera.
I'm using the 1.4.1 version of the phonegap library. I have tried passing "correctOrientation: true" as a cameraOption parameter when calling capturePhoto(), but it doesn't seem to work and the device continues taking and storing the images as the device accelerometer tells.
Any idea how to solve it?
I have a flash application written in actionscript 2.0 that shows vector architectural maps and works perfectly on common web browsers. There are many interactions with javascript functions called by user events on the webpage, such as zooming to a certain x,y point. This event is usually accomplished via the mouse wheel.
Now I have to make sure that the thing works on tablet pc, in particular the Galaxy Tab. The first thing I have to fix is that, obviously, there is no mouse wheel and the user naturally tries to pinch zoom the flash application, with the result of zooming the entire web browser.
What I need is to listen to the multitouch gesture and, when a pinch zoom event is called, disable the default zooming event and call a javascript/flash function that allows my flash app to zoom only the objects that need to be zoomed: in few words, the browser stays still and only a part of the flash zooms in or out.
Consider that I am totally new to Android and that I already have working javascript functions to call flash object functions for the zooming purpose, so I just need to connect them to some android things that tell me when the user tries to pinch zoom in and when he tries to pinch zoom out (and possibly the x,y point of zoom).
Thanks a lot for your help!
Max (Italy)
Passing a JavaScript call from android to flash is a very very hard task as far as I know.
Not because of android (follow this tutorial http://code.google.com/p/openmobster/wiki/JavascriptBridge to pass a JavaScript call to a web page ), but because of flash securities for local content.
It is not too much of an issue on a local computer, but the flashplayer on android is very very buggy.
I think the best is to try to find an other solution if possible...