diff --git a/app/src/main/java/com/github/xch168/ffmpeg/invoker/demo/MainActivity.java b/app/src/main/java/com/github/xch168/ffmpeg/invoker/demo/MainActivity.java index 5d59113..fab98d0 100644 --- a/app/src/main/java/com/github/xch168/ffmpeg/invoker/demo/MainActivity.java +++ b/app/src/main/java/com/github/xch168/ffmpeg/invoker/demo/MainActivity.java @@ -1,5 +1,6 @@ package com.github.xch168.ffmpeg.invoker.demo; +import android.os.Build; import android.os.Bundle; import android.widget.TextView; @@ -13,9 +14,16 @@ public class MainActivity extends AppCompatActivity { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - // Example of a call to a native method - TextView tv = findViewById(R.id.sample_text); - tv.setText(""); + TextView tv = findViewById(R.id.tv_cpu_abi); + tv.setText("CPU_ABI: " + getCpuAbi()); + } + + private String getCpuAbi() { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { + return Build.CPU_ABI; + } else { + return Build.SUPPORTED_ABIS[0]; + } } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 5bdae71..cb99279 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -7,10 +7,9 @@ tools:context="com.github.xch168.ffmpeg.invoker.demo.MainActivity">