Device Year Class

Android Device Year Class Library

Лицензия

Лицензия

Группа

Группа

com.facebook.device.yearclass
Идентификатор

Идентификатор

yearclass
Последняя версия

Последняя версия

2.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Device Year Class
Android Device Year Class Library
Ссылка на сайт

Ссылка на сайт

https://github.com/facebook/device-year-class
Система контроля версий

Система контроля версий

https://github.com/facebook/device-year-class.git

Скачать yearclass

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.facebook.device.yearclass/yearclass/ -->
<dependency>
    <groupId>com.facebook.device.yearclass</groupId>
    <artifactId>yearclass</artifactId>
    <version>2.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.facebook.device.yearclass/yearclass/
implementation 'com.facebook.device.yearclass:yearclass:2.1.0'
// https://jarcasting.com/artifacts/com.facebook.device.yearclass/yearclass/
implementation ("com.facebook.device.yearclass:yearclass:2.1.0")
'com.facebook.device.yearclass:yearclass:jar:2.1.0'
<dependency org="com.facebook.device.yearclass" name="yearclass" rev="2.1.0">
  <artifact name="yearclass" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.facebook.device.yearclass', module='yearclass', version='2.1.0')
)
libraryDependencies += "com.facebook.device.yearclass" % "yearclass" % "2.1.0"
[com.facebook.device.yearclass/yearclass "2.1.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

Devices by Year Class Device Year Class

Device Year Class is an Android library that implements a simple algorithm that maps a device's RAM, CPU cores, and clock speed to the year where those combination of specs were considered high end. This allows a developer to easily modify application behavior based on the capabilities of the phone's hardware.

Most Popular Devices by Year Class

Mappings as of this writing (RAM is a ceiling):

RAM condition Year Class
768MB 1 core 2009
2+ cores 2010
1GB <1.3GHz 2011
1.3GHz+ 2012
1.5GB <1.8GHz 2012
1.8GHz+ 2013
2GB 2013
3GB 2014
5GB 2015
more 2016

Integration

Download

Download the latest JARs or grab via Gradle:

compile 'com.facebook.device.yearclass:yearclass:2.1.0'

or Maven:

<dependency>
  <groupId>com.facebook.device.yearclass</groupId>
  <artifactId>yearclass</artifactId>
  <version>2.1.0</version>
</dependency>

Calculate Device Year Class

Calculating the current device's Year Class is simple.

int year = YearClass.get(getApplicationContext());

Then, later on, you can use the year class to make decisions in your app, or send it along with your analytics.

if (year >= 2013) {
    // Do advanced animation
} else if (year > 2010) {
    // Do simple animation
} else {
    // Phone too slow, don't do any animations
}

See the yearclass-sample project for more details.

Improve Device Year Class!

See the CONTRIBUTING.md file for how to help out.

License

Device Year Class is BSD-licensed. We also provide an additional patent grant.

com.facebook.device.yearclass

Facebook

We are working to build community through open source technology. NB: members must have two-factor auth.

Версии библиотеки

Версия
2.1.0
2.0.0
1.0.1
1.0.0