cancel
Showing results for 
Search instead for 
Did you mean: 

Has anybody been able to build the android ultralite example?

Former Member
5,125

I've been trying to build the android ultralite sample: http://dcx.sybase.com/1201/en/ulj/uj-android-tutorial-s-3977473.html

The tutorial seems to have issues -- though it could be user error!

I'm trying to use Eclipse (Helios SR2), with Java 1.6 (x86 versions), under Windows 7 x64 (SP1).

Has anybody succeeded in building the sample and running it?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

There is a problem in the 12.0.1 GA release of this sample. The following was added to the readme.txt in %SQLANYSAMP12%UltraLiteJAndroidCustDBreadme.txt, in the latest EBF:

IMPORTANT NOTE:
The GA release of SQL Anywhere installed this sample with mixed-case
directory names, which causes build problems with Eclipse.  The following
sub-directory names in this sample should be lower case.  If that is not
the case, you should manually rename them before step 2.
We apologize for the inconvenience.

libs
res
src
libs\\armeabi
res\\drawable-hdpi
res\\drawable-ldpi
res\\drawable-mdpi
res\\layout
res\\menu
res\\values
src\\com
src\\com\\sybase
src\\com\\sybase\\custdb
Former Member
0 Kudos

Thank you for the prompt answer!

I ended up making a new project and copying the java/jar/res and .so files over to it.

Once I added <uses-permission android:name="android.permission.INTERNET"/> to the manifest, everything worked well.

Very impressive!

Though I'm wondering if there would be an easy way to extract the JNI bindings in order to use the .so with MonoDroid (C# for Android). Any ideas?

Former Member
0 Kudos

It sounds like we would need to expose the JNI entry points to the shared object so that you could make calls from Mono (as opposed to Dalvik). We don't have plans to make those available, and are focusing on supporting Dalvik development.

Former Member

You've probably already got a solution now, but it's worth noting that Mono For Android now (well from versio n4.2) supports Java Binding Library projects.

Using these, it's easy to bind the Ultralitej library for use in a Mono For Android project. I've written an article on how I did it here: https://support.microsec.co.uk/confluence/x/EQKCAg

jeff_albion
Product and Topic Expert
Product and Topic Expert
0 Kudos

Once I added <uses-permission android:name="android.permission.INTERNET"/> to the manifest, everything worked well.

I should mention that we have added this comment for the Internet permission to the Android UltraLiteJ tutorial notes in the next version of SQL Anywhere - other customers have noted requiring this permission as well.

Former Member
0 Kudos

Your work on Mono For Android is very interesting. Thanks James.

Former Member
0 Kudos

I should be able to make a Java Wrapper and use JNI to access it. Not as nice a solution, but workable.

If anybody is interested, here is a blog post that shows how to do that: http://www.gregshackles.com/2011/02/using-admob-in-a-monodroid-application/