简体   繁体   中英

Create iOS Today Extensions and Android Widgets with Appcelerator Titanium

Is there a way to create a widget with Titanium Appcelerator?
I need to create a widget to bring the count of the mileage of a car.
I am working with Titanium SDK 5.1.2 GA and Classic development.

Thanks in advance..

You can create native Android widgets in Titanium without problems. See the example Alloy project (works the same with a classic project) that here: https://github.com/m1ga/ti.coronawidget

Welcome Juan.

Well, I have some assumption of your question.

If you are considering the term widget as native module, yes, it will be possible. You can use an Bluetooth module (ios/android/commonjs) to communicate with your ODB2 protocol to obtain the information that you want.

If you are considering the term widget as we know by the Alloy framework, you can continue using, Classic and Alloy are not mutual exclusive, then you can keep with your Classic development and use some Widget requiring into your controller. You can look at gitt.io for some Bluetooth Modules per example.

Titanium currently does not support Android Widgets: https://jira.appcelerator.org/browse/TIMOB-1780

Although not officially supported you might be able to bundle an Xcode-built Today Extensions similar to how you do with Watch OS 2: http://docs.appcelerator.com/platform/latest/#!/guide/Integrate_a_WatchKit_App_Built_in_Xcode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM