summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-14 23:17:35 +0100
committerSven Gothel <[email protected]>2012-03-14 23:17:35 +0100
commita40e22a58e0c71a95f11b7c7e83247fbd4a4d94f (patch)
tree5310a3b2863b53a0d514e176bc157030c9d5e737 /src/test/com
parentf814983eea2ceaca149d3c425356512f5f095d37 (diff)
Android Tests: Using JogAmp's ActivityLauncher (gluegen commit: 0cfc7847c58b51c9a26b50d905b592d1fc4c8578)
- Remove jogl.android-launcher.apk in favor of generic jogamp.android-launcher.apk - All Android test code resides in jogl.test.apk (initial launcher and delegated 'real' one)
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/android/LauncherUtil.java320
-rw-r--r--src/test/com/jogamp/opengl/test/android/NEWTElektronActivityLauncher.java45
-rw-r--r--src/test/com/jogamp/opengl/test/android/NEWTGearsES1ActivityLauncher.java44
-rw-r--r--src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java72
-rw-r--r--src/test/com/jogamp/opengl/test/android/NEWTGearsES2TransActivityLauncher.java49
-rw-r--r--src/test/com/jogamp/opengl/test/android/NEWTGraphUI1pActivityLauncher.java44
-rw-r--r--src/test/com/jogamp/opengl/test/android/NEWTGraphUI2pActivityLauncher.java44
-rw-r--r--src/test/com/jogamp/opengl/test/android/NEWTRedSquareES1ActivityLauncher.java44
-rw-r--r--src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2ActivityLauncher.java21
9 files changed, 683 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/android/LauncherUtil.java b/src/test/com/jogamp/opengl/test/android/LauncherUtil.java
new file mode 100644
index 000000000..f1f36589d
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/LauncherUtil.java
@@ -0,0 +1,320 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+package com.jogamp.opengl.test.android;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.util.Log;
+
+/**
+ * Helper class to parse Uri's and programmatically add package names and properties to create an Uri or Intend.
+ * <p>
+ * The order of the Uri segments (any arguments) is preserved.
+ * </p>
+ */
+public class LauncherUtil {
+
+ /** Default launch mode. */
+ public static final String LAUNCH_ACTIVITY_NORMAL = "org.jogamp.launcher.action.LAUNCH_ACTIVITY_NORMAL";
+
+ /** Transparent launch mode. Note: This seems to be required to achieve translucency, since setTheme(..) doesn't work. */
+ public static final String LAUNCH_ACTIVITY_TRANSPARENT = "org.jogamp.launcher.action.LAUNCH_ACTIVITY_TRANSPARENT";
+
+ /** FIXME: TODO */
+ public static final String LAUNCH_MAIN = "org.jogamp.launcher.action.LAUNCH_MAIN";
+
+ /** FIXME: TODO */
+ public static final String LAUNCH_JUNIT = "org.jogamp.launcher.action.LAUNCH_JUNIT";
+
+ /** The protocol <code>launch</code> */
+ public static final String SCHEME = "launch";
+
+ /** The host <code>jogamp.org</code> */
+ public static final String HOST = "jogamp.org";
+
+ static final String PKG = "pkg";
+
+ public static abstract class BaseActivityLauncher extends Activity {
+ final OrderedProperties props = new OrderedProperties();
+
+ /**
+ * Returns the default {@link LauncherUtil#LAUNCH_ACTIVITY_NORMAL} action.
+ * <p>
+ * Should be overridden for other action, eg. {@link LauncherUtil#LAUNCH_ACTIVITY_TRANSPARENT}.
+ * </p>
+ */
+ public String getAction() { return LAUNCH_ACTIVITY_NORMAL; }
+
+ /**
+ * Returns the properties, which are being propagated to the target activity.
+ * <p>
+ * Maybe be used to set custom properties.
+ * </p>
+ */
+ public final OrderedProperties getProperties() { return props; }
+
+ /** Custom initialization hook which can be overriden to setup data, e.g. fill the properties retrieved by {@link #getProperties()}. */
+ public void init() { }
+
+ /** Returns true if this launcher activity shall end after starting the downstream activity. Defaults to <code>true</code>, override to change behavior. */
+ public boolean finishAfterDelegate() { return true; }
+
+ /** Must return the downstream Activity class name */
+ public abstract String getActivityName();
+
+ /** Must return a list of required packages, at least one. */
+ public abstract List<String> getPackages();
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ init();
+
+ final DataSet data = new DataSet();
+ data.setActivityName(getActivityName());
+ data.addAllPackages(getPackages());
+ data.addAllProperties(props);
+
+ final Intent intent = LauncherUtil.getIntent(getAction(), data);
+ Log.d(getClass().getSimpleName(), "Launching Activity: "+intent);
+ startActivity (intent);
+
+ if(finishAfterDelegate()) {
+ finish(); // done
+ }
+ }
+ }
+
+ public static class OrderedProperties {
+ HashMap<String, String> map = new HashMap<String, String>();
+ ArrayList<String> keyList = new ArrayList<String>();
+
+ public final void setProperty(String key, String value) {
+ if(key.equals(PKG)) {
+ throw new IllegalArgumentException("Illegal property key, '"+PKG+"' is reserved");
+ }
+ final String oval = map.put(key, value);
+ if(null != oval) {
+ map.put(key, oval); // restore
+ throw new IllegalArgumentException("Property overwriting not allowed: "+key+": "+oval+" -> "+value);
+ }
+ keyList.add(key); // new key
+ }
+
+ public final void addAll(OrderedProperties props) {
+ Iterator<String> argKeys = props.keyList.iterator();
+ while(argKeys.hasNext()) {
+ final String key = argKeys.next();
+ setProperty(key, props.map.get(key));
+ }
+ }
+
+ public final void setSystemProperties() {
+ Iterator<String> argKeys = keyList.iterator();
+ while(argKeys.hasNext()) {
+ final String key = argKeys.next();
+ System.setProperty(key, map.get(key));
+ }
+ }
+
+ public final String getProperty(String key) { return map.get(key); }
+ public final Map<String, String> getProperties() { return map; }
+
+ /** Returns the list of property keys in the order, as they were added. */
+ public final List<String> getPropertyKeys() { return keyList; }
+ }
+
+ public static class DataSet {
+ static final char SLASH = '/';
+ static final char QMARK = '?';
+ static final char AMPER = '&';
+ static final char ASSIG = '=';
+ static final String COLSLASH2 = "://";
+ static final String EMPTY = "";
+
+ String activityName = null;
+ ArrayList<String> packages = new ArrayList<String>();
+ OrderedProperties properties = new OrderedProperties();
+
+ public final void setActivityName(String name) { activityName = name; }
+ public final String getActivityName() { return activityName; }
+
+ public final void addPackage(String p) {
+ packages.add(p);
+ }
+ public final void addAllPackages(List<String> plist) {
+ packages.addAll(plist);
+ }
+ public final List<String> getPackages() { return packages; }
+
+ public final void setProperty(String key, String value) {
+ properties.setProperty(key, value);
+ }
+ public final void addAllProperties(OrderedProperties props) {
+ properties.addAll(props);
+ }
+ public final void setSystemProperties() {
+ properties.setSystemProperties();
+ }
+ public final String getProperty(String key) { return properties.getProperty(key); }
+ public final OrderedProperties getProperties() { return properties; }
+ public final List<String> getPropertyKeys() { return properties.getPropertyKeys(); }
+
+ public final Uri getUri() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(SCHEME).append(COLSLASH2).append(HOST).append(SLASH).append(getActivityName());
+ boolean needsSep = false;
+ if(packages.size()>0) {
+ sb.append(QMARK);
+ for(int i=0; i<packages.size(); i++) {
+ if(needsSep) {
+ sb.append(AMPER);
+ }
+ sb.append(PKG).append(ASSIG).append(packages.get(i));
+ needsSep = true;
+ }
+ }
+ Iterator<String> argKeys = properties.keyList.iterator();
+ while(argKeys.hasNext()) {
+ if(needsSep) {
+ sb.append(AMPER);
+ }
+ final String key = argKeys.next();
+ sb.append(key).append(ASSIG).append(properties.map.get(key));
+ needsSep = true;
+ }
+ return Uri.parse(sb.toString());
+ }
+
+ public static final DataSet create(Uri uri) {
+ if(!uri.getScheme().equals(SCHEME)) {
+ return null;
+ }
+ if(!uri.getHost().equals(HOST)) {
+ return null;
+ }
+ DataSet data = new DataSet();
+ {
+ String an = uri.getPath();
+ if(SLASH == an.charAt(0)) {
+ an = an.substring(1);
+ }
+ if(SLASH == an.charAt(an.length()-1)) {
+ an = an.substring(0, an.length()-1);
+ }
+ data.setActivityName(an);
+ }
+
+ final String q = uri.getQuery();
+ final int q_l = q.length();
+ int q_e = -1;
+ while(q_e < q_l) {
+ int q_b = q_e + 1; // next term
+ q_e = q.indexOf(AMPER, q_b);
+ if(0 == q_e) {
+ // single seperator
+ continue;
+ }
+ if(0 > q_e) {
+ // end
+ q_e = q_l;
+ }
+ // n-part
+ final String part = q.substring(q_b, q_e);
+ final int assignment = part.indexOf(ASSIG);
+ if(0 < assignment) {
+ // assignment
+ final String k = part.substring(0, assignment);
+ final String v = part.substring(assignment+1);
+ if(k.equals(PKG)) {
+ if(v.length()==0) {
+ throw new IllegalArgumentException("Empty package name: part <"+part+">, query <"+q+"> of "+uri);
+ }
+ data.addPackage(v);
+ } else {
+ data.setProperty(k, v);
+ }
+ } else {
+ // property key only
+ if(part.equals(PKG)) {
+ throw new IllegalArgumentException("Empty package name: part <"+part+">, query <"+q+"> of "+uri);
+ }
+ data.setProperty(part, EMPTY);
+ }
+ }
+ data.validate();
+ return data;
+ }
+
+ public final void validate() {
+ if(null == activityName) {
+ throw new RuntimeException("Activity is not NULL");
+ }
+ if(packages.size() == 0) {
+ throw new RuntimeException("Empty package list");
+ }
+ }
+ }
+
+ public final static Intent getIntent(String action, DataSet data) {
+ data.validate();
+ return new Intent(action, data.getUri());
+ }
+
+ public static void main(String[] args) {
+ if(args.length==0) {
+ args = new String[] {
+ SCHEME+"://"+HOST+"/com.jogamp.TestActivity?"+PKG+"=jogamp.pack1&"+PKG+"=javax.pack2&"+PKG+"=com.jogamp.pack3&jogamp.common.debug=true&com.jogamp.test=false",
+ SCHEME+"://"+HOST+"/com.jogamp.TestActivity?"+PKG+"=jogamp.pack1&jogamp.common.debug=true&com.jogamp.test=false",
+ SCHEME+"://"+HOST+"/com.jogamp.TestActivity?"+PKG+"=jogamp.pack1"
+ };
+ }
+ for(int i=0; i<args.length; i++) {
+ String uri_s = args[i];
+ Uri uri0 = Uri.parse(uri_s);
+ DataSet data = DataSet.create(uri0);
+ if(null == data) {
+ System.err.println("Error: NULL JogAmpLauncherUtil: <"+uri_s+"> -> "+uri0+" -> NULL");
+ }
+ Uri uri1 = data.getUri();
+ if(!uri0.equals(uri1)) {
+ System.err.println("Error: Not equal: <"+uri_s+"> -> "+uri0+" -> "+uri1);
+ }
+ }
+ }
+
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTElektronActivityLauncher.java b/src/test/com/jogamp/opengl/test/android/NEWTElektronActivityLauncher.java
new file mode 100644
index 000000000..33e05de8d
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTElektronActivityLauncher.java
@@ -0,0 +1,45 @@
+package com.jogamp.opengl.test.android;
+
+import java.util.Arrays;
+import java.util.List;
+
+import com.jogamp.opengl.test.android.LauncherUtil.OrderedProperties;
+
+public class NEWTElektronActivityLauncher extends LauncherUtil.BaseActivityLauncher {
+
+ static String demo = "com.jogamp.opengl.test.android.NEWTElektronActivity";
+ static String[] pkgs = new String[] { "com.jogamp.opengl.test" };
+
+ @Override
+ public void init() {
+ final OrderedProperties props = getProperties();
+ // props.setProperty("jogamp.debug.JNILibLoader", "true");
+ // props.setProperty("jogamp.debug.NativeLibrary", "true");
+ // properties.setProperty("jogamp.debug.NativeLibrary.Lookup", "true");
+ // properties.setProperty("jogamp.debug.IOUtil", "true");
+ // properties.setProperty("nativewindow.debug", "all");
+ props.setProperty("nativewindow.debug.GraphicsConfiguration", "true");
+ // properties.setProperty("jogl.debug", "all");
+ // properties.setProperty("jogl.debug.GLProfile", "true");
+ props.setProperty("jogl.debug.GLDrawable", "true");
+ props.setProperty("jogl.debug.GLContext", "true");
+ props.setProperty("jogl.debug.GLSLCode", "true");
+ props.setProperty("jogl.debug.CapabilitiesChooser", "true");
+ // properties.setProperty("jogl.debug.GLSLState", "true");
+ // properties.setProperty("jogl.debug.DebugGL", "true");
+ // properties.setProperty("jogl.debug.TraceGL", "true");
+ // properties.setProperty("newt.debug", "all");
+ props.setProperty("newt.debug.Window", "true");
+ // properties.setProperty("newt.debug.Window.MouseEvent", "true");
+ // properties.setProperty("newt.debug.Window.KeyEvent", "true");
+ }
+
+ @Override
+ public String getActivityName() {
+ return demo;
+ }
+ @Override
+ public List<String> getPackages() {
+ return Arrays.asList(pkgs);
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGearsES1ActivityLauncher.java b/src/test/com/jogamp/opengl/test/android/NEWTGearsES1ActivityLauncher.java
new file mode 100644
index 000000000..d0f6263f3
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGearsES1ActivityLauncher.java
@@ -0,0 +1,44 @@
+package com.jogamp.opengl.test.android;
+
+import java.util.Arrays;
+import java.util.List;
+
+import com.jogamp.opengl.test.android.LauncherUtil.OrderedProperties;
+
+public class NEWTGearsES1ActivityLauncher extends LauncherUtil.BaseActivityLauncher {
+ static String demo = "com.jogamp.opengl.test.android.NEWTGearsES1Activity";
+ static String[] pkgs = new String[] { "com.jogamp.opengl.test" };
+
+ @Override
+ public void init() {
+ final OrderedProperties props = getProperties();
+ // props.setProperty("jogamp.debug.JNILibLoader", "true");
+ // props.setProperty("jogamp.debug.NativeLibrary", "true");
+ // properties.setProperty("jogamp.debug.NativeLibrary.Lookup", "true");
+ // properties.setProperty("jogamp.debug.IOUtil", "true");
+ // properties.setProperty("nativewindow.debug", "all");
+ props.setProperty("nativewindow.debug.GraphicsConfiguration", "true");
+ // properties.setProperty("jogl.debug", "all");
+ // properties.setProperty("jogl.debug.GLProfile", "true");
+ props.setProperty("jogl.debug.GLDrawable", "true");
+ props.setProperty("jogl.debug.GLContext", "true");
+ props.setProperty("jogl.debug.GLSLCode", "true");
+ props.setProperty("jogl.debug.CapabilitiesChooser", "true");
+ // properties.setProperty("jogl.debug.GLSLState", "true");
+ // properties.setProperty("jogl.debug.DebugGL", "true");
+ // properties.setProperty("jogl.debug.TraceGL", "true");
+ // properties.setProperty("newt.debug", "all");
+ props.setProperty("newt.debug.Window", "true");
+ // properties.setProperty("newt.debug.Window.MouseEvent", "true");
+ // properties.setProperty("newt.debug.Window.KeyEvent", "true");
+ }
+
+ @Override
+ public String getActivityName() {
+ return demo;
+ }
+ @Override
+ public List<String> getPackages() {
+ return Arrays.asList(pkgs);
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java
new file mode 100644
index 000000000..cdfaa956d
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+package com.jogamp.opengl.test.android;
+
+import java.util.Arrays;
+import java.util.List;
+
+import com.jogamp.opengl.test.android.LauncherUtil.OrderedProperties;
+
+public class NEWTGearsES2ActivityLauncher extends LauncherUtil.BaseActivityLauncher {
+
+ static String demo = "com.jogamp.opengl.test.android.NEWTGearsES2Activity";
+ static String[] pkgs = new String[] { "com.jogamp.opengl.test" };
+
+ @Override
+ public void init() {
+ final OrderedProperties props = getProperties();
+ // props.setProperty("jogamp.debug.JNILibLoader", "true");
+ // props.setProperty("jogamp.debug.NativeLibrary", "true");
+ // properties.setProperty("jogamp.debug.NativeLibrary.Lookup", "true");
+ // properties.setProperty("jogamp.debug.IOUtil", "true");
+ // properties.setProperty("nativewindow.debug", "all");
+ props.setProperty("nativewindow.debug.GraphicsConfiguration", "true");
+ // properties.setProperty("jogl.debug", "all");
+ // properties.setProperty("jogl.debug.GLProfile", "true");
+ props.setProperty("jogl.debug.GLDrawable", "true");
+ props.setProperty("jogl.debug.GLContext", "true");
+ props.setProperty("jogl.debug.GLSLCode", "true");
+ props.setProperty("jogl.debug.CapabilitiesChooser", "true");
+ // properties.setProperty("jogl.debug.GLSLState", "true");
+ // properties.setProperty("jogl.debug.DebugGL", "true");
+ // properties.setProperty("jogl.debug.TraceGL", "true");
+ // properties.setProperty("newt.debug", "all");
+ props.setProperty("newt.debug.Window", "true");
+ // properties.setProperty("newt.debug.Window.MouseEvent", "true");
+ // properties.setProperty("newt.debug.Window.KeyEvent", "true");
+ }
+
+ @Override
+ public String getActivityName() {
+ return demo;
+ }
+ @Override
+ public List<String> getPackages() {
+ return Arrays.asList(pkgs);
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2TransActivityLauncher.java b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2TransActivityLauncher.java
new file mode 100644
index 000000000..0501cf55e
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2TransActivityLauncher.java
@@ -0,0 +1,49 @@
+package com.jogamp.opengl.test.android;
+
+import java.util.Arrays;
+import java.util.List;
+
+import com.jogamp.opengl.test.android.LauncherUtil.OrderedProperties;
+
+public class NEWTGearsES2TransActivityLauncher extends LauncherUtil.BaseActivityLauncher {
+ static String demo = "com.jogamp.opengl.test.android.NEWTGearsES2TransActivity";
+ static String[] pkgs = new String[] { "com.jogamp.opengl.test" };
+
+ @Override
+ public void init() {
+ final OrderedProperties props = getProperties();
+ // props.setProperty("jnlp.android.translucent", "true");
+ // props.setProperty("jogamp.debug.JNILibLoader", "true");
+ // props.setProperty("jogamp.debug.NativeLibrary", "true");
+ // properties.setProperty("jogamp.debug.NativeLibrary.Lookup", "true");
+ // properties.setProperty("jogamp.debug.IOUtil", "true");
+ // properties.setProperty("nativewindow.debug", "all");
+ props.setProperty("nativewindow.debug.GraphicsConfiguration", "true");
+ // properties.setProperty("jogl.debug", "all");
+ // properties.setProperty("jogl.debug.GLProfile", "true");
+ props.setProperty("jogl.debug.GLDrawable", "true");
+ props.setProperty("jogl.debug.GLContext", "true");
+ props.setProperty("jogl.debug.GLSLCode", "true");
+ props.setProperty("jogl.debug.CapabilitiesChooser", "true");
+ // properties.setProperty("jogl.debug.GLSLState", "true");
+ // properties.setProperty("jogl.debug.DebugGL", "true");
+ // properties.setProperty("jogl.debug.TraceGL", "true");
+ // properties.setProperty("newt.debug", "all");
+ props.setProperty("newt.debug.Window", "true");
+ // properties.setProperty("newt.debug.Window.MouseEvent", "true");
+ // properties.setProperty("newt.debug.Window.KeyEvent", "true");
+ }
+
+ @Override
+ public String getActivityName() {
+ return demo;
+ }
+ @Override
+ public List<String> getPackages() {
+ return Arrays.asList(pkgs);
+ }
+ @Override
+ public String getAction() {
+ return LauncherUtil.LAUNCH_ACTIVITY_TRANSPARENT;
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGraphUI1pActivityLauncher.java b/src/test/com/jogamp/opengl/test/android/NEWTGraphUI1pActivityLauncher.java
new file mode 100644
index 000000000..c75c229a8
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGraphUI1pActivityLauncher.java
@@ -0,0 +1,44 @@
+package com.jogamp.opengl.test.android;
+
+import java.util.Arrays;
+import java.util.List;
+
+import com.jogamp.opengl.test.android.LauncherUtil.OrderedProperties;
+
+public class NEWTGraphUI1pActivityLauncher extends LauncherUtil.BaseActivityLauncher {
+ static String demo = "com.jogamp.opengl.test.android.NEWTGraphUI1pActivity";
+ static String[] pkgs = new String[] { "com.jogamp.opengl.test" };
+
+ @Override
+ public void init() {
+ final OrderedProperties props = getProperties();
+ // props.setProperty("jogamp.debug.JNILibLoader", "true");
+ // props.setProperty("jogamp.debug.NativeLibrary", "true");
+ // properties.setProperty("jogamp.debug.NativeLibrary.Lookup", "true");
+ // properties.setProperty("jogamp.debug.IOUtil", "true");
+ // properties.setProperty("nativewindow.debug", "all");
+ props.setProperty("nativewindow.debug.GraphicsConfiguration", "true");
+ // properties.setProperty("jogl.debug", "all");
+ // properties.setProperty("jogl.debug.GLProfile", "true");
+ props.setProperty("jogl.debug.GLDrawable", "true");
+ props.setProperty("jogl.debug.GLContext", "true");
+ props.setProperty("jogl.debug.GLSLCode", "true");
+ props.setProperty("jogl.debug.CapabilitiesChooser", "true");
+ // properties.setProperty("jogl.debug.GLSLState", "true");
+ // properties.setProperty("jogl.debug.DebugGL", "true");
+ // properties.setProperty("jogl.debug.TraceGL", "true");
+ // properties.setProperty("newt.debug", "all");
+ props.setProperty("newt.debug.Window", "true");
+ // properties.setProperty("newt.debug.Window.MouseEvent", "true");
+ // properties.setProperty("newt.debug.Window.KeyEvent", "true");
+ }
+
+ @Override
+ public String getActivityName() {
+ return demo;
+ }
+ @Override
+ public List<String> getPackages() {
+ return Arrays.asList(pkgs);
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGraphUI2pActivityLauncher.java b/src/test/com/jogamp/opengl/test/android/NEWTGraphUI2pActivityLauncher.java
new file mode 100644
index 000000000..8f6b51484
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGraphUI2pActivityLauncher.java
@@ -0,0 +1,44 @@
+package com.jogamp.opengl.test.android;
+
+import java.util.Arrays;
+import java.util.List;
+
+import com.jogamp.opengl.test.android.LauncherUtil.OrderedProperties;
+
+public class NEWTGraphUI2pActivityLauncher extends LauncherUtil.BaseActivityLauncher {
+ static String demo = "com.jogamp.opengl.test.android.NEWTGraphUI2pActivity";
+ static String[] pkgs = new String[] { "com.jogamp.opengl.test" };
+
+ @Override
+ public void init() {
+ final OrderedProperties props = getProperties();
+ // props.setProperty("jogamp.debug.JNILibLoader", "true");
+ // props.setProperty("jogamp.debug.NativeLibrary", "true");
+ // properties.setProperty("jogamp.debug.NativeLibrary.Lookup", "true");
+ // properties.setProperty("jogamp.debug.IOUtil", "true");
+ // properties.setProperty("nativewindow.debug", "all");
+ props.setProperty("nativewindow.debug.GraphicsConfiguration", "true");
+ // properties.setProperty("jogl.debug", "all");
+ // properties.setProperty("jogl.debug.GLProfile", "true");
+ props.setProperty("jogl.debug.GLDrawable", "true");
+ props.setProperty("jogl.debug.GLContext", "true");
+ props.setProperty("jogl.debug.GLSLCode", "true");
+ props.setProperty("jogl.debug.CapabilitiesChooser", "true");
+ // properties.setProperty("jogl.debug.GLSLState", "true");
+ // properties.setProperty("jogl.debug.DebugGL", "true");
+ // properties.setProperty("jogl.debug.TraceGL", "true");
+ // properties.setProperty("newt.debug", "all");
+ props.setProperty("newt.debug.Window", "true");
+ // properties.setProperty("newt.debug.Window.MouseEvent", "true");
+ // properties.setProperty("newt.debug.Window.KeyEvent", "true");
+ }
+
+ @Override
+ public String getActivityName() {
+ return demo;
+ }
+ @Override
+ public List<String> getPackages() {
+ return Arrays.asList(pkgs);
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES1ActivityLauncher.java b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES1ActivityLauncher.java
new file mode 100644
index 000000000..478fe65b7
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES1ActivityLauncher.java
@@ -0,0 +1,44 @@
+package com.jogamp.opengl.test.android;
+
+import java.util.Arrays;
+import java.util.List;
+
+import com.jogamp.opengl.test.android.LauncherUtil.OrderedProperties;
+
+public class NEWTRedSquareES1ActivityLauncher extends LauncherUtil.BaseActivityLauncher {
+ static String demo = "com.jogamp.opengl.test.android.NEWTRedSquareES1Activity";
+ static String[] pkgs = new String[] { "com.jogamp.opengl.test" };
+
+ @Override
+ public void init() {
+ final OrderedProperties props = getProperties();
+ // props.setProperty("jogamp.debug.JNILibLoader", "true");
+ // props.setProperty("jogamp.debug.NativeLibrary", "true");
+ // properties.setProperty("jogamp.debug.NativeLibrary.Lookup", "true");
+ // properties.setProperty("jogamp.debug.IOUtil", "true");
+ // properties.setProperty("nativewindow.debug", "all");
+ props.setProperty("nativewindow.debug.GraphicsConfiguration", "true");
+ // properties.setProperty("jogl.debug", "all");
+ // properties.setProperty("jogl.debug.GLProfile", "true");
+ props.setProperty("jogl.debug.GLDrawable", "true");
+ props.setProperty("jogl.debug.GLContext", "true");
+ props.setProperty("jogl.debug.GLSLCode", "true");
+ props.setProperty("jogl.debug.CapabilitiesChooser", "true");
+ // properties.setProperty("jogl.debug.GLSLState", "true");
+ // properties.setProperty("jogl.debug.DebugGL", "true");
+ // properties.setProperty("jogl.debug.TraceGL", "true");
+ // properties.setProperty("newt.debug", "all");
+ props.setProperty("newt.debug.Window", "true");
+ // properties.setProperty("newt.debug.Window.MouseEvent", "true");
+ // properties.setProperty("newt.debug.Window.KeyEvent", "true");
+ }
+
+ @Override
+ public String getActivityName() {
+ return demo;
+ }
+ @Override
+ public List<String> getPackages() {
+ return Arrays.asList(pkgs);
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2ActivityLauncher.java b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2ActivityLauncher.java
new file mode 100644
index 000000000..b6265b72b
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2ActivityLauncher.java
@@ -0,0 +1,21 @@
+package com.jogamp.opengl.test.android;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.util.Log;
+
+public class NEWTRedSquareES2ActivityLauncher extends Activity {
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ final Uri uri = Uri.parse("launch://jogamp.org/com.jogamp.opengl.test.android.NEWTRedSquareES2Activity?pkg=com.jogamp.opengl.test");
+ final Intent intent = new Intent("org.jogamp.launcher.action.LAUNCH_ACTIVITY_NORMAL", uri);
+ Log.d(getClass().getSimpleName(), "Launching Activity: "+intent);
+ startActivity (intent);
+
+ finish(); // done
+ }
+}