Determine android device generation?

I’d like to automatically set some graphics settings in my game by determining the power of the device it’s running on.

My idea is to have a cut off date, say anything made over a year ago will run on medium, anything over two years on low settings.

Any ideas how I can quickly identify the devices capabilities?

not sure if it works on mobile or how accurate it is but i think you can try:

I do not believe you can pull the Device year, but you can pull the processor type, and then circumvent with some type of online php. This way, you can keep your game up to date.