Pedro Justo
Pedro Justo

Reputation: 4289

Is it possible to create home screen widgets for Android using Ionic Framework or React Native?

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

Is it possible build a homescreen widget using Ionic or react native?

Upvotes: 12

Views: 9742

Answers (5)

João Vitor
João Vitor

Reputation: 240

Yes it is possible and not difficult to do with my project for Android in a very simple way without plugin with nothing. What I did I created my AppWidget in Android Studio modified the way I wanted. After I created it, I went to my project Ionic I managed the android platform then just copied the class java and layouts .xml then pasted on platform/android.

With this I adapted according to my need in my case res/xml, res/layouts, res/drawable and in folders src/the_application_address after I just needed to hit my Manisfest.

Upvotes: 1

jsdario
jsdario

Reputation: 6833

It is possible, but you still would have to rely a lot on some Android notions. Here it is a proof of concept you can start with:

React Native Android Widget Proof of Concept

Upvotes: 3

MarSoft
MarSoft

Reputation: 3913

For React Native, at the moment this is not possible. There is an issue on their GitHub, and upvotes for this feature are welcome on the dedicated ProductPains page.

Probably this will eventually be implemented.

Upvotes: 1

Suraj Khanal
Suraj Khanal

Reputation: 540

I am not sure but i have found a plugin that can extend the native view to the cordova app. You can install this plugin by

cordova plugin add cordova-plugin-ace

For more info please follow this repo link

Upvotes: 3

Yuval Bar Levy
Yuval Bar Levy

Reputation: 51

Not sure about React Native, but I'll answer regarding Ionic.

In one word - no, you can't.

Ionic is an HTML, CSS, JS framework but it is mostly used with Cordova which embeds the webview in your app and renders HTML, CSS, JS in it. (Answered on Quora)

Here you can find more thorough explanation for a similar question.

Upvotes: 5

Related Questions