Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3452286
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:14:21+00:00 2026-05-18T09:14:21+00:00

I am creating a driver for a custom piece of input hardware that will

  • 0

I am creating a driver for a custom piece of input hardware that will attempt to pass data to the kernel as an input, which the kernel will then pass up through the OS and expose to the app level via MotionEvent. Looking at some other device drivers, it looks like setting input events via some of the functions exposed in input.h of the Android 2.2 kernel (2.6.32) might do the trick, but I’d love to confirm this. Before starting down this path I am trying to get a better understanding of how existing inputs, be it from the screen, trackball, etc are passed up through the OS. The ultimate goal is to ensure that we can pass data from device to App-level before investing too much time going down this path.

Input header of linux kernel 2.6.32

http://lxr.free-electrons.com/source/include/linux/input.h?v=2.6.32

I’ve browsed through the Android class sources, but not sure where to look to see how the OS instatiates the MotionEvent class that can be accessed via the onTouchEvent() method of the View class. Can anyone point me in the right direction in terms of how MotionEvent is populated by the OS and how the OS gets that data from the kernel?

Thanks,

Paul

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T09:14:22+00:00Added an answer on May 18, 2026 at 9:14 am

    The first place I would look at in in frameworks/base/libs/ui/EventHub.cpp, it will go through /dev/input to find the different input devices on your platform and what “kind” of input those are.

    More…

    Next step is in frameworks/base/services/jni/com_android_server_KeyInputQueue.cpp and frameworks/base/services/java/com/android/server/KeyInputQueue.java.

    If all you are doing is implementing the input interface for a new piece of hardware, I don’t think you need to do any further than that…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.