Code example for AssetManager

Methods: openFd

0
	 
	/// JNI Function used to fetch an APK Resource file descriptor. Called from native code 
	public static AssetFileDescriptor getAssetFileDescriptor(String assetName){
		AssetFileDescriptor fp = null;
		try{	 
			fp = assetManager.openFd(assetName);
		}catch(IOException ioe){
			/// Handle asset loading exception 
			Log.v("ParabolaEngine", "Asset file fetch exception: " + ioe.getMessage());
		} 
		return fp;
	} 
	 
	public static void requestFrameRender(){ 
		mGLView.requestRender();
	} 
	 
	public static void toggle_keyboard() { 
        InputMethodManager mgr = (InputMethodManager)mGame.getSystemService(Context.INPUT_METHOD_SERVICE);
        mgr.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT,0);      
    }