I've used this to get if the device has a physical keyboard (may or may not
be the correct method with 1.6, haven't looked into it), but should put you
in the right direction:

Configuration conf = context.getResources().getConfiguration();
boolean hasPhysical = (conf.keyboard == Configuration.KEYBOARD_QWERTY);

On Sat, Oct 10, 2009 at 1:33 PM, Jeremy Slade <jeremy.g.sl...@gmail.com>wrote:

>
> With all the new Android devices around the corner -- how do we
> identify what hardware the app is running on?  Specifically for game
> development, I want to find out what input devices might be available
> (keyboard, trackball, dpad, etc), and possibly even how things are
> layed out -- dpad on the left or right, only accessible w/ the
> keyboard open, etc.
>
> So does the API already provide any way to do that?  Identifying the
> phone model would be a start, but I'd rather not have to maintain a db
> of phone models and their hardware features.
>
>
> Thanks,
> Jeremy
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to