diff --git a/.gitignore b/.gitignore
index bcddc15..d4fad2e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,7 @@
-.DS*
\ No newline at end of file
+.DS*
+/wiigee-lib/nbproject/private/
+/wiigee-plugin-android/nbproject/private/
+/wiigee-lib/build/
+/wiigee-lib/dist/
+/wiigee-plugin-android/build/
+/wiigee-plugin-android/dist/
\ No newline at end of file
diff --git a/wiigee-gui-android/.gitignore b/wiigee-gui-android/.gitignore
new file mode 100644
index 0000000..9c4de58
--- /dev/null
+++ b/wiigee-gui-android/.gitignore
@@ -0,0 +1,7 @@
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
diff --git a/wiigee-gui-android/GesturePoc.iml b/wiigee-gui-android/GesturePoc.iml
new file mode 100644
index 0000000..046f82e
--- /dev/null
+++ b/wiigee-gui-android/GesturePoc.iml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wiigee-gui-android/README b/wiigee-gui-android/README
new file mode 100644
index 0000000..668c90b
--- /dev/null
+++ b/wiigee-gui-android/README
@@ -0,0 +1,3 @@
+This Android application uses the Gradle build system. This is not yet integrated with the Ant-based build system that the rest of wiigee uses.
+
+The Android GUI relies on having the most recent wiigee-lib and wiigee-plugin-android JARs in the app/libs directory. If you'd like to enhance these libraries and see them updated in the Android UI project, copy the JARs to app/libs after running "ant jar" in wiigee-lib and wiigee-plugin-android.
diff --git a/wiigee-gui-android/README~ b/wiigee-gui-android/README~
new file mode 100644
index 0000000..e69de29
diff --git a/wiigee-gui-android/app/.gitignore b/wiigee-gui-android/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/wiigee-gui-android/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/wiigee-gui-android/app/app.iml b/wiigee-gui-android/app/app.iml
new file mode 100644
index 0000000..8f460e0
--- /dev/null
+++ b/wiigee-gui-android/app/app.iml
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generateDebugAndroidTestSources
+ generateDebugSources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wiigee-gui-android/app/build.gradle b/wiigee-gui-android/app/build.gradle
new file mode 100644
index 0000000..44a712d
--- /dev/null
+++ b/wiigee-gui-android/app/build.gradle
@@ -0,0 +1,25 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 23
+ buildToolsVersion "22.0.1"
+
+ defaultConfig {
+ applicationId "org.wiigee.android"
+ minSdkVersion 15
+ targetSdkVersion 23
+ versionCode 1
+ versionName "1.0"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+ compile 'com.android.support:appcompat-v7:23.0.0'
+}
diff --git a/wiigee-gui-android/app/libs/wiigee-lib.jar b/wiigee-gui-android/app/libs/wiigee-lib.jar
new file mode 100644
index 0000000..b7454cb
Binary files /dev/null and b/wiigee-gui-android/app/libs/wiigee-lib.jar differ
diff --git a/wiigee-gui-android/app/libs/wiigee-plugin-android.jar b/wiigee-gui-android/app/libs/wiigee-plugin-android.jar
new file mode 100644
index 0000000..cc41f01
Binary files /dev/null and b/wiigee-gui-android/app/libs/wiigee-plugin-android.jar differ
diff --git a/wiigee-gui-android/app/proguard-rules.pro b/wiigee-gui-android/app/proguard-rules.pro
new file mode 100644
index 0000000..ff7412e
--- /dev/null
+++ b/wiigee-gui-android/app/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /home/katie/Android/Sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/wiigee-gui-android/app/src/main/AndroidManifest.xml b/wiigee-gui-android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..70f02bd
--- /dev/null
+++ b/wiigee-gui-android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wiigee-gui-android/app/src/main/java/org/wiigee/android/MainActivity.java b/wiigee-gui-android/app/src/main/java/org/wiigee/android/MainActivity.java
new file mode 100644
index 0000000..f42e8bd
--- /dev/null
+++ b/wiigee-gui-android/app/src/main/java/org/wiigee/android/MainActivity.java
@@ -0,0 +1,85 @@
+package org.wiigee.android;
+
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+import org.wiigee.control.AndroidWiigee;
+import org.wiigee.event.GestureEvent;
+import org.wiigee.event.GestureListener;
+import org.wiigee.filter.HighPassFilter;
+
+import java.io.File;
+import java.io.FilenameFilter;
+
+public class MainActivity extends AppCompatActivity {
+
+ private AndroidWiigee androidWiigee;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ androidWiigee = new AndroidWiigee(this);
+ androidWiigee.setTrainButton((Button) findViewById(R.id.buttonTrain));
+ androidWiigee.setRecognitionButton((Button) findViewById(R.id.buttonRecognize));
+ androidWiigee.setCloseGestureButton((Button) findViewById(R.id.buttonClose));
+
+ androidWiigee.addGestureListener(new GestureListener() {
+ @Override
+ public void gestureReceived(GestureEvent gestureEvent) {
+ Toast.makeText(MainActivity.this, "Gesture Detected! " + gestureEvent.getId()
+ + ", prob: " + gestureEvent.getProbability(), Toast.LENGTH_SHORT).show();
+ }
+ });
+
+ findViewById(R.id.buttonSave).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ int modelNumber = Integer.parseInt((
+ (EditText) findViewById(R.id.editTextModelNumber)).getText().toString());
+ String modelName = ((EditText) findViewById(R.id.editTextFileName))
+ .getText().toString();
+ String modelFilePath = getExternalFilesDir(null).getAbsolutePath() + "/" + modelName;
+ androidWiigee.getDevice().saveGesture(modelNumber, modelFilePath);
+ Toast.makeText(MainActivity.this, "Gesture saved to " + modelName,
+ Toast.LENGTH_SHORT).show();
+ }
+ });
+
+ findViewById(R.id.buttonLoad).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
+ final String[] files = getExternalFilesDir(null).list(new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String filename) {
+ return filename.endsWith(".txt");
+ }
+ });
+ builder.setTitle("Pick a Model").setItems(files,
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ String modelFilePath = files[which];
+ // Wiigee appends .txt to model file paths, so strip it out here.
+ modelFilePath = getExternalFilesDir(null) + "/" + modelFilePath.substring(0, modelFilePath.length() - 4);
+ androidWiigee.getDevice().loadGesture(modelFilePath);
+ Toast.makeText(MainActivity.this,
+ "Gesture loaded: " + modelFilePath,
+ Toast.LENGTH_SHORT).show();
+ dialog.dismiss();
+ }
+ });
+ builder.create().show();
+ }
+ });
+ }
+
+ ;
+}
diff --git a/wiigee-gui-android/app/src/main/res/layout/activity_main.xml b/wiigee-gui-android/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..3b7ad36
--- /dev/null
+++ b/wiigee-gui-android/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wiigee-gui-android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/wiigee-gui-android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..cde69bc
Binary files /dev/null and b/wiigee-gui-android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/wiigee-gui-android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/wiigee-gui-android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c133a0c
Binary files /dev/null and b/wiigee-gui-android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/wiigee-gui-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/wiigee-gui-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..bfa42f0
Binary files /dev/null and b/wiigee-gui-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/wiigee-gui-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/wiigee-gui-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..324e72c
Binary files /dev/null and b/wiigee-gui-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/wiigee-gui-android/app/src/main/res/values-w820dp/dimens.xml b/wiigee-gui-android/app/src/main/res/values-w820dp/dimens.xml
new file mode 100644
index 0000000..63fc816
--- /dev/null
+++ b/wiigee-gui-android/app/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 64dp
+
diff --git a/wiigee-gui-android/app/src/main/res/values/dimens.xml b/wiigee-gui-android/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..47c8224
--- /dev/null
+++ b/wiigee-gui-android/app/src/main/res/values/dimens.xml
@@ -0,0 +1,5 @@
+
+
+ 16dp
+ 16dp
+
diff --git a/wiigee-gui-android/app/src/main/res/values/strings.xml b/wiigee-gui-android/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..cdf0a03
--- /dev/null
+++ b/wiigee-gui-android/app/src/main/res/values/strings.xml
@@ -0,0 +1,6 @@
+
+ GesturePoc
+
+ Hello world!
+ Settings
+
diff --git a/wiigee-gui-android/app/src/main/res/values/styles.xml b/wiigee-gui-android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..766ab99
--- /dev/null
+++ b/wiigee-gui-android/app/src/main/res/values/styles.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/wiigee-gui-android/build.gradle b/wiigee-gui-android/build.gradle
new file mode 100644
index 0000000..1b7886d
--- /dev/null
+++ b/wiigee-gui-android/build.gradle
@@ -0,0 +1,19 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:1.3.0'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
diff --git a/wiigee-gui-android/gradle.properties b/wiigee-gui-android/gradle.properties
new file mode 100644
index 0000000..1d3591c
--- /dev/null
+++ b/wiigee-gui-android/gradle.properties
@@ -0,0 +1,18 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
\ No newline at end of file
diff --git a/wiigee-gui-android/gradle/wrapper/gradle-wrapper.jar b/wiigee-gui-android/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..8c0fb64
Binary files /dev/null and b/wiigee-gui-android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/wiigee-gui-android/gradle/wrapper/gradle-wrapper.properties b/wiigee-gui-android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..0fea0b6
--- /dev/null
+++ b/wiigee-gui-android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Tue Sep 22 07:29:53 EDT 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
diff --git a/wiigee-gui-android/gradlew b/wiigee-gui-android/gradlew
new file mode 100755
index 0000000..91a7e26
--- /dev/null
+++ b/wiigee-gui-android/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/wiigee-gui-android/gradlew.bat b/wiigee-gui-android/gradlew.bat
new file mode 100644
index 0000000..aec9973
--- /dev/null
+++ b/wiigee-gui-android/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/wiigee-gui-android/settings.gradle b/wiigee-gui-android/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/wiigee-gui-android/settings.gradle
@@ -0,0 +1 @@
+include ':app'
diff --git a/wiigee-gui/build.xml b/wiigee-gui-swing/build.xml
similarity index 100%
rename from wiigee-gui/build.xml
rename to wiigee-gui-swing/build.xml
diff --git a/wiigee-gui/lib/nblibraries.properties b/wiigee-gui-swing/lib/nblibraries.properties
similarity index 100%
rename from wiigee-gui/lib/nblibraries.properties
rename to wiigee-gui-swing/lib/nblibraries.properties
diff --git a/wiigee-gui/manifest.mf b/wiigee-gui-swing/manifest.mf
similarity index 100%
rename from wiigee-gui/manifest.mf
rename to wiigee-gui-swing/manifest.mf
diff --git a/wiigee-gui/nbproject/build-impl.xml b/wiigee-gui-swing/nbproject/build-impl.xml
similarity index 100%
rename from wiigee-gui/nbproject/build-impl.xml
rename to wiigee-gui-swing/nbproject/build-impl.xml
diff --git a/wiigee-gui/nbproject/genfiles.properties b/wiigee-gui-swing/nbproject/genfiles.properties
similarity index 100%
rename from wiigee-gui/nbproject/genfiles.properties
rename to wiigee-gui-swing/nbproject/genfiles.properties
diff --git a/wiigee-gui/nbproject/project.properties b/wiigee-gui-swing/nbproject/project.properties
similarity index 100%
rename from wiigee-gui/nbproject/project.properties
rename to wiigee-gui-swing/nbproject/project.properties
diff --git a/wiigee-gui/nbproject/project.xml b/wiigee-gui-swing/nbproject/project.xml
similarity index 100%
rename from wiigee-gui/nbproject/project.xml
rename to wiigee-gui-swing/nbproject/project.xml
diff --git a/wiigee-gui/src/img/WiiMote_2_pressed.png b/wiigee-gui-swing/src/img/WiiMote_2_pressed.png
similarity index 100%
rename from wiigee-gui/src/img/WiiMote_2_pressed.png
rename to wiigee-gui-swing/src/img/WiiMote_2_pressed.png
diff --git a/wiigee-gui/src/img/WiiMote_A_pressed.png b/wiigee-gui-swing/src/img/WiiMote_A_pressed.png
similarity index 100%
rename from wiigee-gui/src/img/WiiMote_A_pressed.png
rename to wiigee-gui-swing/src/img/WiiMote_A_pressed.png
diff --git a/wiigee-gui/src/img/WiiMote_B_pressed.png b/wiigee-gui-swing/src/img/WiiMote_B_pressed.png
similarity index 100%
rename from wiigee-gui/src/img/WiiMote_B_pressed.png
rename to wiigee-gui-swing/src/img/WiiMote_B_pressed.png
diff --git a/wiigee-gui/src/img/WiiMote_HOME_pressed.png b/wiigee-gui-swing/src/img/WiiMote_HOME_pressed.png
similarity index 100%
rename from wiigee-gui/src/img/WiiMote_HOME_pressed.png
rename to wiigee-gui-swing/src/img/WiiMote_HOME_pressed.png
diff --git a/wiigee-gui/src/img/WiiMote_released.gif b/wiigee-gui-swing/src/img/WiiMote_released.gif
similarity index 100%
rename from wiigee-gui/src/img/WiiMote_released.gif
rename to wiigee-gui-swing/src/img/WiiMote_released.gif
diff --git a/wiigee-gui/src/img/WiiMote_released.png b/wiigee-gui-swing/src/img/WiiMote_released.png
similarity index 100%
rename from wiigee-gui/src/img/WiiMote_released.png
rename to wiigee-gui-swing/src/img/WiiMote_released.png
diff --git a/wiigee-gui/src/wiigeegui/Frontend.form b/wiigee-gui-swing/src/wiigeegui/Frontend.form
similarity index 100%
rename from wiigee-gui/src/wiigeegui/Frontend.form
rename to wiigee-gui-swing/src/wiigeegui/Frontend.form
diff --git a/wiigee-gui/src/wiigeegui/Frontend.java b/wiigee-gui-swing/src/wiigeegui/Frontend.java
similarity index 100%
rename from wiigee-gui/src/wiigeegui/Frontend.java
rename to wiigee-gui-swing/src/wiigeegui/Frontend.java
diff --git a/wiigee-gui/src/wiigeegui/GraphPanel.java b/wiigee-gui-swing/src/wiigeegui/GraphPanel.java
similarity index 100%
rename from wiigee-gui/src/wiigeegui/GraphPanel.java
rename to wiigee-gui-swing/src/wiigeegui/GraphPanel.java
diff --git a/wiigee-gui/src/wiigeegui/InfraredPanel.java b/wiigee-gui-swing/src/wiigeegui/InfraredPanel.java
similarity index 100%
rename from wiigee-gui/src/wiigeegui/InfraredPanel.java
rename to wiigee-gui-swing/src/wiigeegui/InfraredPanel.java
diff --git a/wiigee-gui/src/wiigeegui/OrientationPanel.java b/wiigee-gui-swing/src/wiigeegui/OrientationPanel.java
similarity index 100%
rename from wiigee-gui/src/wiigeegui/OrientationPanel.java
rename to wiigee-gui-swing/src/wiigeegui/OrientationPanel.java
diff --git a/wiigee-gui/src/wiigeegui/WiimotePanel.java b/wiigee-gui-swing/src/wiigeegui/WiimotePanel.java
similarity index 100%
rename from wiigee-gui/src/wiigeegui/WiimotePanel.java
rename to wiigee-gui-swing/src/wiigeegui/WiimotePanel.java
diff --git a/wiigee-gui/src/wiigeegui/wiigeemain.java b/wiigee-gui-swing/src/wiigeegui/wiigeemain.java
similarity index 100%
rename from wiigee-gui/src/wiigeegui/wiigeemain.java
rename to wiigee-gui-swing/src/wiigeegui/wiigeemain.java
diff --git a/wiigee-lib/nbproject/build-impl.xml b/wiigee-lib/nbproject/build-impl.xml
index 55720ab..f23b98e 100644
--- a/wiigee-lib/nbproject/build-impl.xml
+++ b/wiigee-lib/nbproject/build-impl.xml
@@ -12,18 +12,18 @@ is divided into following sections:
- execution
- debugging
- javadoc
- - junit compilation
- - junit execution
- - junit debugging
+ - test compilation
+ - test execution
+ - test debugging
- applet
- cleanup
-->
-
+
-
+
@@ -42,23 +42,27 @@ is divided into following sections:
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
-
+
-
+
+
+
-
+
@@ -75,20 +79,70 @@ is divided into following sections:
+
-
+
+
+
+
+
+
+
+
+
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -114,6 +168,7 @@ is divided into following sections:
+
@@ -125,6 +180,7 @@ is divided into following sections:
+
@@ -140,12 +196,52 @@ is divided into following sections:
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -172,11 +268,54 @@ is divided into following sections:
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -186,7 +325,7 @@ is divided into following sections:
-
+
@@ -195,11 +334,15 @@ is divided into following sections:
-
+
+
+
+
+
@@ -216,44 +359,390 @@ is divided into following sections:
Must set javac.includes
-
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No tests executed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set JVM to use for profiling in profiler.info.jvm
+ Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
+
+
@@ -305,11 +794,13 @@ is divided into following sections:
+
-
-
+
+
+
@@ -326,12 +817,15 @@ is divided into following sections:
+
-
-
+
+
+
+
@@ -344,20 +838,90 @@ is divided into following sections:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -380,12 +944,18 @@ is divided into following sections:
-
+
+
+
+
+
+
+
@@ -418,75 +988,67 @@ is divided into following sections:
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
+
+ java -jar "${dist.jar.resolved}"
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
+
+
- java -cp "${run.classpath.with.dist.jar}" ${main.class}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
-
- java -jar "${dist.jar.resolved}"
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set profile.class
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
@@ -576,7 +1258,7 @@ is divided into following sections:
@@ -589,8 +1271,8 @@ is divided into following sections:
-
-
+
+
@@ -604,10 +1286,10 @@ is divided into following sections:
-
+
Must select some files in the IDE or set javac.includes
-
+
@@ -619,14 +1301,14 @@ is divided into following sections:
-
+
Some tests failed; see details above.
@@ -639,39 +1321,40 @@ is divided into following sections:
Must select some files in the IDE or set test.includes
-
+
Some tests failed; see details above.
-
+
+
+ Must select some files in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+ Some tests failed; see details above.
+
+
-
+
Must select one file in the IDE or set test.class
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Must select one file in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
-
+
+
@@ -708,14 +1391,48 @@ is divided into following sections:
CLEANUP SECTION
===============
-->
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wiigee-lib/nbproject/genfiles.properties b/wiigee-lib/nbproject/genfiles.properties
index 90ae97c..1bde6de 100644
--- a/wiigee-lib/nbproject/genfiles.properties
+++ b/wiigee-lib/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=958a1d3e
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=afb4810b
-nbproject/build-impl.xml.script.CRC32=7668b6e9
-nbproject/build-impl.xml.stylesheet.CRC32=5c621a33@1.26.1.45
+nbproject/build-impl.xml.script.CRC32=f31479d9
+nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
diff --git a/wiigee-lib/src/org/wiigee/util/Log.java b/wiigee-lib/src/org/wiigee/util/Log.java
index 3cb61be..be26878 100644
--- a/wiigee-lib/src/org/wiigee/util/Log.java
+++ b/wiigee-lib/src/org/wiigee/util/Log.java
@@ -1,20 +1,35 @@
package org.wiigee.util;
public class Log {
+
+ public static interface Logger {
+ void write(int level, String message, Object caller);
+ }
public static final int OFF = -1;
public static final int NORMAL = 0;
public static final int DEBUG = 1;
- public static final int PRINT = 0;
- public static final int FILE = 1;
-
public static int level = Log.NORMAL;
- public static int mode = Log.PRINT;
+
+ private static Logger logger = new Logger() {
+ public void write(int level, String message, Object caller) {
+ // console output enabled
+ if(caller!=null) {
+ System.out.println(caller.getClass()+": "+message);
+ } else {
+ System.out.println(message);
+ }
+ }
+ };
public static void setLevel(int n) {
level = n;
}
+
+ public static void setLogger(Logger logger) {
+ Log.logger = logger;
+ }
public static void write(String s) {
write(Log.NORMAL, s, null);
@@ -26,17 +41,7 @@ public static void write(String s, Object o) {
public static void write(int n, String s, Object o) {
if(level>=n) {
- if(mode==Log.PRINT) {
- // console output enabled
- if(o!=null) {
- System.out.println(o.getClass()+": "+s);
- } else {
- System.out.println(s);
- }
- } else if(mode==Log.FILE) {
- // file output enabled
- // TODO
- }
+ logger.write(n, s, o);
}
}
diff --git a/wiigee-plugin-android/build.xml b/wiigee-plugin-android/build.xml
index 7e6c2a8..5fdcd95 100644
--- a/wiigee-plugin-android/build.xml
+++ b/wiigee-plugin-android/build.xml
@@ -51,8 +51,7 @@
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
- -do-jar-with-manifest: JAR building (if you are using a manifest)
- -do-jar-without-manifest: JAR building (if you are not using a manifest)
+ -do-jar: JAR building
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
diff --git a/wiigee-plugin-android/lib/nblibraries.properties b/wiigee-plugin-android/lib/nblibraries.properties
index b191095..52864ae 100644
--- a/wiigee-plugin-android/lib/nblibraries.properties
+++ b/wiigee-plugin-android/lib/nblibraries.properties
@@ -1,3 +1,7 @@
+libs.CopyLibs.classpath=\
+ ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
+libs.CopyLibs.displayName=CopyLibs Task
+libs.CopyLibs.prop-version=2.0
libs.junit.classpath=\
${base}/junit/junit-3.8.2.jar
libs.junit.javadoc=\
@@ -8,5 +12,3 @@ libs.junit_4.javadoc=\
${base}/junit_4/junit-4.5-api.zip
libs.junit_4.src=\
${base}/junit_4/junit-4.5-src.jar
-libs.CopyLibs.classpath=\
- ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
diff --git a/wiigee-plugin-android/nbproject/build-impl.xml b/wiigee-plugin-android/nbproject/build-impl.xml
index 2fee76d..3b0588c 100644
--- a/wiigee-plugin-android/nbproject/build-impl.xml
+++ b/wiigee-plugin-android/nbproject/build-impl.xml
@@ -12,18 +12,18 @@ is divided into following sections:
- execution
- debugging
- javadoc
- - junit compilation
- - junit execution
- - junit debugging
+ - test compilation
+ - test execution
+ - test debugging
- applet
- cleanup
-->
-
+
-
+
@@ -79,8 +79,16 @@ is divided into following sections:
+
-
+
+
+
+
+
+
+
+
@@ -89,58 +97,51 @@ is divided into following sections:
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
@@ -167,6 +168,7 @@ is divided into following sections:
+
@@ -196,11 +198,50 @@ is divided into following sections:
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -254,6 +295,7 @@ is divided into following sections:
+
@@ -293,6 +335,7 @@ is divided into following sections:
+
@@ -316,45 +359,390 @@ is divided into following sections:
Must set javac.includes
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No tests executed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set JVM to use for profiling in profiler.info.jvm
+ Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
+
+
@@ -412,6 +800,7 @@ is divided into following sections:
+
@@ -428,6 +817,7 @@ is divided into following sections:
+
@@ -435,6 +825,7 @@ is divided into following sections:
+
@@ -449,6 +840,7 @@ is divided into following sections:
+
@@ -460,12 +852,15 @@ is divided into following sections:
+
+
+
-
-
+
+
@@ -477,7 +872,7 @@ is divided into following sections:
-
+
@@ -505,7 +900,7 @@ is divided into following sections:
-
+
-
-
+
+
+
-
-
+
+
+
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
-
-
-
-
-
-
- java -cp "${run.classpath.with.dist.jar}" ${main.class}
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
- java -jar "${dist.jar.resolved}"
+ java -jar "${dist.jar.resolved}"
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
+
+
+
- java -jar "${dist.jar.resolved}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set profile.class
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
@@ -740,7 +1258,7 @@ is divided into following sections:
@@ -753,7 +1271,7 @@ is divided into following sections:
-
+
@@ -768,7 +1286,7 @@ is divided into following sections:
-
+
Must select some files in the IDE or set javac.includes
@@ -783,14 +1301,14 @@ is divided into following sections:
-
+
Some tests failed; see details above.
@@ -803,39 +1321,40 @@ is divided into following sections:
Must select some files in the IDE or set test.includes
-
+
Some tests failed; see details above.
+
+ Must select some files in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+ Some tests failed; see details above.
+
+
-
+
Must select one file in the IDE or set test.class
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Must select one file in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
@@ -900,9 +1419,12 @@ is divided into following sections:
-
-
-
+
+
+
+
+
+
diff --git a/wiigee-plugin-android/nbproject/genfiles.properties b/wiigee-plugin-android/nbproject/genfiles.properties
index e1f5e2e..23a135b 100644
--- a/wiigee-plugin-android/nbproject/genfiles.properties
+++ b/wiigee-plugin-android/nbproject/genfiles.properties
@@ -1,8 +1,8 @@
build.xml.data.CRC32=3e9c3fb4
-build.xml.script.CRC32=d5887438
-build.xml.stylesheet.CRC32=28e38971@1.38.1.45
+build.xml.script.CRC32=f0f30010
+build.xml.stylesheet.CRC32=8064a381@1.75.2.48
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=3e9c3fb4
-nbproject/build-impl.xml.script.CRC32=e9a3f2d7
-nbproject/build-impl.xml.stylesheet.CRC32=f33e10ff@1.38.2.45
+nbproject/build-impl.xml.script.CRC32=5c2cbfc0
+nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
diff --git a/wiigee-plugin-android/src/org/wiigee/control/AndroidWiigee.java b/wiigee-plugin-android/src/org/wiigee/control/AndroidWiigee.java
index 067ea7b..417f77f 100644
--- a/wiigee-plugin-android/src/org/wiigee/control/AndroidWiigee.java
+++ b/wiigee-plugin-android/src/org/wiigee/control/AndroidWiigee.java
@@ -24,10 +24,15 @@
package org.wiigee.control;
import android.content.Context;
+import android.widget.Button;
+
import org.wiigee.device.AndroidDevice;
import org.wiigee.event.GestureListener;
import org.wiigee.filter.Filter;
import org.wiigee.util.Log;
+import org.wiigee.util.AndroidLogger;
+
+import java.io.IOException;
/**
* This is for using wiigee on Android Smartphones. This port has been
@@ -52,8 +57,14 @@ public class AndroidWiigee extends Wiigee {
public AndroidWiigee(Context context) {
super();
+ Log.setLogger(new AndroidLogger());
Log.write("This is wiigee-plugin-android (Andgee) version "+pluginversion+" ("+pluginreleasedate+")");
device = new AndroidDevice(context);
+ try {
+ device.setAccelerationEnabled(true);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
}
public void addGestureListener(GestureListener listener) {
@@ -69,14 +80,21 @@ public AndroidDevice getDevice() {
return device;
}
-
/**
- * Sets the Trainbutton for all wiimotes;
+ * Sets the Train button.
*
- * @param b Button encoding, see static Wiimote values
+ * @param button Android Button view
*/
- public void setTrainButton(int b) {
- device.setTrainButton(b);
+ public void setTrainButton(Button button) {
+ device.setTrainButton(button);
+ }
+
+ public void setRecognitionButton(Button button) {
+ device.setRecognitionButton(button);
+ }
+
+ public void setCloseGestureButton(Button button) {
+ device.setCloseGestureButton(button);
}
/**
diff --git a/wiigee-plugin-android/src/org/wiigee/device/AndroidDevice.java b/wiigee-plugin-android/src/org/wiigee/device/AndroidDevice.java
index 77378d0..3e797dc 100644
--- a/wiigee-plugin-android/src/org/wiigee/device/AndroidDevice.java
+++ b/wiigee-plugin-android/src/org/wiigee/device/AndroidDevice.java
@@ -29,6 +29,9 @@
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.Button;
/**
* Device representation for Android Mobile Phones, like HTC Magic. Since
@@ -100,4 +103,49 @@ public void onAccuracyChanged(Sensor arg0, int arg1) {
// Nothing to do.
}
+ @Override
+ public void setTrainButton(int b) {
+ throw new UnsupportedOperationException("Please call setTrainButton(Button b)");
+ }
+
+ public void setTrainButton(final Button button) {
+ super.setTrainButton(button.getId());
+ attachEventListeners(button);
+ }
+
+ @Override
+ public void setRecognitionButton(int b) {
+ throw new UnsupportedOperationException("Please call setTrainButton(Button b)");
+ }
+
+ public void setRecognitionButton(Button button) {
+ super.setRecognitionButton(button.getId());
+ attachEventListeners(button);
+ }
+
+ @Override
+ public void setCloseGestureButton(int b) {
+ throw new UnsupportedOperationException("Please call setTrainButton(Button b)");
+ }
+
+ public void setCloseGestureButton(Button button) {
+ super.setCloseGestureButton(button.getId());
+ attachEventListeners(button);
+ }
+
+ private void attachEventListeners(final Button button) {
+ button.setOnTouchListener(new View.OnTouchListener() {
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ if (event.getAction() == MotionEvent.ACTION_DOWN) {
+ fireButtonPressedEvent(button.getId());
+ return true;
+ } else if (event.getAction() == MotionEvent.ACTION_UP) {
+ fireButtonReleasedEvent(button.getId());
+ return true;
+ }
+ return false;
+ };
+ });
+ }
}
diff --git a/wiigee-plugin-android/src/org/wiigee/util/AndroidLogger.java b/wiigee-plugin-android/src/org/wiigee/util/AndroidLogger.java
new file mode 100644
index 0000000..1a03f06
--- /dev/null
+++ b/wiigee-plugin-android/src/org/wiigee/util/AndroidLogger.java
@@ -0,0 +1,18 @@
+package org.wiigee.util;
+
+public class AndroidLogger implements Log.Logger {
+
+ private static final String TAG = AndroidLogger.class.getCanonicalName();
+
+ public void write(int level, String message, Object caller) {
+ switch(level){
+ case 0:
+ android.util.Log.i(TAG, message);
+ break;
+ case 1:
+ android.util.Log.d(TAG, message);
+ break;
+ }
+ }
+
+}