Skip to content
This repository has been archived by the owner on Aug 6, 2019. It is now read-only.

Commit

Permalink
Working Prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-ebner-exxeta committed Aug 29, 2017
1 parent 0d6d6c9 commit 8061dc9
Show file tree
Hide file tree
Showing 44 changed files with 1,399 additions and 0 deletions.
68 changes: 68 additions & 0 deletions AR_to_IoT_Proto/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
apply plugin: 'com.android.model.application'

model {
android {
compileSdkVersion = 25
buildToolsVersion = "25"
testOptions.unitTests { returnDefaultValues = true }
defaultConfig.with {
applicationId = "org.artoolkit.ar.samples.AR_to_IoT_Proto"
minSdkVersion.apiLevel = 17
targetSdkVersion.apiLevel = 22
versionCode = 1
//Integer type incremented by 1 for every release, major or minor, to Google store
versionName = "1.0" //Real fully qualified major and minor release description

buildConfigFields.with {
//Defines fields in the generated Java BuildConfig class, in this case, for
create() { //default config, that can be accessed by Java code
type = "int" //e.g. "if (1 == BuildConfig.VALUE) { /*do something*/}".
name = "VALUE"
//See: [app or lib]/build/generated/source/buildConfig/[package path]/
value = "1" // BuildConfig.java
}
}
}
}

android.buildTypes {
release {
minifyEnabled = false
proguardFiles.add(file('proguard-rules.pro'))
}
}

android.productFlavors {
}

android.sources {
main {
jni {
source {
srcDirs = ['src/main/nop']
}
}
}
main {
jniLibs {
source {
srcDirs = ['src/main/libs']
}
}
}
}
}

dependencies {
//compile 'com.android.support:support-v4:23.0.1'
//compile 'com.android.support:appcompat-v7:23.0.1' //Only required when the target device API level is greater than
compile project(':aRBaseLib')

// Required -- JUnit 4 framework
// Optional -- Mockito framework
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'org.json:json:20140107'
}

//the compile and target of the app being deployed to the device
48 changes: 48 additions & 0 deletions AR_to_IoT_Proto/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.artoolkit.ar.samples.AR_to_IoT_Proto"
android:versionCode="50000"
android:versionName="5.0">

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-feature android:name="android.hardware.camera.any" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-feature android:glEsVersion="0x00010100" />

<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />

<application
android:name="org.ariot.app.augmentedreality.ARApplication"
android:allowBackup="true"
android:icon="@drawable/icon"
android:label="@string/app_name">
<activity
android:name="org.ariot.app.augmentedreality.ARMainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="org.artoolkit.ar.base.camera.CameraPreferencesActivity" />
<activity android:name="org.ariot.app.visualisation.SettingsActivity"></activity>
</application>

</manifest>
Binary file added AR_to_IoT_Proto/src/main/assets/Data/camera_para.dat
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*
* ARSimpleApplication.java
* ARToolKit5
*
* Disclaimer: IMPORTANT: This Daqri software is supplied to you by Daqri
* LLC ("Daqri") in consideration of your agreement to the following
* terms, and your use, installation, modification or redistribution of
* this Daqri software constitutes acceptance of these terms. If you do
* not agree with these terms, please do not use, install, modify or
* redistribute this Daqri software.
*
* In consideration of your agreement to abide by the following terms, and
* subject to these terms, Daqri grants you a personal, non-exclusive
* license, under Daqri's copyrights in this original Daqri software (the
* "Daqri Software"), to use, reproduce, modify and redistribute the Daqri
* Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the Daqri Software in its entirety and
* without modifications, you must retain this notice and the following
* text and disclaimers in all such redistributions of the Daqri Software.
* Neither the name, trademarks, service marks or logos of Daqri LLC may
* be used to endorse or promote products derived from the Daqri Software
* without specific prior written permission from Daqri. Except as
* expressly stated in this notice, no other rights or licenses, express or
* implied, are granted by Daqri herein, including but not limited to any
* patent rights that may be infringed by your derivative works or by other
* works in which the Daqri Software may be incorporated.
*
* The Daqri Software is provided by Daqri on an "AS IS" basis. DAQRI
* MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
* THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE, REGARDING THE DAQRI SOFTWARE OR ITS USE AND
* OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
*
* IN NO EVENT SHALL DAQRI BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
* MODIFICATION AND/OR DISTRIBUTION OF THE DAQRI SOFTWARE, HOWEVER CAUSED
* AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
* STRICT LIABILITY OR OTHERWISE, EVEN IF DAQRI HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Copyright 2015 Daqri, LLC.
* Copyright 2011-2015 ARToolworks, Inc.
*
* Author(s): Philip Lamb
*
*/

//
// This class provides a subclass of Application to enable app-wide behavior.
//

package org.ariot.app.augmentedreality;

import android.app.Application;
import android.util.Log;

import org.ariot.app.visualisation.GlobalVar;
import org.artoolkit.ar.base.assets.AssetHelper;

public class ARApplication extends Application {

private static Application sInstance;

// Anywhere in the application where an instance is required, this method
// can be used to retrieve it.
public static Application getInstance() {
return sInstance;
}

@Override
public void onCreate() {
super.onCreate();
sInstance = this;
((ARApplication) sInstance).initializeInstance();
}

// Here we do one-off initialisation which should apply to all activities
// in the application.
protected void initializeInstance() {

// Unpack assets to cache directory so native library can read them.
// N.B.: If contents of assets folder changes, be sure to increment the
// versionCode integer in the AndroidManifest.xml file.
AssetHelper assetHelper = new AssetHelper(getAssets());
assetHelper.cacheAssetFolder(getInstance(), "Data");
GlobalVar.cacheFolder = getCacheDir().getPath();
Log.d("Checkpoint3","Cache Folder: "+GlobalVar.cacheFolder );
}
}
Loading

0 comments on commit 8061dc9

Please sign in to comment.