Shoot and Share: Basic Mobile Application showing AeroGear Pipe and Authorization with multiple service providers
Authors: Summers Pittman (secondsun) - Daniel Passos (dpassos)
Technologies: Java, Android, Google, Facebook, KeyCloak
Summary: And example of interacting with several modern web services.
Target Product: -
Product Versions: -
What is it?
Shoot and Share project demonstrates how to authenticate with Google, KeyCloak, and Facebook as well as how to upload pictures to Google Drive, your Facebook Wall, or a KeyCloak protected web service.
How do I run it?
1. System Requirements
For the complete instructions about how to setup Google, Facebook or Keycloak credentials, visit our OAuth2 documentation guide
2. Build Application
$ cd /path/to/app $ ./gradlew clean build
3. Test Application
To deploy, run and debug the application on an Android device attached to your system, on the command line enter the following:
5.1) Install generated apk to device
$ cd /path/to/app $ ./gradlew installDebug
5.2) Open app on device Application output is displayed in the command line window.
How does it work?
CameraActivity is responsible for taking pictures and saving them locally. After you take a picture an intent will launch
PhotoActivity is the sharing UI. In this class the calls are made to connect to the remote services using helper classes and uploads photos using an intent to start a background service.
KeycloakHelper are utility classes which connect to remote services using
aerogear-android-authz and upload photos to these services using
UploadService performs the upload in the background so the UI is not blocked.