JglTF icon indicating copy to clipboard operation
JglTF copied to clipboard

Using Jgltf-model under Android API level 24

Open WenlinMao opened this issue 6 years ago • 3 comments

Hi,

I am currently working on a project that tries to use Jgltf-model to extract data from glTF model. However, I noticed that Jgltf-model doesn't work below Android API level 24 because of the usage of java.util.function. I got the majority of the model rendered on Android over API level 24 and want to make it also work below API level 24. I am pretty new to Android programming and wondering if there are any suggestions on replacing the classes in java.util.function and get it to work below API level 24.

Thanks in advance.

WenlinMao avatar Aug 02 '19 08:08 WenlinMao

There have been some efforts/approaches to bring jgltf-model to android. The most recent comment here was https://github.com/javagl/JglTF/issues/4#issuecomment-477033673 .

I wonder what the best practices are for targeting API levels below 24 in terms of the java.util.function package. On the one hand, one could trivially carve out the uses of this package and/or offer the respective classes in an own de.javagl.jgltf.androidDoesNotHaveThis-package to ensure portability. But I think that similar questions will arise for other classes. (I don't have an overview of which classes are available in which API level - the linked issue only lists those that had not been available in API level 24)

javagl avatar Aug 02 '19 11:08 javagl

Check this new repo: https://github.com/mikikg/AndroidJgltfViewer

mikikg avatar Jan 23 '20 22:01 mikikg

A side note (as also mentioned in https://github.com/javagl/JglTF/issues/4#issuecomment-578402912 ) : I'll have to take a closer look at this, but didn't yet have enough time (JglTF is one of (far too) many spare time projects of mine). In the best case, the Android-based viewer project can become part of the JglTF project structure, so that people can use it transparently on the desktop and on Android.

javagl avatar Feb 06 '20 12:02 javagl

Android support is a question that comes up occasionally. I'm not nearly up to date with that "Android API Level" stuff, and which parts of Java are or are not supported. But I assume that the java.util.function part is supported in Android nowadays. And if there are more specific changes that are required for Android support, this can be tracked separately. I opened https://github.com/javagl/JglTF/issues/117 to keep track of this.

javagl avatar Jul 16 '24 13:07 javagl