I was wondering the same thing, but you mentioning "navigation" helped
me find this:

Context.getResources().getConfiguration().navigation =
  NAVIGATION_UNDEFINED
  NAVIGATION_NONAV
  NAVIGATION_DPAD
  NAVIGATION_TRACKBALL
  NAVIGATION_WHEEL

Source: 
http://developer.android.com/reference/android/content/res/Configuration.html

I plan to use this to determine if I can use the accuracy of the
trackball where MotionEvent.getX()/.getY() can return "fine-grained"
results.  Or if I need to get more in depth with DPAD movement.

Source: 
http://developer.android.com/reference/android/view/View.html#onTrackballEvent(android.view.MotionEvent)

On Apr 1, 2:08 pm, summers <[email protected]> wrote:
> Hi all,
>
> Does anyone know how to detect what primary non-touch navigation
> method (trackball, dpad, wheel, etc) a device is using within the
> code?
>
> I know that an app can structure the /res/ folders to detect it like
> this:
> /res/
>   drawable-nonav
>   drawable-dpad
>  drawable-trackball
>   drawable-wheel
>
> But what if I want my app to behave differently depending on the
> navigation input method- is there a way to do this in the code?
>
> Much appreciated!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to