public static WidgetLib init ( GVRContext gvrContext , String customPropertiesAsset ) throws InterruptedException , JSONException , NoSuchMethodException { if ( mInstance == null ) { // Constructor sets mInstance to ensure the initialization order new WidgetLib ( gvrContext , customPropertiesAsset ) ; } return mInstance . get ( ) ; }
Initialize an instance of Widget Lib . It has to be done before any usage of library . The application needs to hold onto the returned WidgetLib reference for as long as the library is going to be used .