Package com.castlabs.android.player
Class CLLibraryLoader
java.lang.Object
com.castlabs.android.player.CLLibraryLoader
The library loader class is a class that provides static methods to register native libraries that will be
 loaded on request.
 
 The class will load `gnustl_shared` first, then the registered libraries in order of registration
 and the the castLabs player libraries.
 
 In addition to library names, you can also register 
CLLibraryLoader.PostLoadAction
 instances. Registered implementations of this interface will be executed once after libraries are loaded.- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceRegister instances of this interface to call custom code triggered after all native libraries are loaded.
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidload()Call this method to load the registered native libraries and execute the post load actions.static voidregister(CLLibraryLoader.PostLoadAction postLoadAction) Register a new post load action that will be executed by the loader after the native libraries are loaded.static voidRegister a library that needs to be loaded.
- 
Field Details- 
ENABLEDpublic static boolean ENABLEDThe library loader can be disabled. This is useful for unit tests where the native libraries can not be loaded
 
- 
- 
Method Details- 
registerRegister a library that needs to be loaded. NOTE that the name is the base name of the library without the "lib" prefix and without the ".so" suffix! For example, say you want to load libgnustl_shared.so that is distributed with your app. In this case you need to register "gnustl_shared" with this method- Parameters:
- name- the library base name, i.e. "gnustl_shared"
 
- 
registerRegister a new post load action that will be executed by the loader after the native libraries are loaded.- Parameters:
- postLoadAction- the post load action
- Throws:
- IllegalStateException- in case the libraries are already loaded
 
- 
loadpublic static void load()Call this method to load the registered native libraries and execute the post load actions. *NOTE* that you usually do *NOT* need to call this method explicitly. The framework will take care of library loading for you.
 
-