Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
255 changes: 137 additions & 118 deletions AppGateway.js

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,32 @@ var sharedBlacklist = [
];
```

# On WSL

## Getting up and running on Windows as normal:

1. Install adb on Windows AND WSL

2. Install Android Studio

3. Install 29 & 28 Android SDK

4. Install Java JDK: https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html [JDK 11 to be safe]

5. Set JAVA_HOME on Windows to location of JDK + add to PATH (requires restart of VSCode)

6. Set ANDROID_SDK_ROOT to location of Android SDK (See Android Studio)

7. Connect device as normal enabling USB debugging

## Connecting to WSL:

1. Connect device

2. On Windows run: `adb tcpip 5555`

3. On WSL run: `adb connect [ip device]:5555`

# To run

Notes: Requires internet accesss
Expand Down
1 change: 1 addition & 0 deletions actions/config/actionTypes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const UPDATE_CONFIG = "UPDATE_CONFIG"
6 changes: 6 additions & 0 deletions actions/config/actions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import * as actionTypes from './actionTypes'

export const updateConfig = (config) => ({
config,
type: actionTypes.UPDATE_CONFIG,
})
1 change: 0 additions & 1 deletion actions/meta/actionTypes.js

This file was deleted.

7 changes: 0 additions & 7 deletions actions/meta/actions.js

This file was deleted.

41 changes: 41 additions & 0 deletions config/configUpdater.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import AWS from "aws-sdk";

// Makes request to S3 bucket to get app config
const getConfig = () => {
return new Promise(async (resolve, reject) => {
// This bucket should always exist
S3_BUCKET = "liversedge-application-configs";
S3_FILE_NAME = "refme.json";

// Initialize the Amazon Cognito credentials provider
const region = "eu-west-2";
AWS.config.update({
region,
credentials: new AWS.CognitoIdentityCredentials({
IdentityPoolId: "eu-west-2:14d6cdae-3602-457b-b791-3c66c8d1c62b",
})
});

var params = {
Bucket: S3_BUCKET,
Key: S3_FILE_NAME,
ResponseCacheControl: "no-cache"
}

// Create a new service object
var s3 = new AWS.S3();

s3.getObject(params, function (err, data) {
// Handle any error and exit
if (err)
reject(err);

// No error happened
// Convert Body from a Buffer to a String
let objectData = JSON.parse(data.Body.toString('utf-8')); // Use the encoding necessary
resolve(objectData)
});
});
}

export { getConfig }
Loading