|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.github.xch168.ffmpeg.invoker.demo; |
|
|
|
package com.github.xch168.ffmpeg.invoker.demo; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import android.os.Build; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.widget.TextView; |
|
|
|
import android.widget.TextView; |
|
|
|
|
|
|
|
|
|
|
@ -13,9 +14,16 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
super.onCreate(savedInstanceState); |
|
|
|
super.onCreate(savedInstanceState); |
|
|
|
setContentView(R.layout.activity_main); |
|
|
|
setContentView(R.layout.activity_main); |
|
|
|
|
|
|
|
|
|
|
|
// Example of a call to a native method
|
|
|
|
TextView tv = findViewById(R.id.tv_cpu_abi); |
|
|
|
TextView tv = findViewById(R.id.sample_text); |
|
|
|
tv.setText("CPU_ABI: " + getCpuAbi()); |
|
|
|
tv.setText(""); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String getCpuAbi() { |
|
|
|
|
|
|
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { |
|
|
|
|
|
|
|
return Build.CPU_ABI; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return Build.SUPPORTED_ABIS[0]; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|