问题
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:
- 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.
- Creating Windows Runtime Components in C# and Visual Basic. Creating Windows Runtime Components in C++.
- 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.
- Yes, Windows 8 supports Bluetooth. Look at Windows.Networking.Proximity.
来源:https://stackoverflow.com/questions/14281527/convert-custom-cordova-plugin-to-windows-8-rt