Android Normal app APK how to confirm that the system is MTK platform

Source: Internet
Author: User

Objective
Welcome everyone I share and recommend useful code Snippets ~ ~
Statement
Welcome reprint, but please keep the original source of the article:
Csdn:http://www.csdn.net
Rainy season o mo away: http://blog.csdn.net/luckkof

Body

[Description]
Common app APK How to confirm that the system is MTK platform
[Keyword]
APP APK MTK Platform System property
[Solution]
Some app vendors may be optimized for the MTK platform, so how does the normal app confirm that the system is a MTK platform?
Currently in the mobile phone operating system, to be able to directly determine the MTK system, you can read the following system property.
Java API
Android.os.SystemProperties
public string get (string key);
public string get (String key, String def);

Can read the following three MTK platform unique system property, there is the MTK platform, and can obtain specific MTK platform release information.
Ro.mediatek.platform corresponding to the MTK IC, the attention does not distinguish 2g,3g, such as mt6575/mt6515 are unified will be MT6575
Ro.mediatek.version.branch corresponds to MTK internal branch, such as ALPS.ICS.MP, ALPS. ICS2. MP, ALPS. Jb. MP and the Like
Ro.mediatek.version.release corresponds to the release version of MTK internal branch, such as alps.ics.mp.v2.47, ALPS. JB2. Mp. V1.9

such as the ICS2 75 mobile phone
[Ro.mediatek.platform]: [MT6575]
[Ro.mediatek.version.branch]: [ALPS. Ics. MP]
[Ro.mediatek.version.release]: [ALPS. Ics. Mp. V2.47]

JB2. MP 89 for Mobile
[Ro.mediatek.platform]: [MT6589]
[Ro.mediatek.version.branch]: [ALPS. JB2. MP]
[Ro.mediatek.version.release]: [ALPS. JB2. Mp. V1.9] Below is a demo of the Util Java class. import android.os.SystemProperties;/**
* A Simple util demo for Mediatek Platform information
*/
public class mediatekplatformutil{ Public static final String Mtk_platform_key = "Ro.mediatek.platform";
public static final String Mtk_version_branch_key = "Ro.mediatek.version.branch";
public static final String Mtk_version_release_key = "Ro.mediatek.version.release"; /**
* Check is or not Mediatek Platfrom
*/
public static Boolean Ismediatekplatform () {
String platform = systemproperties.get (Mtk_platform_key);
return platform! = null && (Platform.startswith ("MT") | | | platform.startswith ("MT"));
}   /**
* Get the Mediatek Platform information, such as MT6589, MT6577 .....
* @Warning It does not distinguish between 2G and 3G ICs. Ie. MT6515, MT6575 = MT6575
*/
public static String Getmediatekplatform () {
Return Systemproperties.get (Mtk_platform_key);
} /**
* Get the MediaTek version information.
* Return A string array with elements. First element is branch, and the second is release version.
*/
public static string[] Getmediatekversion () {
String[] result = new STRING[2];
Result[0] = Systemproperties.get (Mtk_version_branch_key);
RESULT[1] = Systemproperties.get (Mtk_version_release_key);
return result;
} }
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.