AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA" />
java
private TextView textView;
private Camera camera;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = (TextView) findViewById(R.id.textView);
camera = Camera.open();
Camera.Parameters parameters = camera.getParameters();
String params = parameters.flatten().replace(";", "\n");
textView.setText(params);
}
@Override
protected void onDestroy() {
super.onDestroy();
camera.release();
}