List supported ABIs

Example list Android devices SUPPORTED_ABIS, SUPPORTED_32_BIT_ABIS and SUPPORTED_64_BIT_ABIS.

Run on Emulator with Intel x86_64

Run on device, Nexus 7, with 32-bit ARM CPU
MainActivity.java
package com.blogspot.android_er.androidsupportedabis;

import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

TextView textSupportedABIs = (TextView)findViewById(R.id.supportedabis);

textSupportedABIs.setText("Build.SUPPORTED_ABIS: ");
String[] SUPPORTED_ABIS = Build.SUPPORTED_ABIS;
for(String abi : SUPPORTED_ABIS){
textSupportedABIs.append(abi + " ");
}
textSupportedABIs.append(" ");

textSupportedABIs.append("Build.SUPPORTED_32_BIT_ABIS: ");
String[] SUPPORTED_32_BIT_ABIS = Build.SUPPORTED_32_BIT_ABIS;
for(String abi32 : SUPPORTED_32_BIT_ABIS){
textSupportedABIs.append(abi32 + " ");
}
textSupportedABIs.append(" ");

textSupportedABIs.append("Build.SUPPORTED_64_BIT_ABIS: ");
String[] SUPPORTED_64_BIT_ABIS = Build.SUPPORTED_64_BIT_ABIS;
for(String abi64 : SUPPORTED_64_BIT_ABIS){
textSupportedABIs.append(abi64 + " ");
}
textSupportedABIs.append(" ");
}
}


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout

android_layout_width="match_parent"
android_layout_height="match_parent"
android_padding="16dp"
android_orientation="vertical"
tools_context="com.blogspot.android_er.androidsupportedabis.MainActivity">

<TextView
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_gravity="center_horizontal"
android_autoLink="web"
android_text="http://android-er.blogspot.com/"
android_textStyle="bold" />

<TextView
android_id="@+id/supportedabis"
android_layout_width="match_parent"
android_layout_height="wrap_content" />
</LinearLayout>




Related:
- Display ABI using "adb shell getprop ro.product.cpu.abi" command

Related Posts by Categories

0 comments:

Post a Comment

Blog Archive

Powered by Blogger.