Skip to content

geocolumbus/ionic-rekognition

Repository files navigation

ionic 4 Amazon AWS Rekognition Mobile Project

Requirements

  • Macintosh Computer
  • Ionic 4.1 installed globally
  • Android SDK
  • XCode 10
  • Provisioning profile from Apple Developer Network

Installation

This is a an ionic-angular app.

git clone https://github.com/geocolumbus/ionic-rekognition.git
cd ionic-rekognition
npm install
ionic cordova build ios
ionic cordova build android

Running the app

Platform Command Line Notes
Browser ionic serve
Android Emulator ionic cordova emulate android --target=MyAndroid Assumes the Android SDK is installed, and an AVD named "MyAndroid" exists.
Android Device ionic cordova run android --device Connect an Android device to USB.
iOS Emulator ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0" Assumes you have XCode 10 installed and ios-deploy installed globally.
iOS Device ionic cordova run ios --device-- --buildFlag="-UseModernBuildSystem=0" Connect an iOS device to USB. You must have a provisioning profile.
  1. Run a production build of your app with ionic cordova build ios --prod
  2. Open the .xcodeproj file in platforms/ios/ in Xcode
  3. Connect your phone via USB and select it as the run target
  4. Click the play button in Xcode to try to run your app

Unit Tests

To enable continuous unit testing, open a terminal window, navigate to the project folder and type

npm run test

How to Configure Amazon Cognito authentication and Rekognition Service access

  1. Create an Identity and Access Management Group (IAM)
  2. Create an admin Administrator user for that group.
  3. Create an aliased access url to the AWS console, i.e. https://georgecampbelloclc.signin.aws.amazon.com/console
  4. Log into the AWS console with the Administrator user
  5. Create a programmatic user with Rekognition permissions. Note the "Access Key Id" and "Secret Access Key"
  6. Go to Amazon Cognito and create an "Identity Pool". Note the IdentityPoolID and Region.
  7. Go back to the IAM console and add the Rekognition service to the Identity Pools' role.

TODO - Diagram to explain all this better.

Reference

TODO

Convert the oclc number into a holdings location.

https://www.oclc.org/developer/develop/web-services/worldcat-search-api/library-locations.en.html

Adendum

To install the camera plugin required these steps:

ionic cordova plugin add cordova-plugin-camera
npm install --save @ionic-native/camera
ionic cordova plugin add cordova-plugin-ios-camera-permissions

About

Mashup of Amazon Rekognition and WorldCat Search API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published