Simulating Touch Input without Touching - Wear OS Q&A, Help & Troubleshooting

Hello,
We're trying to simulate touch input to our Android Wear, but without touching it. It's being a hackathon project. You can think of it like a mobile app that navigates the connected watch, such as it swipes between menus and apps.
Would you recommend some approaches for achieving this?
Kind regards,
Emrehan

Maybe this?
http://developer.android.com/tools/help/monkeyrunner_concepts.html

Related

[APP][Updated 16-10-2008]CapacitiveFingerLock (Proof of Concept with sources)

Having written StylusLock I wanted an additional lock/unlock method. Although StylusLock works great, I wanted some extra features:
* to have it possible to lock and unlock "one handed". The StylusLock approach cannot be done "one handed", e.g. on a bike.
* Also some people do not like to operate with the StylusLock (always).
* The combination with this new CapacitiveFingerLock and existing StylusLock will suit more people.
* And sometimes people will use the Stylus, so they will get the right behaviour depended on the usage pattern
* Still the goal is to let it consume almost no CPU and battery and KISS to operate
I discovered with StylusLock that when the TouchPanel and Hardware keys are locked, still the Zoom function works in e.g. Opera.
You can try yourself, using StylusLock:
1. Start Opera
2. Lock the Touch Diamond or Touch Pro with StylusLock
3. TouchPanel and all hardware keys are locked
4. Try to Zoom in/Zoom out in Opera, this still works with the NavWheel
5. Also the Ok button seems to react
I figured out via Scott Seligman and Koushik Dutta how to programmatically access the Capacative Touchpads. You can read also more here: [REF]Capacitive touchpad apps
So this idea is implemented in CapacativeFingerLock. But I am not using the NavWheel idea, but just uses the Capacative hardware area for locking/unlocking. The idea is again simple and clever. When you softly touch the area where the hardware keys are located (so do not press the keys, just gently touch them), the up/down and position area can be detected. I programmed that when the same area is touched gently 3 times within a second (without touching another area), the lock status is toggled.
I made a proof of concept program (just copy the exe inside the zip file attachment to your phone and just execute it), which shows how it is going to work. Just play around with softly touching the hardware panel, to see what happens.
If am working on integrating CapacativeFingerLock with StylusLock, to have a working "real locking" application. The Proof of Concept program just shows that it is possible.
Reserved for future use
Another one for future use.
very nice concept....now i noticed you posted a link of this thread in the wheel to unlock thread...would there be a way to possibly implement a config tool that lets you choose say, touch 3 times softly, or run your finger around the circle?
Malik05 said:
very nice concept....now i noticed you posted a link of this thread in the wheel to unlock thread...would there be a way to possibly implement a config tool that lets you choose say, touch 3 times softly, or run your finger around the circle?
Click to expand...
Click to collapse
In principle this can be done. But because the NavWheel is also used for other purposes (Zoom In/Out), I have chosen not to use the NavWheel, but the 3 times gently touching. In this way there is no interference with other existing applications.
I'll try that, it seems like no one cares aboyt the capacitive touch pad, it seems like an amazing thing that we've got that is so neglected. I hope to give some positive feedback later, but first I have some rom flashing to play with!
Thanks for the work, there must be so many possible implementations for this, I hope this is just the beginning of something much bigger.
How about a simple tap to launch app?
i went ahead and installed it, and it works very well...Will there be a (pretty) GUI to show that it was unlocked?
Also the diamond does have multi touch on that pad area, which enables a "trace" of the movement of your touch
http://www.youtube.com/watch?v=f3Owgcos_KY
Since the nav sensor wont be so ideal, how about sliding your finger from the top of the pad to the bottom (lets say, place your finger on the back button, and gently moving it down to initiate unlock, with a GUI on the screen following your movement, as you go closer to the bottom, the color changes from lets say, red, to green...with incremental color changes in between)
Instead of 3 taps, why not a swipe between the home and back keys, which seems much more natural.
Surur
surur said:
Instead of 3 taps, why not a swipe between the home and back keys, which seems much more natural.
Surur
Click to expand...
Click to collapse
I imagine it is just harder to implement for a proof of concept.
Personally I think there are enough ways to lock the diamond, whether you swipe the screen or 1cm below it is not a revolution, but if swiping the capacitive touch pad could be made to launch desired apps from selected gestures, that would be a revolution, like dynamo3 or hibernate or even standby. I think a lot of people here would want that over another locking solution. Good will intended!
Just tried it.
This is very cool very very cool
Thanks for time invested in such a cool development.
surur said:
Instead of 3 taps, why not a swipe between the home and back keys, which seems much more natural.
Surur
Click to expand...
Click to collapse
Swiping is not so easy one handed. Touching gently 3 times is much easier one handed, holding your Touch Diamond or Touch Pro firmly and touching with your thumb.
However, I can imagine other sort of applications which can use the swiping for other sort of operations. Both are possible with the programming API I made.
uniqueboy said:
I imagine it is just harder to implement for a proof of concept.
Personally I think there are enough ways to lock the diamond, whether you swipe the screen or 1cm below it is not a revolution, but if swiping the capacitive touch pad could be made to launch desired apps from selected gestures, that would be a revolution, like dynamo3 or hibernate or even standby. I think a lot of people here would want that over another locking solution. Good will intended!
Click to expand...
Click to collapse
I am going to share the source code. I have written it in C#. And others can get ideas and take over some of the source code for their own application. At the end we profit all of it.
ZuinigeRijder said:
I am going to share the source code. I have written it in C#. And others can get ideas and take over some of the source code for their own application. At the end we profit all of it.
Click to expand...
Click to collapse
I like your style, that is the the kind of development attitude that keeps here!
ZuinigeRijder said:
Swiping is not so easy one handed. Touching gently 3 times is much easier one handed, holding your Touch Diamond or Touch Pro firmly and touching with your thumb.
However, I can imagine other sort of applications which can use the swiping for other sort of operations. Both are possible with the programming API I made.
Click to expand...
Click to collapse
If you are open to other ideas, I would love the area from the back to home key to be a scroll bar when the device is in landscape mode. Grabbing the narrow on-screen scroll bar can be tricky, and the Touch Pro lacks the scroll wheel of the HTC Kaiser.
Surur
Have been looking into this myself as well. The only code I found was managed C#. Do you think we can use this in our native C code? Looks promising though!
ZuinigeRijder said:
Having written StylusLock I wanted an additional lock/unlock method. Although StylusLock works great, I wanted some extra features:
* to have it possible to lock and unlock "one handed". The StylusLock approach cannot be done "one handed", e.g. on a bike.
* Also some people do not like to operate with the StylusLock (always).
* The combination with this new CapacitiveFingerLock and existing StylusLock will suit more people.
* And sometimes people will use the Stylus, so they will get the right behaviour depended on the usage pattern
* Still the goal is to let it consume almost no CPU and battery and KISS to operate
I discovered with StylusLock that when the TouchPanel and Hardware keys are locked, still the Zoom function works in e.g. Opera.
You can try yourself, using StylusLock:
1. Start Opera
2. Lock the Touch Diamond or Touch Pro with StylusLock
3. TouchPanel and all hardware keys are locked
4. Try to Zoom in/Zoom out in Opera, this still works with the NavWheel
5. Also the Ok button seems to react
I figured out via Scott Seligman and Koushik Dutta how to programmatically access the Capacative Touchpads. You can read also more here: [REF]Capacitive touchpad apps
So this idea is implemented in CapacativeFingerLock. But I am not using the NavWheel idea, but just uses the Capacative hardware area for locking/unlocking. The idea is again simple and clever. When you softly touch the area where the hardware keys are located (so do not press the keys, just gently touch them), the up/down and position area can be detected. I programmed that when the same area is touched gently 3 times within a second (without touching another area), the lock status is toggled.
I made a proof of concept program (just copy the exe inside the zip file attachment to your phone and just execute it), which shows how it is going to work. Just play around with softly touching the hardware panel, to see what happens.
If am working on integrating CapacativeFingerLock with StylusLock, to have a working "real locking" application. The Proof of Concept program just shows that it is possible.
Click to expand...
Click to collapse
A while ago I posted about the Windows Messages received by the form for capacitive touch events. Is that what you ended up using to figure out where on panel is being touched? Mind posting some code so I can add it to the Sensors assembly?
Great idea. Defienetly it will be my way of locking device. StylusLock works nice but can't be operated by one hand so its useless for me. SensorLock uses battery and i've drop my phone already unlocking it.
surur said:
If you are open to other ideas, I would love the area from the back to home key to be a scroll bar when the device is in landscape mode. Grabbing the narrow on-screen scroll bar can be tricky, and the Touch Pro lacks the scroll wheel of the HTC Kaiser.
Surur
Click to expand...
Click to collapse
This can be surely done, programmatically. But I do not know if you can control the scrolling of other applications. The latter seems to me difficult?
Anyway, when a lot of applications are going to use gestures using the capacative areas, there will be going conflicts (different programs reacting differently on different gestures).
For the locking application I want to made, I see also some different gestures possibilities:
- 3 taps for locking/unlocking
- swipe left to right for Power off
- swipe right to left for starting a configured application
And I am sure I can come up with other gestures and actions....
drvdijk said:
Have been looking into this myself as well. The only code I found was managed C#. Do you think we can use this in our native C code? Looks promising though!
Click to expand...
Click to collapse
Actually I started with C++ and had also a working Proof Of Concept. However, because I am new to Windows Mobile Programming, I also wanted to use C# as next project. I have developed programs in a lot of languages (also in C++ and C#), but I like C# more. And I wanted to do this now for Windows Mobile, to get experience with this. Note that the C# sample is using only .NET 2.0, so you do not need .NET 3.5.
You can find a C++ sensortest program, which was available on Scott's weblog:
http://scottandmichelle.net/scott/cestuff/sensortest.zip
ZuinigeRijder said:
This can be surely done, programmatically. But I do not know if you can control the scrolling of other applications. The latter seems to me difficult?
Click to expand...
Click to collapse
I dont know if you can manipulate the scroll bar of another application directly (though this would be ideal) but at the least maybe a page down keystroke could be sent to the active window.
Surur

Noob having issues with onTouchEvent

I'm trying to implement pinch-zoom in an app I'm making and am having issues with the onTouch event. It appears that the pointer up & down actions do not fire immediately, like you won't get a pointer up or down until an action move occurs. So what happens if both fingers hit the screen nearly simultaneously is that the 2nd finger (should be pointer(1)) gets a move action before pointer down is called, making the code think it's a DRAG not a pinch zoom. Anyone else seen this? Anyway around it? Thanks.
*Edit*
I just tried out the dotty app and noticed the same behavior on it. Could it be my phone (EVO w/ custom ROM) or is this just an android issue? I'm really having issues keeping my pinch zoom & drag from acting sporadically because of this.

[Q] Touch input so bad with vaio duo 11

The touch input in this device is so bad i have to use my stylus pen to browse webs(i can never touch the back page button on google chrome instead it touches the forward page button instead),close programs(touch the top of the screen and pulling it down never works), opening the charm bar(swiping my finger from the right of the screen to the left never works too).
I tried calibrating it by searching calibrate on the charm bar's search feature but they doesn't work as well.
Any way to fix this? Its getting so annoying because i can't use the touch screen feature at all because its not precise.
thekiller99 said:
The touch input in this device is so bad i have to use my stylus pen to browse webs(i can never touch the back page button on google chrome instead it touches the forward page button instead),close programs(touch the top of the screen and pulling it down never works), opening the charm bar(swiping my finger from the right of the screen to the left never works too).
I tried calibrating it by searching calibrate on the charm bar's search feature but they doesn't work as well.
Any way to fix this? Its getting so annoying because i can't use the touch screen feature at all because its not precise.
Click to expand...
Click to collapse
Dont have one myself, but I played with one at Frys, and I gotta say I didnt see any of these issues at all! Maybe you got a bad one???
thekiller99 said:
The touch input in this device is so bad i have to use my stylus pen to browse webs(i can never touch the back page button on google chrome instead it touches the forward page button instead),close programs(touch the top of the screen and pulling it down never works), opening the charm bar(swiping my finger from the right of the screen to the left never works too).
I tried calibrating it by searching calibrate on the charm bar's search feature but they doesn't work as well.
Any way to fix this? Its getting so annoying because i can't use the touch screen feature at all because its not precise.
Click to expand...
Click to collapse
Make sure your navigation gestures start from the black bezel of the Vaio then onto the touchscreen. You can use the calibration tool, change pen and touch settings, and change double clicking of objects to single tap to make the experience better. I'm not sure if the registry change to make touch more responsive for surface rt applies to your Intel tablet.
I'm with @vinscuzzy on this one... generally speaking I detest Sony products, but this sounds like a defective unit more than anything else. I'm not sure what you mean by "calibration doesn't work as well" (grammar, people: it conveys meaning). but if you can't fix this yourself, I would definitely suggest you take it back to wherever you got it.
When i use the calibration settings whenever i try to touch the cross it shows the input to be slightly on the right. i can't even close apps or use the multitasking. Closing tabs is hard or even clicking on links on google isn't accurate at all.
I bought this machine overseas and it isn't even out in my country so replacing it is too much of a hassle.
I almost considered it. But found there is a problem with the drivers, especially with Photoshop supposedly MS and Sony are using a specific driver but its not compatible with certain apps that use a different format of driver like Photoshop for touch.
The driver developers as far as I'm aware via googling don't seem interested in fixing this issue due to cost and/or it being niche market. Maybe try other software, I hope you don't have faulty system
Sent from my GT-I9100 using XDA Premium HD app

[CLOSED] Completely disabling Nexus 10 touchscreen

I'm setting up a tradeshow display for my company, we're using 3 Nexus 10s in a bent 36"x36" panel. They'll just be looping video, though interactivity may be added to one of them later on. Before I got the Nexus 10s I tested some apps on my Note II that disable the touchscreen because I wanted to prevent anyone from interfering with the looping video.
Unfortunately, I've come to find that while those apps will disable interacting with the main content, it doesn't prevent the Home/Back/etc buttons from working on the bottom bar on the Nexus 10. Additionally, it seems to prevent the video from going completely full screen, leaving the Home/Back/etc icon bar up.
Does anyone have any ideas on how I might truly disable the touchscreen once I have video going? Even if it meant requiring a full reboot to restore touch, that would be fine with me, for the most part we'd just set it and forget it. Some way to just crash or disable the touch screen driver? I'm not rooted right now, but I can be if that's what it takes.
Otherwise we'll end up going with clear acrylic overlays with magnets in them for quick access to the screen,that approach is just generally uglier though, and I'd love to avoid it.
Thanks for any suggestions.
what about this: http://forum.xda-developers.com/showthread.php?t=2266402
then use your existing disable touch program from there?
chaosdefinesorder said:
what about this: http://forum.xda-developers.com/showthread.php?t=2266402
then use your existing disable touch program from there?
Click to expand...
Click to collapse
Perfect, this is exactly what I was looking for. I ended up using a similar app called full!screen that allowed me to specify two touch areas but then make the icons for those tiny/transparent. BSPlayer has a lock so that casual interaction with the device won't do much. From there I can probably fully lock the touchscreen and have it only unlock with a triple tape or messing with a hardware button (only the operator will have access to the buttons, it's mounted inside an enclosure).
You're a hero, chaos. Many thanks to you.

[Q] Hand touching while writing

When I'm trying to write with my S Pen, I usually rest my hand on the screen. With TouchWiz, this isn't a problem, but having flashed Aosp, my poem doesn't write with my hand touching the screen. Even if use an application that has palm rejection, any fix to this?
t3tr1s_ said:
When I'm trying to write with my S Pen, I usually rest my hand on the screen. With TouchWiz, this isn't a problem, but having flashed Aosp, my poem doesn't write with my hand touching the screen. Even if use an application that has palm rejection, any fix to this?
Click to expand...
Click to collapse
Did you install GMD Gesture Control on your phone? If you did, there's a function named Touch Consumption, turn it off and you'll be able to use you pen while resting your palm on the screen
anhtn5991 said:
Did you install GMD Gesture Control on your phone? If you did, there's a function named Touch Consumption, turn it off and you'll be able to use you pen while resting your palm on the screen
Click to expand...
Click to collapse
I appreciate the response.. Unfortunately this didn't work for me.. Still the same result... Can't get that feature to work on AOSP

Categories

Resources