Android部件采用科尔多瓦 [英] Android Widget using Cordova

查看:143
本文介绍了Android部件采用科尔多瓦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算一起捆绑一些最起码的功能整合到一个应用程序或窗口小部件的Andr​​oid设备。不过转念一想,我意识到,我从来没有听说过/读别人之前,建设有科尔多瓦/ PhoneGap的一个小部件。我用Google搜索了一下,答案似乎在暗示一个'不'。我读了PhoneGap的主页上的描述,它说,它允许用户构建应用程序基本上是这样。

I am planning to bundle together some minimal functionality into an app or a widget for android devices. However on second thought I realized that I have never heard/read someone building a widget with Cordova/Phonegap before. I googled a bit and the answers seem to be suggesting a 'no'. I read the description on the home page for Phonegap and it says that it allows users to build apps basically.

那么,能不能有人请点我在正确的方向,以还判定是否其可能创造科尔多瓦一个Android窗口小部件。如果没有,怎么会是一个小部件概念/实际上从一个应用程序不同。

So, could someone please point me in the right direction as to wether its possible to create an android widget in Cordova. And if no, how is an widget conceptually/practically different from an app.

PS:说不定我使用了一些不正确的术语在这里。我的意思一个小部件是<一个href="https://play.google.com/store/apps/details?id=dk.nicolai.buch.andersen.glasswidgets&hl=en">this.它的东西,粘在主屏幕上大多是在一个半透明的酒吧。

PS: just maybe i am using some incorrect terminology here. What I mean by a widget is this. Its something that sticks on the home screen mostly in a translucent bar.

推荐答案

Widgets是Android原生结构,扩展了应用程序屏幕上查看。

Widgets are android native constructs that extend a view on the application screen.

<一个href="http://developer.android.com/reference/android/widget/package-summary.html">http://developer.android.com/reference/android/widget/package-summary.html

一个科尔多瓦/ PhoneGap的应用程序是一个web视图的支持的应用程序。注:的WebView不是Android原生视图

A cordova/phonegap app is an app with a webview backing. Note: webview not android native view.

直到有人发现一种方法来构建一个本地部件嵌入一个web视图,那么你已被告知,到目前为止是正确的......也就是不。

Until someone finds a way to construct a native widget that embeds a webview, then what you have been told so far is correct... i.e. "no".

<一个href="http://cordova.apache.org/docs/en/4.0.0/guide_overview_index.md.html#Overview">http://cordova.apache.org/docs/en/4.0.0/guide_overview_index.md.html#Overview <一href="http://cordova.apache.org/docs/en/4.0.0/guide_hybrid_webviews_index.md.html#Embedding%20WebViews">http://cordova.apache.org/docs/en/4.0.0/guide_hybrid_webviews_index.md.html#Embedding%20WebViews <一href="http://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_webview.md.html#Android%20WebViews">http://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_webview.md.html#Android%20WebViews

编辑:是可以想象,你可以与你的科尔多瓦的项目相关联的部件,但随后你会写Android原生code一起科尔多瓦....大多数人会认为这是打败使用点科尔多瓦,除非你只瞄准机器人。在这种情况下,我不得不问这样一个问题:

It "is" conceivable you could have a widget associated with your cordova project, but then you would be writing android native code alongside cordova.... most people would see this as defeating the point of using cordova, unless you are ONLY targeting android. In which case I have to ask the question:

您使用的科尔多瓦作为一种更简单的方式开始在Android应用程序的编码或者是你想利用科尔多瓦方便跨平台共享一个code基?

"Are you using cordova as an easier way to start app coding on android or are you trying to leverage the convenience of cordova to share a code base across multiple platforms?"

如果是前者,那么只写一个本机应用程序。 如果是后者,那么科尔多瓦是不会(容易),让你的小部件,也没有跨平台的小工具

If it's the former, then just write a native app. If it's the latter, then cordova isn't going to (easily) give you widgets, nor cross platform widgets

这篇关于Android部件采用科尔多瓦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆