Skip to content

imitoag/woundgenius-android-sdk-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WoundGeniusSDK Sample App

This repository contains the WoundGenius SDK Sample App for demonstrating the available features of WoundGenius SDK. It can be used as a reference app for Android team to integrate the WoundGenius SDK into their project.

Initial Setup

To launch the Sample App, perform the following actions:

  1. Request the WoundGenius SDK license, and request access to the WoundGenius SDK repository for your Android Developers. Follow the instructions listed here to do that: https://support.imito.io/portal/en/kb/articles/licence-key (You'll need to Sign Up and provide the Bundle Ids you are planning to use, and the developer GitHub usernames).

  2. Download/Pull this Sample app to your machine. Open project in Android Studio. android_sample_screenshot_1

  3. There are two ways to implement the SDK:

Option 1

• In the Github account you provided in Step 1, open Settings -> Developer Settings -> Personal Access Tokens -> Tokens(classic) -> Generate new token. Make sure you select the following scopes (“read:packages”) and Generate a token. After generating, make sure to copy your new personal access token. You won't see it again! The only option is to generate a new key.

• Create a github.properties file in the root of your Android project

• Add the properties username=GITHUB_USERID and token=PERSONAL_ACCESS_TOKEN. Replace GITHUB_USERID with personal / organisation Github User ID and PERSONAL_ACCESS_TOKEN with the token generated in Step 3.

• Add the following code to build.gradle inside the project gradle

 repositories {
    google()
    mavenCentral()
    jcenter()
    maven { url 'https://maven.google.com' }
    maven { url "https://jitpack.io" }
        maven {
                name = "GitHubPackages"
                url = uri("https://maven.pkg.github.com/imitoag/woundgenius-android-sdk")
                def propsFile = rootProject.file('github.properties')
                def props = new Properties()
                props.load(new FileInputStream(propsFile))
                credentials {
                    username props['username']
                    password props['token']
                }
        }
    }

Option 2

• Add sdk as local maven repo and repositories urls by adding the following code to build.gradle inside the project gradle 3. into your project build.gradle file

 repositories {
   google()
    mavenCentral()
    maven { url 'SDK' }
    jcenter()
    maven { url 'https://maven.google.com' }
    maven { url "https://jitpack.io" }
}
  1. Run the application.
  2. After you launch the application, go to Settings or press "License Key" button, and paste the license key you've received at Step 1.
image image
  1. Navigate back from Settings Screen. Click Start Capturing. Grant the permission for the app to access the Camera.
image

WoundGenius SDK React Native Sample App

This repository contains the React Native Sample (SampleRN folder).

Initial Setup

To launch the SampleRN App, perform the following actions:

  1. Pull the repository.
  2. Navigate to the SampleRN -> AwesomeProject.
  3. In terminal run a command npm install. That should setup the node_modules.
  4. Open the android folder using AndroidStudio.
  5. Follow one of the options for integrating WoundGenius SDk into the Sample app.
  6. Update the license key in AndroidStudio in the MainApplication class file.
  7. Navigate out of android folder in terminal, to the AwesomeProject folder. Run the npm start command in terminal. This should start the dev server usually on port 8081.
  8. Switch back to AndroidStudio to run the Android app on your device/emulator or press a keybutton in terminal to run app on Android from React Native.
  9. Click "Start Capturing". Allow access to Camera.