Posted by
Sven Gothel on
Nov 21, 2012; 7:31am
URL: https://forum.jogamp.org/Recreating-Jogl2-Android-demo-projects-in-Eclipse-tp4027079p4027131.html
On 11/20/2012 04:06 PM, asambol [via jogamp] wrote:
> Hi.
>
> I would like to port my Jogl2 application to Android tablet (Google Nexus 7).
> The first step I tried to do was creating a simple project, like jogl.test.apk.
>
> I made the following steps:
>
> 1. I did
> adb install gluegen-rt.apk
> adb install jogl.all-android.apk
> adb install jogl.android-launcher.apk
that is correct
>
> I tried both the current version from the repository, the version from Google
> play, debug signed versions and I even tried signing the unsigned versions.
> This part works fine in all of the above cases when starting your
> jogl.test.apk tests.
>
> 2. I created a new Android project in Eclipse, inside package my.package. I
> added your classes NEWTRedSquareES2Activity and
> NEWTRedSquareES2ActivityLauncher to my package, and of course, the
> RedSquareES2 class.
>
So it still reads: 'class NEWTGearsES2ActivityLauncher extends LauncherUtil.BaseActivityLauncher' ?
> Inside the NEWTRedSquareES2ActivityLauncher, I changed the Intent to:
> final Intent intent = new Intent(this,
> my.package.NEWTRedSquareES2Activity.class); - so it doesn't call your classes
> from jogl.test.apk.
W/o using BaseActivityLauncher's Intent and hence it's DataSet,
there will be no proper communication to our activity launcher code.
Note that BaseActivityLauncher is part of the JAR file containing the demo/test itself
and hence need to be copied to your workspace as well!
Here is an overview of our activity launcher mechanism:
<
http://forum.jogamp.org/Migrate-a-Java-application-using-Jogl-to-Android-tablet-td3732586.html#a3738415>
+++
Of course, you can simply drop all of this
and create one big APK from our JAR files _and_ your application JAR file,
where your activity will be called directly.
>
> 3. At this point, I got many errors so I included the following external jars
> to java build path, just to make Eclipse happy:
> gluegen-rt-android.jar
> gluegen-rt-natives-android-armv6.jar
> jogl-all-android.jar
> jogl-all-natives-android-armv6.jar
>
> 4. My manifest file looks like this:
http://pastebin.com/H957x3biCan you make that
'<activity android:name=".NEWTRedSquareES2ActivityLauncher"'
explicit like in ours:
<
http://jogamp.org/git/?p=jogl.git;a=blob;f=make/resources/android/AndroidManifest-test.xml;hb=HEAD>
but I guess that is not the issue, but the Intent's data .. see above.
~Sven