|
|
|
@ -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]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|