我正在使用PhoneGap构建一个Android应用程序,该应用程序是phonegap + jquery mobile的组合.
应用程序在模拟器中成功启动,我能够调试应用程序,直到昨天.
今天应用程序只是拒绝在模拟器上启动,我不断收到此错误
06-25 09:03:24.453: INFO/System.out(305): onReceivedError: Error code=-6 Description=The connection to the server was unsuccessful. URL=file:///android_asset/www/index.html
Run Code Online (Sandbox Code Playgroud) 我有一组打印机通过网络连接,并为每台打印机分配静态IP.
现在我有一个在Linux服务器上运行的PHP Web应用程序需要通过网络向这些打印机发送打印作业.
这可能是使用lpr或杯子,我该怎么做呢.
我们使用Phil Sturgeons酷的Restful API框架为codeigniter构建了我们的API ,这是生产就绪并且用作我们的移动应用程序实现的一部分.
在Java中使用API时遇到问题
httpConnection = (HttpConnection) Connector.open(url, Connector.READ, true);
// Set content type by given parameter......
httpConnection.setRequestProperty("Accept", contentType);
httpConnection.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/FCLDC-1.0");
httpConnection.setRequestProperty("Content-Type", contentType);
httpConnection.setRequestProperty("TK-API-KEY", UrlFactory.TK_API_KEY);
// httpConnection.setRequestProperty("Model",
// StyleUtil.getDeviceModel());
if (httpConnection.getResponseCode() == 302)
{
String redirectUrl = httpConnection.getHeaderField("Location");
httpConnection = (HttpConnection) Connector.open(redirectUrl, Connector.READ_WRITE, true);
}
if (httpConnection.getResponseCode() == HttpConnection.HTTP_OK)
{
io = httpConnection.openInputStream();
int ch;
while ((ch = io.read()) != -1)
{
bo.write(ch);
}
}
Run Code Online (Sandbox Code Playgroud)
httpConnection.getResponseCode()无法获取状态代码并返回格式错误的异常.我们的API服务器是NGINX.
我目前使用针对Android和黑莓平台的手机间隙构建了一个应用程序.
我为我的应用程序使用Jquery mobile和Phonegap的组合,因为它们都是开源框架和改进以及错误修复不断发生我想知道什么是一个很好的解决方案,提醒我的用户在我升级时更新他们的应用程序在我的应用程序中的框架之上.
我想到的一个解决方案是在我的服务器上为应用程序维护版本编号,当在用户设备上加载应用程序时,我们可以进行ajax调用以检查版本更新,然后提醒用户升级他们的应用程序.
Android市场还有一个自动更新功能,它是如何工作的!我该如何解决这个问题呢?
只是想知道Jquery mobile是否足够稳定,可用于实时生产企业移动应用程序.
有很多HTML5框架,因为我们的团队已经使用JQuery很长一段时间了,我们更喜欢使用Jquery移动框架.
它仍处于Alpha阶段,但已经阅读了很多相同的好评,我们还计划为Iphone,Android和Blackberry构建自定义原生应用程序,但希望有一个可在所有设备上运行的应用程序.
问候,谢尔顿
Server1:xxx.xxx.xxx.xxx
server-id=1
binlog-do-db=sample
master-host = xxx.xxx.xxx.xxx
master-user = someuser
master-password = somepassword
master-connect-retry = 60
relay-log = /var/lib/mysql/slave-relay.log
relay-log-index = /var/lib/mysql/slave-relay-log.index
Run Code Online (Sandbox Code Playgroud)
服务器2:xxx.xxx.xxx.xxx
server-id=2
binlog-do-db = sample
master-host = xxx.xxx.xxx.xxx
master-user = someuser
master-password = somepassword
master-connect-retry = 60
relay-log = /var/lib/mysql/slave-relay.log
relay-log-index = /var/lib/mysql/slave-relay-log.index
Run Code Online (Sandbox Code Playgroud)
我已经在2台测试服务器上设置了主主机复制配置,我还为服务器上的mysql 3306打开了端口我面临从机连接问题我一直得到
以下错误101021 19:12:23 [错误]从属I/O:错误连接到主服务器'root@xxx.xxx.xxx.xxx:3306' - 重试时间:60次重试:86400,错误代码:1045
服务器1有mysql 5.0.77,服务器2有mysql版本5.1.41
我已经使用node.js和socket io创建了一个用于通信的小型服务器
服务器:
var express = require('/usr/local/lib/node_modules/express')
var io = require('/usr/local/lib/node_modules/socket.io');
var server = express.createServer();
server.listen(8888,'localhost');
io = io.listen(server);
io.of("namespace").on('connection', function(client){
client.emit("message",'connection successful');
client.on('message', function(m){
console.log("received message"+m);
client.broadcast(m);
});
});
Run Code Online (Sandbox Code Playgroud)
客户:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Comet Test</title>
<script src="http://localhost:8888/socket.io/socket.io.js" type="text/javascript"></script>
</head>
<body>
<p><a id='customAlert' href="#" onclick='sendMessage("customAlert")'>publish customAlert</a></p>
<p><a id='customAlert2' href="#" onclick='sendMessage("customAlert2")'>publish customAl
<script type="text/javascript">
// Start the socket
var socket = io.connect('http://localhost:8888/namespace');
socket.on('error', function (reason){
console.error('Unable to connect Socket.IO', reason);
});
socket.on('message', function(msg){
console.log(msg);
});
function sendMessage(m) { …Run Code Online (Sandbox Code Playgroud) 我为我的网站开发了一个jquery移动应用程序http://tastykhana.in/m在Android默认的Web工具包浏览器中打开应用程序时出现问题.
我必须放大才能正确查看UI,因为它不适合屏幕和字体,输入非常小.
我在这里做错了什么,因为该网站在Opera迷你浏览器中运行良好.