Skip to content

mloey/FingerPaints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Individual Assignment 2

Project was written in Android Studio using the supplied Navigation Drawer template. The apk and source code are under the Recognize directory in the attached archive.

On opening the app, the user sees the canvas. The user can draw on the canvas using multiple colors chosen by either hitting the paint palette or paint color button, clear and undo using the appropriate buttons, and save the strokes as an object (consisting of an ArrayList of Stroke objects as well as any recognized text) to internal storage using the save button. The user can also recognize text, which sends the data to the cloud recognition site in an AsyncTask, using the recognize text action bar button, as well as share the current drawing as a jpeg using the share button, which triggers and implicit intent of sharing a jpeg image. This also saves the jpeg in the user's photos directory on external storage.

By accessing the Navigation Drawer the user can open the second activity (for a result, the drawing to load), which shows any saved drawings in a ListView supplied by an adapter that displays a small canvas as an icon as well as any recognized text. The user can either select a drawing to open, or long press on an item to open up a contextual action bar which allows for selecting multiple drawings to delete, as well as deleting all the drawings. On loading a drawing, the result is passed back to the main canvas view, which now shows the loaded drawing as well as any recognized text.

Project was tested on a device and emulator running Android 4.4.2. Application requires Android 4.0 (API 14) or higher because of the MultiChoiceModeListener used to select multiple saved drawings in the saved drawings activity.

Icons were obtained from [1].

Challenges and Lessons Learned

This project helped me learn a lot about some specifics of Android in particular, as well as some more Java in general. On the Android side, it was interesting to learn about how to register user input and use it to draw on the canvas by supplying the canvas with a custom Line or Stroke object array and telling it to invalidate and call the onDraw method. It was also a challenge to learn how to appropriately call and pass data to the recognition service using an AsyncTask off of the main UI thread, as well as get that data back. I got to learn about passing data between activities using intents and starting activities for results as well. I learned about how to use the Android contextual action bar with a multi-choice mode listener, as well as using adapters to supply and alter the underlying data of a ListView and how to customize and extend adapters to display the data how I wanted to. I also got to use Android's implicit intent sharing feature to share jpeg images created from drawing objects, and how to save these data types to both internal and external storage in Android.

This also helped me learn more about aspects of Java, especially implementing the Serializable interface on custom objects to be able to save them and load them using Object streams. This project was fun to do and really helped me learn a lot.

Extra Credit

1. User can save, load, and multi-select/delete ink traces as objects, as well as save and share jpeg versions of their drawings.

2. The widget containing the canvas used for ink capture and display is a customized widget extending the Android View class, DrawWidget.java.

Screenshots























About

Android Drawing/Text Recognition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages