


See this guide for the source for this answer. In your AndroidManifest.xml, add the following queries block: Įasy way works in most cases, using the intent to launch the camera: public final String APP_TAG = "M圜ustomApp" public final static int CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE = 1034 public String photoFileName = "photo.jpg" File photoFile public void onLaunchCamera ( View view ) If you see a "INSTALL_FAILED_CONFLICTING_PROVIDER" error when attempting to run the app, change this to something unique, such as _APP_NAME_HERE, and also update the value in your XML tag to match. The example below uses and should match the authorities XML tag specified. I could capture ddms screenshots with both use host gpu and HAXM enabled. You must configure a FileProvider as show in this section. For a workaround try Android 4.0.3 (API 15) with the Intel Atom (x86) image. The hard way - use the Camera API to embed the camera preview within your app, adding your own custom controls.The easy way - launch the camera with an intent, designating a file path, and handle the onActivityResult.The camera implementation depends on the level of customization required: Once it finishes importing, you should be able to build and run the app directly from Android Studio. For the Gradle Sync question you can simply answer Yes.
Select the Android platform directory in your project (This guide covers how to work with the camera and how to access media stored on the phone. Optional but recommended: If you use the on-device API, configure your app to automatically download the ML model to the device after your app is installed from. Select Import Project (Eclipse ADT, Gradle, etc).
