I had creat a gluon project ,then I put some folders and files under assets folder(Android) and I want to read the files in application,now how do I can read the assets folder ? or how do I get the android Context or AssetManager ? under gluon project there is no Activity class or any class extends Activity.I had read all of the gluonMobile API, javaFXports API and developer docs, there is no help! Dose anyone can help me? I nearly got crazy!
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
FXActivity
which you obtain via FXActivity.getInstance
extends Activity, thus you can call fxActivity.getAssets()
to get an instance of AssetManager