How to use ace project with ionic 2

I am trying to create an Android app with ion 2 and use the ace of the project to create my own Android widget. Looking through the documentation on how to call native code using the project ace, I cannot find where to put the code in my existing javascript code to call the native code. Like this:

if (ace.platform == "Android") { setupWidget(); } function setupWidget() { // Handle the app being resumed by a widget click: ace.addEventListener("android.intentchanged", checkForWidgetActivation); ace.android.appWidget.clear(); for (var i = 0; i < 10; i++) { ace.android.appWidget.add("Item with index " + i); } } 

In general, where and in which file should I put the code and do I need to write a special import statement?

Thanks at Advance

+5
source share

Source: https://habr.com/ru/post/1259549/


All Articles