On Tue, Jan 31, 2012 at 4:01 PM, Dritan <djdea...@gmail.com> wrote: > Thank you for your reply Kris. > > I am trying to create a low-level mapping where some button press on > my 22-button device is to be seen as left click, by following this > configuration: http://source.android.com/tech/input/key-layout-files.html > > I know Android is a flexible system and without rooting a device, it > is TOTALLY possible to create your own input device as a mouse + > keyboard + touchpad + braille + whatever kind of input you wish to > send to android. (NOT simulate keys, but actually send the > corresponding byes for "Left Click" or "Right Click" or "move > pointer"). >
I totally agree with you. It's not that what you're doing is fundamentally flawed, it's that you're thinking about it the wrong way. You're looking to solve it using the naive hackey behavior typical of malware. You have to remember that your app would be potentially killed off at any time, so even if you launched it as a background and were able to register clicks to the toplevel view, your app could always annoyingly disappear! > Consider a professional artists who purchases a digital drawing pad > *with* a stylus pen for accuracy and all his/her drawings on the > drawing pad are directly sent to Android as legit mouse or stylus > events. This includes the pressure of the lines drawn as well, without > having to directly simulate each event. > True. > It just seems that not one Google employee seems to know about this. > Documentation is barely existent (and whatever is there is very poor), > books don't help (not one book dares touch on this topic). I've gone > back and forth all over the web to find an answer and unfortunately, > only someone in this area of expertise can actually help me. > Well, to be fair, this list isn't something that Google is responsible for answering questions on. > What better place to post a question about Android than the source > itself? > Personally I did not know that you could add such low level support at the application level. The only thing I'm aware of is adding HID profiles, and the docs for those are here: http://source.android.com/tech/input/overview.html > Thank you, > Dritan > > p.s. If I don't get a reply from a competent Google employee (or > really, anyone who's competent in this area), I shall re-post this > question with a different title, every single week. I don't want to > root the phone, nor do I feel like re-compiling the source to get > the .java files for the source (even then it's a tremendous headache). > Any help related directly to this matter is greatly appreciated, thank > you! That's a very passive aggressive threat.. I'm sure the discussion around the office will be something like "did you answer that guy yet, tom?" "No, he said he would repost every week until I did, I figured I'd see how long he could keep it up." What do you mean by recompiling the source to get the java files for the source? That doesn't make any sense, you already have all the system source, it's in the public repository, and you can browse and modify it yourself. The reason you don't want to do so is that if you do, nobody will have your hacked firmware, unless Google accepted your patch, which they might do. Your problem is that what you're wanting to write isn't an app, it's a driver for the device. You won't be able to do that through an app, the system doesn't work like that. There isn't much HID support, from cupcake onward, iirc, because it's just not very mature. There are some projects out there aiming to support this eventually, but I don't know a general way to get support for your device on Android if it has to do lower level things.. http://code.google.com/p/androhid/ For example kris -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en