June 2017
Intermediate to advanced
232 pages
5h 4m
English
Finally, we can complete the Android Things app, modifying the MainActivity. The last step is handling the button that enables a user to take the picture:
final AndroidCamera aCamera = new AndroidCamera(this, listener); aCamera.initCamera(); aCamera.openCamera();
In this way, we initialize the camera, setting the listener that will receive the event notification.
imgView = (ImageView) findViewById(R.id.img);
btnPicture = (Button) findViewById(R.id.btnPicture); btnPicture.setEnabled(false); ...
Read now
Unlock full access