How do I get pen type events in my app?

by walnutchen » Fri, 04 Feb 2011 05:19:29 GMT

Sponsored Links
 So the driver guy tells me that I have an input device that is capable
of inputting the "pen" type.  This is custom hardware, of course.

He says he is calling:

input_report_key(dev, BTN_TOOL_PEN, 1);
input_report_key(dev, BTN_TOOL_RUBBER,1);

and also reporting the X and Y coordinates with ABS_X and ABS_Y.

I can get the ACTION_DOWN and ACTION_UP and (x,y) in my app with
motionEvents.  For the life of me I cannot figure out how to get the
pen "type" events.  Is that a keyEvent?  I tried to listen to
keyEvents but I never hear anything about pen type...

Please help.  Thanks.


Other Threads

1. Google Talk client & other problems

I recently set up Google Talk to pull in another jabber server which
had an AIM transport (a federation?)  While this has mostly worked,
there are a few issues:
1, I keep getting messages that the other server wants to chat.  This
is annoying (I also see it in gmail's chat, so perhaps this is not
related to the android app specifically).
2, I tried to associate one of these users with a contact - it brought
up my full list of contacts and I selected the user I wished to add
the name to and it appeared to open that contact.  However, it did not
add a field for google talk.  Instead it appears to create a second
contact in the background with that name and google talk field.  If I
manually add the gtalk info to the real contact (the one with phone
info already there), it does not show this user as online in my list
of contacts, and only shows the other, new contact as online.
3, If I manually add a user's gtalk to their contact info and click on
it to start a conversation, it goes to a different conversation than
if I click on their name in the buddy list.
I'd _really_ like to get this working as having integrated IM would be
a huge benefit to me.

Other issues:
1, You can copy an address, say from an email, but you can't paste it
back as text, say to a calendar entry.  It just pastes whatever was
previously in the clipboard.
 a, Really, the gmail client needs to recognize events and have the
option to automatically add them to your calendar.
2, I tried to edit a contact to put a hyphen in the phone # (ok, so
I'm OCD a little) but doing so added an extra digit to the phone
number.  It did hyphen the first 10 digits correctly automatically but
had an extra somewhere so it was ###-###-#####
 a, I then hit back to cancel changes but found out that automatically
saved them - not a bug but confusing sometimes.

These are the issues I can think of off the top of my head.
Unfortunately I don't know of anywhere but here to post them as a
cursory search around for a bugzilla or some other tool doesn't turn
up anything.  Any tips to fix these would be appreciated.


2. Monitoring Browser activities


I would like to know if its possible to sit between Android browser
and the network layer so that I can monitor the activities of user
through browser.  It could be something similar to on-device-proxy.
What is the best way to get this done ?

Thanks in advance !



3. Video playback problem, video not show on surface, only sound is ok

4. Google maps API key and Android emulator...

5. extend Parcelable?

6. ActivityManager(51): Timeout executing service?

7. Feature request?