O'Reilly logo

Android Application Programming with OpenCV by Joseph Howse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Deleting, editing, and sharing photos in LabActivity

Our second activity, LabActivity, needs to do the following:

  • From the previous activity, receive a URI and file path for a PNG file
  • Display the image that is contained in the PNG file
  • Provide the following menu actions:
    • Show a confirmation dialog. On confirmation, delete the PNG file and finish the activity.
    • Show an intent chooser so that the user may select an app to edit the PNG file. (The URI is passed with the EDIT intent.)
    • Show a chooser so that the user may select an app to share or send the PNG file. (The URI is passed with the SEND intent.)

All of this functionality relies on standard Android library classes, notably the Intent class. Intents are the means by which activities communicate with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required