Android Widget Using Cordova
Answer :
Yes, widgets are native Android constructions. But you CAN create your widget for your app with the help of cordova plugin called "cordova-plugin-ace". Made by Microsoft and opened to everyone.
Documentation:
- Official site - http://microsoft.github.io/ace/
- Doc for creating widget - http://microsoft.github.io/ace/docs/native-ui/#four
I hope it'll be helpfully for you, me and others cordova devs.
Widgets are android native constructs that extend a view on the application screen.
http://developer.android.com/reference/android/widget/package-summary.html
A cordova/phonegap app is an app with a webview backing. Note: webview not android native view.
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".
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_hybrid_webviews_index.md.html#Embedding%20WebViews http://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_webview.md.html#Android%20WebViews
Edit: 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:
"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
Comments
Post a Comment