Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
86 lines (61 sloc) 2.32 KB

Shoot 'n Share


Authors: Erik Jan de Wit (edewit)
Level: Advanced
Technologies: Cordova, iOS, Android
Summary: And example of interacting with several modern web services.
Target Product: -
Product Versions: -
Source: https://github.com/aerogear/aerogear-cordova-cookbook/tree/master/Shoot

What is it?

You want to shoot cool photos and share them with friends using GoogleDrive, Facebook or your own Keycloak server. With ShootnShare you can take picture, browse your camera roll, pick a picture to share and share it! Picture get uploaded to your GoogleDrive, Keycloak and/or Facebook

How do I run it?

0. System Requirements

For the complete instructions about how to setup Google, Facebook or Keycloak credentials, visit our OAuth2 documentation guide

1. Application Setup

To use this project as is, first clone the repo from GitHub, then run:

$ cordova restore plugins --experimental

Notes: Cordova restore is an experimental feature that allows to persist the currently added plugins to config.xml.

If you don't want to use cordova restore, you have to add all plugins manually (it might be required if you want to test the latest version of oauth2 plugin for instance):

$ cordova plugin add org.apache.cordova.camera
$ cordova plugin add org.apache.cordova.file
$ cordova plugin add org.apache.cordova.file-transfer
$ cordova plugin add org.jboss.aerogear.cordova.oauth2
  • Open www/js/app.js and update clientId and clientSecret with your App ID and App Secret

iOS setup

  • Add iOS platform
$ cordova platform add ios
  • Change fbYYY to fb<App ID> in the Shoot-Info.plist
<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>org.aerogear.Shoot</string>
                <string>fbYYY</string>
            </array>
        </dict>
    </array>
  • Deploy on device:
$ cordova run ios --device

Android setup

  • Add Android platform
$ cordova platform add android
  • Deploy on device:
$ cordova run android --device