[英]PhoneGap 3.3 and Mobile Services HTML App on Android
我安装了最新的PhoneGap版本(3.3),打包了我的移动服务HTML应用程序并点击了已知的授权问题:
仅从http://和https:// URL支持登录。 请将您的页面托管在Web服务器中
我已经在互联网上搜索了这个问题( http://social.msdn.microsoft.com/Forums/windowsazure/en-US/a2386093-73cd-44fb-a418-4fa83a36c800/phonegap-apps-using-the-new-html -client-for-azure-mobile-services-not-working?forum = azuremobile )但该解决方案对我不起作用。 由phonegap创建的项目引用<script type="text/javascript" src="phonegap.js"></script>
但即使我将其更改为<script type="text/javascript" src="cordova.js"></script>
它不起作用。
这个问题有什么解决方案吗?
我的源代码:
<html>
<head>
<meta charset="utf-8" />
<title>Report</title>
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
<script type="text/javascript" src="cordova.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/mobileservices/MobileServices.Web-1.1.0.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="myscript.js"></script>
</head>
myscript.js
var app = {
initialize: function() {
document.addEventListener('deviceready', this.onDeviceReady, false);
},
onDeviceReady: function() {
var client = new WindowsAzure.MobileServiceClient(
"https://myapp.azure-mobile.net/", "XXX");
client.login("google").done(....
},
};
$(document).ready(function documentReady() {
app.initialize();
});
显然,PhoneGap 3不再在window.device.cordova
报告其版本,移动服务会在其中检查它。 但即便假装也无济于事 - 经过Google授权后,它会进入空白页面。
最近修改了版本问题并更新了设备核心插件。
device.cordova.version应正确说明您正在运行的版本。
因此,如果您打算使用它,您现在可以做到这一点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.