I have a need to classify the device on first run to set some default settings for my games. This is my first time doing this and I've already hit some snags as to how to handle such a thing.
Basically I want to figure out if I can run the game with full quality everything on, which would be for the following phones: Nexus One Droid Incredible EVO X10 Maybe devour, haven't tested Any other snapdragon or cortex/pvr device Everything else with a GPU gets low quality settings Anything without a GPU gets low quality plus a warning saying that the game will not perform adequately on their device Ideally, I would retrieve some information like: CPU = MSM7200, MSM7600, CortexA8, etc.. GPU = MSM7200, PVRSGX530, etc.. - OR - CPU speed = 378Mhz or 600Mhz, or 1000Mhz GPU max = GLES 2.0 or GLES 1.1, etc but of course that's not really available as I only have a few pieces of information in android.os.Build, which mostly are: Build.BOARD (IE trout) Build.DEVICE (IE dream) Build.MODEL (IE T-Mobile G1) and then whatever is in /proc/cpuinfo which I could fetch easily through either Java or native. I'll post examples on the end of this post. So here are the 3 approaches I was hoping to try: 1) Benchmarking - Run a simple test for 2 seconds and ballpark the raw cpu power from that. Pros - easy to implement, fairly reliable Cons - If it happens to run during a high-load moment on the phone (which can last for several seconds) it will be very far off and will misclassify devices. 2) Use a really big list of DEVICE or MODEL names and check against that list. Pros - It'll work Cons - The list is already over 60 entries and is growing at an incredible rate. It would be very hard to keep it current and keep all the variants straight 3) Pull some raw info out of linux and use that. Pros - Most detailed info available Cons - Can't find things like raw CPU Mhz, OpenGL version support, etc.. So, any better ideas on how to do this? Thanks! cpuinfo for a G1: Processor : ARMv6-compatible processor rev 2 (v6l) BogoMIPS : 245.36 Features : swp half thumb fastmult edsp java CPU implementer : 0x41 CPU architecture: 6TEJ CPU variant : 0x1 CPU part : 0xb36 CPU revision : 2 Hardware : trout Revision : 0080 Serial : 0000000000000000 cpuinfo for a Nexus One: Processor : ARMv7 Processor rev 2 (v7l) BogoMIPS : 162.54 Features : swp half thumb fastmult vfp edsp thumbee neon CPU implementer : 0x51 CPU architecture: 7 CPU variant : 0x0 CPU part : 0x00f CPU revision : 2 Hardware : mahimahi Revision : 0081 Serial : 0000000000000000 -- 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

