LinkedInTwitterFacebook

Android ABIs list application.

This application will show us about ABIs (Application Binary Interface support).
Basically get the information about CPU and ABIs.
You can read more about this at ARM website.
The result will come like this screenshot.
device-2016-01-26-161709
The main problem was the SDK: minSdkVersion 21 / targetSdkVersion 23 and the emulator with Nexus 6P API 23. That make me to increase the RAM – 1Gb. The hardware is old and working hard with this settings , but finally I make the screenshot.
Let’s see the source code of two files: MainActivity.java

package com.free_tutorials.catalin.abi_list;

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:\n”);
String[] SUPPORTED_ABIS = Build.SUPPORTED_ABIS;
for(String abi : SUPPORTED_ABIS){
textSupportedABIs.append(abi + “\n”);
}
textSupportedABIs.append(“\n”);

textSupportedABIs.append(“Build.SUPPORTED_32_BIT_ABIS:\n”);
String[] SUPPORTED_32_BIT_ABIS = Build.SUPPORTED_32_BIT_ABIS;
for(String abi32 : SUPPORTED_32_BIT_ABIS){
textSupportedABIs.append(abi32 + “\n”);
}
textSupportedABIs.append(“\n”);

textSupportedABIs.append(“Build.SUPPORTED_64_BIT_ABIS:\n”);
String[] SUPPORTED_64_BIT_ABIS = Build.SUPPORTED_64_BIT_ABIS;
for(String abi64 : SUPPORTED_64_BIT_ABIS){
textSupportedABIs.append(abi64 + “\n”);
}
textSupportedABIs.append(“\n”);
}
}

…and activity_main.xml:

<?xml version=”1.0″ encoding=”utf-8″?>
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
xmlns:tools=”http://schemas.android.com/tools”
android:layout_width=”match_parent”
android:layout_height=”match_parent”
android:padding=”16dp”
android:orientation=”vertical”
tools:context=”com.free_tutorials.catalin.abi_list.MainActivity”>

<TextView
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:layout_gravity=”center_horizontal”
android:autoLink=”web”
android:text=”http://catalin-festila.blogspot.com”
android:textStyle=”bold” />

<TextView
android:id=”@+id/supportedabis”
android:layout_width=”match_parent”
android:layout_height=”wrap_content” />
</LinearLayout>

You can see the supportedabis is a string fill by MainActivity.java and show under activity_main.xml .
And that all about sources you need to make the aplication. All files you see is make by Android Studio 2.0. Also you need to have same function like java file and take a look at android manifest intro.

I used the default AndroidManifest.xml :