diff --git a/mobile/.idea/workspace.xml b/mobile/.idea/workspace.xml
index 32a9465..0364ec8 100644
--- a/mobile/.idea/workspace.xml
+++ b/mobile/.idea/workspace.xml
@@ -15,8 +15,8 @@
-
-
+
+
@@ -58,8 +58,8 @@
-
+
@@ -71,8 +71,8 @@
-
+
@@ -191,7 +191,7 @@
-
+
diff --git a/mobile/android/app/app.iml b/mobile/android/app/app.iml
index 7d6576b..a7549d6 100644
--- a/mobile/android/app/app.iml
+++ b/mobile/android/app/app.iml
@@ -96,11 +96,8 @@
-
-
-
@@ -112,12 +109,11 @@
-
-
+
diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle
index 7bf7bef..6466259 100644
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -94,13 +94,11 @@ def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false
android {
- compileSdkVersion rootProject.ext.compileSdkVersion
- buildToolsVersion rootProject.ext.buildToolsVersion
-
+ compileSdkVersion 25
defaultConfig {
applicationId "com.deightonar"
- minSdkVersion rootProject.ext.targetSdkVersion
- targetSdkVersion rootProject.ext.targetSdkVersion
+ minSdkVersion 23
+ targetSdkVersion 25
versionCode 1
versionName "1.0"
ndk {
@@ -126,7 +124,7 @@ android {
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
- def versionCodes = ["armeabi-v7a":1, "x86":2]
+ def versionCodes = ["armeabi-v7a": 1, "x86": 2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
@@ -134,14 +132,28 @@ android {
}
}
}
+ productFlavors {
+ }
}
dependencies {
- compile fileTree(dir: "libs", include: ["*.jar"])
- compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
- compile "com.facebook.react:react-native:+" // From node_modules
- compile project(':react-native-navigation')
- compile project(':react-native-maps')
+ implementation fileTree(include: ['*.jar'], dir: 'libs')
+ api "com.android.support:appcompat-v7:25.3.1"
+ api 'com.facebook.react:react-native:+'
+ // From node_modules
+ api project(':react-native-navigation')
+ api project(':react-native-maps')
+ api project(':gvr_common')
+ api project(':arcore_client')
+ api project(path: ':react_viro')
+ api project(path: ':viro_renderer')
+ api 'com.google.android.exoplayer:exoplayer:r2.2.0'
+ api 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'
+ api 'com.amazonaws:aws-android-sdk-core:2.2.+'
+ api 'com.amazonaws:aws-android-sdk-ddb:2.2.+'
+ api 'com.amazonaws:aws-android-sdk-ddb-mapper:2.2.+'
+ api 'com.amazonaws:aws-android-sdk-cognito:2.2.+'
+ api 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.2.+'
}
// Run this once to be able to run the application with BUCK
diff --git a/mobile/android/app/src/main/AndroidManifest.xml b/mobile/android/app/src/main/AndroidManifest.xml
index 753613a..287cd00 100644
--- a/mobile/android/app/src/main/AndroidManifest.xml
+++ b/mobile/android/app/src/main/AndroidManifest.xml
@@ -5,31 +5,33 @@
+
-
-
-
-
-
-
-
-
+ android:icon="@mipmap/ic_launcher"
+ android:theme="@style/AppTheme">
+
+
+
+
+
+
+
+
+
diff --git a/mobile/android/app/src/main/java/com/deightonar/MainApplication.java b/mobile/android/app/src/main/java/com/deightonar/MainApplication.java
index 0767542..4cd464c 100644
--- a/mobile/android/app/src/main/java/com/deightonar/MainApplication.java
+++ b/mobile/android/app/src/main/java/com/deightonar/MainApplication.java
@@ -14,6 +14,8 @@ import java.util.List;
import com.reactnativenavigation.NavigationApplication;
import com.airbnb.android.react.maps.MapsPackage;
+import com.viromedia.bridge.ReactViroPackage;
+
public class MainApplication extends NavigationApplication {
@Override
public boolean isDebug() {
@@ -25,7 +27,8 @@ public class MainApplication extends NavigationApplication {
// Add additional packages you require here
// No need to add RnnPackage and MainReactPackage
return Arrays.asList(
- new MapsPackage()
+ new MapsPackage(),
+ new ReactViroPackage(ReactViroPackage.ViroPlatform.GVR)
);
}
diff --git a/mobile/android/build.gradle b/mobile/android/build.gradle
index be34f35..7928a91 100644
--- a/mobile/android/build.gradle
+++ b/mobile/android/build.gradle
@@ -23,13 +23,3 @@ allprojects {
}
}
}
-
-ext {
- compileSdkVersion = 27
- targetSdkVersion = 27
- minSdkVersion = 24
- buildToolsVersion = "27.0.3"
- supportLibVersion = "25.3.1"
- googlePlayServicesVersion = "11.8.0"
- androidMapsUtilsVersion = "0.5+"
-}
diff --git a/mobile/android/keystores/debug.keystore b/mobile/android/keystores/debug.keystore
new file mode 100644
index 0000000..53a3caa
Binary files /dev/null and b/mobile/android/keystores/debug.keystore differ
diff --git a/mobile/android/settings.gradle b/mobile/android/settings.gradle
index 22c63ee..180c0aa 100644
--- a/mobile/android/settings.gradle
+++ b/mobile/android/settings.gradle
@@ -5,3 +5,8 @@ include ':react-native-navigation'
project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/android/app/')
include ':react-native-maps'
project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/lib/android')
+include ':react_viro', ':arcore_client', ':gvr_common', ':viro_renderer'
+project(':arcore_client').projectDir = new File('../node_modules/react-viro/android/arcore_client')
+project(':gvr_common').projectDir = new File('../node_modules/react-viro/android/gvr_common')
+project(':viro_renderer').projectDir = new File('../node_modules/react-viro/android/viro_renderer')
+project(':react_viro').projectDir = new File('../node_modules/react-viro/android/react_viro')
\ No newline at end of file
diff --git a/mobile/ios/DeightonAR.xcodeproj/project.pbxproj b/mobile/ios/DeightonAR.xcodeproj/project.pbxproj
index 2826ce4..eb8c74e 100644
--- a/mobile/ios/DeightonAR.xcodeproj/project.pbxproj
+++ b/mobile/ios/DeightonAR.xcodeproj/project.pbxproj
@@ -321,6 +321,7 @@
"-lc++",
"$(inherited)",
);
+ PRODUCT_BUNDLE_IDENTIFIER = "com.us.kss.deighton-ar";
PRODUCT_NAME = DeightonAR;
VERSIONING_SYSTEM = "apple-generic";
};
@@ -347,6 +348,7 @@
"-lc++",
"$(inherited)",
);
+ PRODUCT_BUNDLE_IDENTIFIER = "com.us.kss.deighton-ar";
PRODUCT_NAME = DeightonAR;
VERSIONING_SYSTEM = "apple-generic";
};
diff --git a/mobile/ios/DeightonAR/Info.plist b/mobile/ios/DeightonAR/Info.plist
index a9c25ab..b60520a 100644
--- a/mobile/ios/DeightonAR/Info.plist
+++ b/mobile/ios/DeightonAR/Info.plist
@@ -9,7 +9,7 @@
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
- com.us.kss.$(PRODUCT_NAME:rfc1034identifier)
+ $(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
@@ -17,11 +17,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.0
+ 1.0.0
CFBundleSignature
????
CFBundleVersion
- 1
+ 20180328.0
LSRequiresIPhoneOS
NSAppTransportSecurity
@@ -35,10 +35,10 @@
- NSLocationWhenInUseUsageDescription
-
NSCameraUsageDescription
$(PRODUCT_NAME) camera use
+ NSLocationWhenInUseUsageDescription
+
NSPhotoLibraryUsageDescription
$(PRODUCT_NAME) photo use
UILaunchStoryboardName
diff --git a/mobile/package.json b/mobile/package.json
index 127e8a3..305def1 100644
--- a/mobile/package.json
+++ b/mobile/package.json
@@ -21,9 +21,10 @@
},
"dependencies": {
"autobind-decorator": "^2.1.0",
+ "create-react-class": "^15.6.3",
"eventemitter3": "^3.0.1",
"npm": "^5.7.1",
- "react": "16.2.0",
+ "react": "^16.2.0",
"react-form-binder": "^1.2.0",
"react-native": "^0.51.1",
"react-native-google-maps": "^1.0.0",
diff --git a/mobile/src/API.js b/mobile/src/API.js
index ee71cd9..0212c6d 100644
--- a/mobile/src/API.js
+++ b/mobile/src/API.js
@@ -5,7 +5,7 @@ import { AsyncStorage } from 'react-native'
const authTokenName = 'AuthToken'
let baseURL = null
let apiPath = null
-
+//
if (__DEV__) {
const localIPAddr = process.env.LOCAL_IP_ADDR
diff --git a/mobile/src/app.js b/mobile/src/app.js
index d4df46f..3fc2be4 100644
--- a/mobile/src/app.js
+++ b/mobile/src/app.js
@@ -2,6 +2,11 @@ import { Platform } from 'react-native'
import { Navigation } from 'react-native-navigation'
import { registerScreens } from './screens'
+// See https://github.com/facebook/react-native/issues/12981
+console.ignoredYellowBox = [
+ 'Setting a timer'
+]
+
registerScreens()
Navigation.startSingleScreenApp({
diff --git a/mobile/src/screens/Home.js b/mobile/src/screens/Home.js
index eb8c80d..c8a2937 100644
--- a/mobile/src/screens/Home.js
+++ b/mobile/src/screens/Home.js
@@ -100,7 +100,9 @@ export class Home extends React.Component {
return (
+ keyboardVerticalOffset={Platform.select({ios: 0, android: -220})}>
diff --git a/mobile/src/screens/Viewer.js b/mobile/src/screens/Viewer.js
index 6d814b0..4b63d4d 100644
--- a/mobile/src/screens/Viewer.js
+++ b/mobile/src/screens/Viewer.js
@@ -1,6 +1,40 @@
import React from 'react'
-import { StyleSheet, View, TouchableOpacity, Image } from 'react-native'
-import backImage from './images/back.png'
+import { StyleSheet, View } from 'react-native'
+import {
+ ViroARSceneNavigator, ViroARScene, ViroARPlane, ViroBox, ViroText, ViroAmbientLight
+} from 'react-viro'
+import createReactClass from 'create-react-class'
+
+const styles = {
+ helloWorldTextStyle: {
+ fontFamily: 'Arial',
+ fontSize: 30,
+ color: '#ffffff',
+ textAlignVertical: 'center',
+ textAlign: 'center',
+ },
+}
+
+const WorkItemSceneAR = createReactClass({
+ getInitialState: function() {
+ return {
+ text : "Initializing AR..."
+ }
+ },
+
+ render: function() {
+ return (
+ {this.setState({text : "Hello World!"})}}>
+
+
+
+
+
+
+ )
+ }
+})
export class Viewer extends React.Component {
static navigatorStyle = {
@@ -9,35 +43,25 @@ export class Viewer extends React.Component {
static styles = StyleSheet.create({
container: {
- height: '100%',
- width: '100%',
- justifyContent: 'flex-start',
- backgroundColor: '#AAAAAA',
- },
- button: {
- marginTop: 40,
- marginLeft: 20,
- width: 45,
- height: 45,
- }
+ flex: 1,
+ },
+ arScene: {
+ flex: 1,
+ },
})
constructor(props) {
super(props)
- this._handlePressButton = this._handlePressButton.bind(this)
- }
-
- _handlePressButton() {
- this.props.navigator.pop()
- }
+ }
render() {
return (
-
-
-
-
+
+
- );
+ )
}
}