将自定义Cordova插件转换为Windows 8 / RT [英] Convert Custom Cordova Plugin to Windows 8/RT

查看:116
本文介绍了将自定义Cordova插件转换为Windows 8 / RT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将在iOS / Android上运行的html / javascript应用程序转换为在Windows 8 / RT上运行。我有大部分的HTML / Javascript / jQuery工作在Windows 8 / RT,但需要找出来让插件在Windows 8上工作。



一对夫妇的问题。



1)Windows 8 / RT的母语是什么?




  • 在Android中,我的Javascript插件与JAVA文件交互,并返回
    pluginresult。在Windows 8上是什么等效的?



2)有关如何设置Windows 8插件的文档吗?




  • Phonegap页面目前只列出Windows Phone 8/7
    文件。



3)Cordova插件支持iOS和Android的window.openDatabase函数,在Windows 8上有一个等价的函数吗?



4)Windows 8是否允许蓝牙通讯?




解决方案


  • WinRT的核心组件是用C ++编写的。你可以在C ++,C#或VB.NET中编写自己的组件。无论以什么语言编写WinRT组件,您都可以从JavaScript,C#,VB.NET或C ++访问它。 Windows应用商店应用可以用任何这些语言编写。他们都完全受Microsoft支持。

  • 在C#和Visual Basic中创建Windows运行时组件在C ++中创建Windows运行时组件

  • window.openDatabase创建一个SQLite数据库。 您可以将自己的SQLite数据库用于Windows商店应用还有一种从JavaScript使用SQLite的方法。或者,由于您使用的是JavaScript,因此您可以使用 IndexedDB功能

  • 是的,Windows 8支持蓝牙。 查看Windows.Networking.Proximity


  • 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?

    解决方案

    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.

    这篇关于将自定义Cordova插件转换为Windows 8 / RT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆