Challenge: Android Components and APIs

Complete this hands-on exercise to test your knowledge of the Android components and APIs of React Native.

This challenge will test your knowledge of the Android components and APIs of React Native. You’ll use these concepts to create a minimalistic user interface.

Task

Build a React Native application that:

  • Shows a drawer layout that slides in from the left side, as shown in the illustration below. These three elements should be rendered inside the drawer in text format:

    • All photos
    • Favorites
    • Trash
  • Has a back handler functionality so that the application should exit once the user clicks the hardware back button.

  • Checks whether or not the user has already granted permission for camera access when the user clicks the TAKE NEW PHOTO button. Display appropriate toasts depending on whether the user has already granted permission or not.

Modify the code so that if the user has not granted the camera permission, the application requests camera permission once the user clicks the TAKE NEW PHOTO button. The permission result strings should then be displayed using toasts.

Expected output

The illustrations below show what the final output should look like after completing the challenge.

Get hands-on with 1200+ tech skills courses.