I'm developing a monogame game app for several plattforms including Android, iOS and Windows Universal. Therefore I want to support touch as well as mouse input.
Problem is that on Android the initial mouse position is at (0,0) and is triggering a hover effect inside of the app which is not supposed to happen. Is there a way to disable Mouse input for android? On iOS I just set the mouse position out of the Viewport to (-1,-1). Which is hacky but it works. Unfortunately on Android Mouse.SetPostion() is not working for some reason.
Any other idea how to make the mouse disappear in MonoGame for Android?
How can I test ambient mode in Android Wear emulator?
I need to see how does my app render on different watches while in ambient mode.
Seems ambient mode is different on Moto 360 and Sony Smartwatch 3.
To test Ambient Mode in an emulator, you need to do the following:
In the Emulator, Go to settings and Turn ON "Always-on Screen: ON".
While emulator window is active Press "F7" (F7 emulates the power button) then press the power button to turn on ambient mode.
Hope this helps.
On recent Wear emulators you can just press the power button in the associated control panel. The power button within the emulator frame acts as a press on the main button, eg opening the list of apps.
Not your main question but hopefully this helps you in regards to the differences you're seeing between the Moto 360 and SmartWatch 3 ambient modes:
I believe what you're referring to is ambient mode versus low-bit ambient mode. Google covers some of it in their developer documentation but it doesn't seem to be mentioned anywhere else. I did a huge write-up for the community based on my own research since I was frustrated with the lack of info (it's mostly written from a consumer perspective though):
http://www.reddit.com/r/AndroidWear/comments/2qb3ia/clarifying_ambient_modes_everything_you_could/
The latest Wear emulator lets you click in the top of the emulator window to toggle between full power and ambient modes (the shaded section in the screenshot).
I have no actual Galaxy Note on-hand and no access to such device so
I would like to ask if the S-Pen behaves the same way as a Finger on a SurfaceView?
Basing from the behavior of S-Pen SDK samples when run on an emulator, it seems that the S-Pen's input is the same with finger inputs only that it is very precise. (noticing that when run on the emulator, its impossible to detect if input came from a finger or S-Pen since touch input is emulated via the mouse cursor)
I'd like to confirm if the gestures I can do with my finger is also doable using the S-Pen?
If this is the case, is it safe to say that the S-Pen is comparable to a very thin finger?
The only difference it can make, is that when an app is coded with specific functionality using the SDK that samsung provides?
Thanks
As it will be easier for everyone to spot an answer and not a comment, here's an explanation from samsung developers themselves:
S Pen behavior on SurfaceView - http://developer.samsung.com/
Yes, using the international Samsung Note (still waiting on ICS). But your question would be better served by one of the xda developers forums.
Using the S Memo app to add a memo, selecting the pen input option, I can write a note using my finger. The stroke is thin, as it would be for a pen...
I can use the pen to interact with anything on the screen, as if it were my finger. But the pen can not interact with the capacitative buttons, nevermind the physical ones.
The s pen works with the Wacom digitizer in the Note devices. This allows for precision, pressure sensitivity (256 levels on my Note II), and hover events. These are pointer events, not touch or mouse/click events at the OS level.
I have an application in which I need to implement image editing, which also includes pinch zooming. I am done with pinch zooming but I can test this only on device, not on emulator.
Is there any way for testing pinch zooming in android emulator, any shortcut key or any other way?
With a mouse:
Press and hold Ctrl and press and hold left mouse and while doing that move your mouse.
With a trackpad:
Press and hold Ctrl and press and hold your trackpad and move with a finger to the LEFT and RIGHT (not up and down).
Since ADT 17, it is possible to use a physical Android 4.0 device to send multitouch gestures to the emulator.See Android's instructions here.
Multi-Touch
The emulator supports multi-touch input, as an experimental feature in r17, using a tethered Android device running the SdkControllerMultitouch application. The application contains an activity that monitors touch inputs and sends them to the emulator. This requires an Android 4.0 or later system image.
The activity displays the content of the emulator screens to help with interactivity. It is recommended to enable "show touches" in the Developer section of the Settings on the emulator to see exactly where the touches are sent.
The SdkControllerSensor application source code is located in
$SDK/tools/apps/SdkControllerMultitouch/
But this is still a workaround since we need a real device. My advice would be to test your app directly on a real device as it's more robust, and even more performant.
I know it's late reply but this might save someones time.
Double-click and then hold down the second click and move the mouse up to zoom out or down to zoom in.
Hope this works!
On a Mac running the latest version of AndroidStudio and a vanilla Nexus 5 API 24 emulator all you have to do is keep cmd (⌘) pressed.
The drag points will appear.
After that just left click and drag anywhere on the screen!
I know this is old but this might still help someone.
On mac:
To zoom in use double click
(on track pad)
To zoom out use Command + Shift + click (on track pad)
OK, I was experimenting a bit, and on the bluestacks android emulator, I've figured it out.
It is Ctrl+Mouse wheel.
Works for me, hope it helps you too.
There has been some progress in this field with android tools release 17 : you can use a device to control the emulator : http://developer.android.com/sdk/tools-notes.html.
Otherwise, it looks like testing on real device is just better for this case (and in general its also much faster).
For mac: Use the ⌥ Option key and then use your mouse or trackpad to pinch/zoom. This is working on the android studio emulator.
You can find all the shortcuts in the extended controls menu, by pressing the three dots on the menu and then navigating to "help".
Click 3 points (like preferences on emulator)
Settings
set param "Send keyboard shortcuts to" from "Virtual device" to "Emulator controls"
now gestures work perfect!
An Android Emulator doesn't support multi-touch you can't test it on emulators. Please use real-device for multitouch testing.
For recent developments in this regard read this - http://tools.android.com/tips/hardware-emulation
PinchZoom works on Multi-Touch.
If the device is supporting multi-touch then only your code will work else it wont work.
As the Android Emulators doesn't support multi-touch you can't test it on emulators.
Still new ADT has feature But I never tried this
CTRL + a click on left side of the view screen will zoom out.
Double click on a location will zoom in.
North and South -> Scroll wheel - up and down
West-> CTRL+Scroll up at left side of the screen
East-> CTRL+Scroll up at right side of the screen
On macbook with Android studio Bumblebee, I have to hold control first which lets the drag pointer to appear on the screen. Then all I need to do is double tap, hold the second tap, and drag to zoom-in/out.
As of March 1, 2016 for the Android Studio's emulator on Windows. The pinch key on the emulator is the Alt key. Hold down Alt and click and drag your mouse button.
The CTRL key might still work for you, but it doesn't work for me.
You can not able to test pinch zoom in Emulator. Please use Real device to test pinch zoom effect.
I have not try with youwave. May be you can able to test pinch in that environment.
Not sur but just try with it.
Enjoy Coding....
I need some help with Emacs. I'm running the Ubuntu in Froyo (Android 2.2) and connect with Android VNC Viewer.
But in Android VNC Viewer, it is hard to use CTRL, ALT, left mouse, and right mouse buttons
so I made several experiments.
I tried to modify /system/usr/keylayout/eve_qwerty.kl (since my phone is gw620-eve), but I can't remap the volume button to CTRL key, though I can remap the volume button to ALT key
key 114 VOLUME_DOWN WAKE -> key 114 ALT_LEFT
I also tried changing eve_qwerty.kcm.bin file as well
Is there any special name for CTRL as like ALT_LEFT? I can't remap with CTRL_LEFT or CONTROL?
Could somebody let me know ASCII code of CTRL? Or could somebody let me know how to apply this (http://developer.android.com/reference/android/view/KeyEvent.html) useful reference to my work?
There is no support for the CTRL key until Android 3.0.
A related question at Stack Overflow is Capture all Ctrl-? under Android.
For what you were trying to do on Android, there are External Keyboard Helper Pro app for physical keyboards, or the virtual Hacker's Keyboard with Ctrl, etc. keys. A resistive or capacitive stylus could be useful with the full virtual keyboard in portrait mode if using a phone and the keys are small.
See also the EmacsWiki section Emacs on Android, with a recent first Emacs port to Android, etc.