如何创建PhoneGap插件从android应用程序 [英] How to create PhoneGap plugin out of an android application
问题描述
我基本上是使用此 https://github.com/googlesamples/android-vision 有一些改变,它完美地在我的Android设备上。
无论如何,我想在PhoneGap内使用它。这个想法是在javascript / html / css中构建应用程序的其余部分,当按下一个特定按钮时,启动Android应用程序。
从来没有创建过插件?
我将非常感谢任何有关如何做的提示或教程。
你首先要开发你的基本Cordova应用程序:
https://cordova.apache.org/docs/en/latest/guide/cli/index.html
然后,您的重新创建插件的地址将在这里: https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html
您必须在网络应用程序和Jar代码之间创建一个或几个Java文件作为适配器。
我发现文档不够我的案例,但我googled和使用一些开发人员博客文章,并发现一些StackOverflow的问题来帮助我。
祝你好运!
I am basically using this https://github.com/googlesamples/android-vision with a few changes and it works perfectly on my android device. Anyway, I would like to use it inside PhoneGap. The idea is to build the rest of the application in javascript/html/css and when pressed a specific button, start the android app.
Can this be done by someone who has never created a plugin before?
I would be grateful for any hint or tutorial on how to do it.
Of course it depends of your dev skills but I created myself my first plugin two months ago without being a Phonegap/Cordova expert, I'm a Java developer since 15 years but the most important thing is your motivation.
You first have to develop your basic Cordova app: https://cordova.apache.org/docs/en/latest/guide/cli/index.html
Then your ressource to create a plugin will be here: https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html
You will have to create one or few Java files as an adapter between your web app and your Jar code.
I found that the documentation was not enough for my case but I googled and used some dev blog articles and found some StackOverflow questions to help me.
Good luck!
这篇关于如何创建PhoneGap插件从android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!