Home Assignment 3 (due 04.11.2016)
In this assignment, your task is to convert a simple image processing application to utilize the cloud for heavier tasks.
The original Android application does all of it's processing locally. It looks for a hard-coded image for its input.
Your job is to create & deploy a Heroku webapp which can take as input images and in return respond with processed images. Once you have your Heroku app up & running, you should modify your Android application to use the Heroku app for the image processing instead of the original local behaviour.
- Your app should allow the user to select some image from their phones storage (e.g. camera pictures folder) (2.5 pts)
- Sending the image from your Android app to your Heroku app using a HTTP POST request (5 pts)
- Handling the request on Heroku, e.g. storing the image(5 pts)
- Processing the image (2.5 pts)
- Replying to the HTTP POST request with the processed image file (5 pts)
- Handling Heroku app's response inside the Android app (5 pts)
The base code for the heroku web app is here.
In your submission, provide the source code for both the Android app and the Heroku app.
Heroku quickstart guide:
- Install the Heroku Command Line Interface (CLI)
- In your commandline, login by entering the command:
- Fetch our web app skeleton code
- Navigate to the root folder of the webapp, and if it's not initialized as a git repository yet, do so:
git add .
git commit -m "My Commit Message"
- Create a new heroku app with
heroku create <appName>, replace <appName> with your desired name
- Build your webapp with
- This command is run by Heroku whenever you deploy a new version of your app to Heroku
- To run your Heroku webapp locally:
heroku local -f Procfile.windows(Windows)
- To deploy your app to the Heroku cloud, use
git push heroku master
- To open your deployed app in the browser, you can use
Don't forget to add this library as a dependency in your Heroku app. The Android app uses an Android port of this library, so there are some slight differences between the original library and the Android port.
Feel free to create additional assumptions, modifications or restrictions for your solution, but make sure to document them!