[英]Can JavaScript files be used in Android?
I need to add some JavaScript code to my program.我需要在我的程序中添加一些 JavaScript 代码。 Is it possible to add
.js
files in Android?是否可以在 Android 中添加
.js
文件? If so, can you tell me the way how to do it, and extract the codes.如果是这样,你能告诉我怎么做,并提取代码。
Yes.Using Phonegap
you can use JS files in android. Yes.Using
Phonegap
你可以在android中使用JS文件。
Here is the link to get you started.这是帮助您入门的链接。
http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.html http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.html
http://coenraets.org/blog/phonegap-tutorial/ http://coenraets.org/blog/phonegap-tutorial/
http://www.codeproject.com/Articles/353661/Writing-Android-Programs-with-HTML-and-JavaScrip http://www.codeproject.com/Articles/353661/Writing-Android-Programs-with-HTML-and-JavaScrip
You can refer this to implement codarva...您可以参考this来实现codarva ...
或者,如果您的应用程序是原始的,您就可以使用WebView
You can use Phonegap it will be usefull你可以使用Phonegap它会很有用
http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.html http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.html
You cannot use Js Files directly into android.您不能将 Js 文件直接用于 android。 Instead use Codarva or else phonegap to have the Js files
而是使用 Codarva 或 phonegap 来获取 Js 文件
Android - Loading an external .js file into a webview then accessing it's functions? Android - 将外部 .js 文件加载到 webview 中然后访问它的功能?
http://www.codeproject.com/Articles/353661/Writing-Android-Programs-with-HTML-and-JavaScrip http://www.codeproject.com/Articles/353661/Writing-Android-Programs-with-HTML-and-JavaScrip
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.