Convert Custom Cordova Plugin to Windows 8/RT

笑着哭i 提交于 2019-12-11 06:48:24

问题


I am in the midst of converting a html/javascript app that runs on iOS/Android to work on Windows 8/RT. I have most of the HTML/Javascript/jQuery working on the Windows 8/RT but need to figure out to get the plugin working on windows 8.

That said I have a couple questions.

1) What is the native language of Windows 8/RT?

  • In Android, my Javascript plugin talks to a JAVA file and returns a pluginresult. What is the equivalent on Windows 8?

2) Is there any documentation on how to setup a Windows 8 plugin?

  • The Phonegap page only currently lists Windows Phone 8/7 documentation.

3) The Cordova plugin supports a window.openDatabase function for both iOS and Android, is there an equivalent on Windows 8?

4) Does Windows 8 allow Bluetooth communication?

  • related topic here Windows Store Bluetooth

回答1:


  1. The core WinRT components are written in C++. You can write your own components in C++, C#, or VB.NET. No matter what language the WinRT component is written in, you can access it from JavaScript, C#, VB.NET, or C++. Windows Store apps can be written in any of those languages. They're all fully supported by Microsoft.
  2. Creating Windows Runtime Components in C# and Visual Basic. Creating Windows Runtime Components in C++.
  3. window.openDatabase creates a SQLite database. You can use your own SQLite database for a Windows Store app. There's also a way to use SQLite from JavaScript. Alternatively, since you're using JavaScript, you can use the IndexedDB capability in HTML5.
  4. Yes, Windows 8 supports Bluetooth. Look at Windows.Networking.Proximity.


来源:https://stackoverflow.com/questions/14281527/convert-custom-cordova-plugin-to-windows-8-rt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!