简体   繁体   English

通过phonegap插件启动android活动

[英]start android activity through phonegap plugin

I want to create an AugmentedReality phonegap plugin on android. 我想在Android上创建AugmentedReality phonegap plugin I have the AugmentedReality source code on android. 我在android上有AugmentedReality源代码。 I would like to launch this android application using the push button on phonegap application. 我想使用phonegap应用程序上的push button启动此android应用程序。

Right so you need to write a plugin in order to start the AR code. 正确,因此您需要编写一个插件才能启动AR代码。 Basically you'll write a JS file to call your Java code. 基本上,您将编写一个JS文件来调用Java代码。 In your Java code you will extend the Plugin class from the PhoneGap API and to start your AR code you will fire an intent. 在Java代码中,您将从PhoneGap API扩展Plugin类,并开始您的AR代码,然后激发意图。 Examples of this include: 例如:

https://github.com/phonegap/phonegap-plugins/blob/master/Android/BarcodeScanner/2.0.0/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java https://github.com/phonegap/phonegap-plugins/blob/master/Android/ContactView/ContactView.java https://github.com/phonegap/phonegap-plugins/blob/master/Android/BarcodeScanner/2.0.0/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java https://github.com/phonegap/phonegap -plugins / blob / master / Android / ContactView / ContactView.java

There is already one AR plugin for Android: Android已经有一个AR插件:

https://github.com/phonegap/phonegap-plugins/tree/master/Android/AugmentedReality-Wikitude https://github.com/phonegap/phonegap-plugins/tree/master/Android/AugmentedReality-Wikitude

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM