如何从Gluon Mobile应用程序访问原生Android服务?

时间:2016-06-22 15:41:02

标签: android javafxports gluon-mobile

我想在Android设备上使用我最基本的Gluon Mobile应用程序调用本机服务。例如,通过在GoNative示例应用程序中完成的操作,我可以获得这样的TelephonyManager实例:

 TelephonyManager telephonyManager= (TelephonyManager)FXActivity.getInstance().getSystemService(android.content.Context.TELEPHONY_SERVICE);

但这个例子似乎不是最新的。我看到它在die build.gradle文件中使用了几个lib的早期版本,而在我的配置中,使用了3.0.0版本。

似乎有API更改,因为FXActivity甚至不再提供getSystemService()功能。

因此,在当前版本中,如何获取TelephonyManager并访问其余的原生Android服务?

0 个答案:

没有答案