Notes specific to the Java version

[Last update: 10/06/2022]

Cubism SDK for Java is currently in alpha version, and the specifications may change in the beta or official version.


Allocator, memory related

Unlike the Cubism SDK for Native, variables and objects that are no longer needed are freed by garbage collection and must be properly dereferenced.
Also, there is no need to pass an allocator (ICubismAllocator) as the first argument to CubismFramework.startUp() for the reasons above.

For details, see " How to use CubismJavaFramework directly".


About Texture Formats

In order for Android's BitmapFactory.decodeStream method to generate images using the Premultiplied Alpha method, the PREMULTIPLIED_ALPHA_ENABLE defined in the sample LAppDefine must be set to true. PREMULTIPLIED_ALPHA_ENABLE must be set to true.



Handling of Callback Functions in SDK for Java (alpha version)

SDK for Java (alpha version) has callback functions that can be registered in the same way as Native and Web, but there are some differences in usage due to Java specifications.
Since the methods themselves cannot be managed as objects, callback function objects are handled by having the user create a class that implements the interface we have provided.


When passing callbacks, this object should be passed as a function argument.

For more specific usage, see Callback for End of Motion Playback (Java).

© 2010 - 2022 Live2D Inc.