<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>测试</title>
<meta name="format-detection" content="telephone=no" />
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width" />
<script type="text/javascript">
</script>
</head>
<body>
<button onclick="window.location.reload(true)">刷新</button>
<div id="log" style="background-color: #eeeeee"><div>调试消息:</div></div>
<script type="text/javascript">
function output(content) {
document.write('<p>' + content + '</p>')
}
output(new Date());
output(window.location.href);
window.onerror = function(msg, url, line) {
alert(msg + '\r\n' + url + '\r\n' + line);
};
function log(name, msg) {
var div = document.createElement('div');
div.innerHTML = '<strong>' + new Date() + ' - ' + name + ': </strong>' + msg;
document.getElementById('log').appendChild(div);
}
(function(window, undefined) {
var API_NAME = 'qqJSBridge',
ANDROID_BRIDGE_NAME = '_qqJSBridge_',
PROTOCOL_NAME = 'qq',
MESSAGE_SEPARATOR = '\r\n',
MESSAGE_REQUEST_NAME = 'getMessage',
MESSAGE_RESPONSE_NAME = 'setMessage';
var _private = {};
var _public = {};
_private.callbackList = {};
_private.messageList = [];
_private.getGUID = function() {
var cache = arguments.callee;
if (!cache.guid) {
cache.guid = new Date().getTime();
}
return 'cb_' + cache.guid++;
};
_private.getClient = function() {
var userAgent = window.navigator.userAgent;
if (userAgent.match(/Android\s+[\d.]+/)) {
return 'android';
} else if (userAgent.match(/i\w+.*OS\s[\d_]+/)) {
return 'ios';
} else {
return 'unknow';
}
};
_private.getStringFromJSON = function(json) {
return JSON.stringify(json);
};
_private.getJSONFromString = function(str) {
return JSON.parse(str);
};
_private.getStringFromObject = function() {
return '';
};
_private.getMessageList = function() {
var messageList = [], message;
while(message = _private.messageList.shift()) {
messageList.push(_private.getStringFromJSON(message));
}
log('getMessageList', messageList.join(MESSAGE_SEPARATOR));
return messageList.join(MESSAGE_SEPARATOR);
};
_private.sendMessage = function(name, params) {
var cache = arguments.callee;
if (!cache.iframe) {
cache.iframe = document.createElement("iframe");
cache.iframe.style.display = "none";
window.document.documentElement.appendChild(cache.iframe);
}
if (_private.getClient() != 'unknow') {
cache.iframe.src = PROTOCOL_NAME + '://' + name + (params ? '?' + _private.getStringFromObject(params) : '');
window.status = cache.iframe.src;
}
};
_private.setMessage = function(messageString) {
setTimeout(function() {
var message = _private.getJSONFromString(messageString);
if (message.responseId) {
if (typeof(_private.callbackList[message.responseId]) === 'function') {
_private.callbackList[message.responseId].call(this, message.responseData);
delete _private.callbackList[message.responseId];
}
} else {
alert('收到通知: ' + messageString);
}
}, 0);
return true;
};
_private.emojiList = {};
_public.invoke = function(method, params, callback) {
var guid = _private.getGUID();
_private.callbackList[guid] = callback;
switch (_private.getClient()) {
case 'ios':
_private.messageList.push ({
handlerName: method,
data: params,
callbackId: guid
});
_private.sendMessage('receiveMessage', {
separator: MESSAGE_SEPARATOR
});
return true;
case 'android':
window[ANDROID_BRIDGE_NAME].invoke(method, _private.getStringFromJSON(params), guid);
return true;
default:
setTimeout(function() {
switch(method) {
case 'showMsgBox':
var result = parseInt(window.prompt(
(
'标题: ' + params.title + ' ' +
'按钮: ' + params.button + ' ' +
'高亮:' + (params.selected || 0) + ' ' +
'内容: ' + params.prompt + '\r\n'
),
params.selected || 0
)) || 0;
callback({
result: result
});
break;
case 'openPage':
window.alert(
'pageUrl: ' + params.pageUrl + '\r\n' +
'pageTitle: ' + params.pageTitle + '\r\n' +
'pageSession: ' + params.pageSession + '\r\n' +
'buttonUrl: ' + params.buttonUrl + '\r\n' +
'buttonTitle: ' + params.buttonTitle + '\r\n' +
'buttonSession: ' + params.buttonSession + ''
);
window.location.href = params.pageUrl;
break;
case 'closePage':
window.alert('关闭窗口');
break;
case 'queryEmojiInfo':
if (Math.random() < 0.1) {
callback({
result: -1,
message: 'random error'
});
} else {
if (_private.emojiList[params.id]) {
callback({
result: 0,
data: {
id: params.id,
status: _private.emojiList[params.id].status,
progress: _private.emojiList[params.id].progress
}
});
} else {
callback({
result: 0,
data: {
id: params.id,
status: Math.floor(Math.random() * 4),
progress: Math.floor(Math.random() * 101)
}
});
}
}
break;
case 'startDownloadEmoji':
_private.emojiList[params.id] = {
status: Math.floor(Math.random() * 4),
progress: 0
};
var timer = setInterval(function() {
if (_private.emojiList[params.id].status == 2) {
_private.emojiList[params.id].progress = Math.min(_private.emojiList[params.id].progress + Math.random() * 10, 100);
if (_private.emojiList[params.id].progress == 100) {
clearInterval(timer);
_private.emojiList[params.id].status = 3;
callback({result: Math.floor(Math.random() * 4)});
}
} else {
clearInterval(timer);
callback({result: Math.floor(Math.random() * 5)});
}
}, 100);
break;
default:
callback({
result: -1,
message: 'error handler'
});
break;
}
}, 0);
return true;
}
};
_private.sendMessage('init', {
bridgeName: ANDROID_BRIDGE_NAME,
apiName: API_NAME,
requestName: MESSAGE_REQUEST_NAME,
responseName: MESSAGE_RESPONSE_NAME
});
_public[MESSAGE_REQUEST_NAME] = _private.getMessageList;
_public[MESSAGE_RESPONSE_NAME] = _private.setMessage;
window[API_NAME] = _public;
})(window);
function testMsgBox() {
qqJSBridge.invoke('showMsgBox', {title: '对话框测试', prompt: '根据队列要求,这需要先弹出', button: '确定,取消'}, function(json) {
alert('你点的是:' + '确定,取消'.split(',')[json.result]);
});
qqJSBridge.invoke('showMsgBox', {title: '对话框测试', prompt: '根据队列要求,这需要后弹出', button: '确定,取消,测试'}, function(json) {
alert('你点的是:' + '确定,取消,测试'.split(',')[json.result]);
});
}
</script>
<script type="text/javascript">
var testCase = new (function() {
var callbackList = [];
this.add = functio
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
今天刚更新的QQ安卓版4.5。 apk+反编源码+图片素材+smali文件+ui布局xml等,应有尽有。 内含一个zip包,打包的是lz反编的源码,由于腾讯做了源码混淆,所以反编出来的源码仅供参考。 图片什么的绝对没有问题,找素材的可以利用下。 最后推销下我的博客 http://iting.in thx.
资源推荐
资源详情
资源评论
收起资源包目录
最新安卓版QQ4.5反编源码,图片资源,布局xml iting.in (8459个子文件)
qq2013_4.5.0.15.apk 27.99MB
qqreaderplugin.apk 1.28MB
contact_restore_disabled 2KB
qzone-appstore-index.css 31KB
qzone-appstore-history.css 26KB
detail.css 21KB
qzone-appstore-category.css 18KB
comm.css 7KB
apps.css 7KB
software.dat 7KB
qiangtui.dat 3KB
daohang.dat 3KB
tcrecommd.dat 1024B
tcsoftware.dat 1024B
py.db 47KB
exiflist 23B
f084.gif 53KB
f086.gif 42KB
f024.gif 35KB
f006.gif 25KB
f097.gif 19KB
f079.gif 18KB
f061.gif 17KB
f022.gif 17KB
f089.gif 17KB
f009.gif 17KB
f088.gif 16KB
f026.gif 15KB
f044.gif 15KB
f010.gif 15KB
f027.gif 14KB
f106.gif 14KB
f011.gif 14KB
f035.gif 14KB
f099.gif 14KB
f002.gif 13KB
f087.gif 13KB
f030.gif 13KB
f050.gif 12KB
f037.gif 12KB
f013.gif 11KB
f014.gif 11KB
f033.gif 11KB
f083.gif 11KB
f063.gif 10KB
f096.gif 10KB
f082.gif 10KB
f017.gif 10KB
f081.gif 10KB
f077.gif 9KB
f092.gif 9KB
f038.gif 9KB
f094.gif 9KB
f041.gif 8KB
f085.gif 8KB
f001.gif 8KB
f104.gif 8KB
f102.gif 8KB
f105.gif 8KB
f074.gif 8KB
f019.gif 7KB
f101.gif 7KB
f098.gif 7KB
f025.gif 6KB
f020.gif 6KB
f070.gif 6KB
f043.gif 6KB
f062.gif 6KB
f100.gif 6KB
f059.gif 6KB
f091.gif 6KB
f031.gif 6KB
f049.gif 5KB
f066.gif 5KB
f053.gif 5KB
f000.gif 5KB
f046.gif 5KB
f051.gif 5KB
f003.gif 5KB
f090.gif 5KB
f048.gif 5KB
f034.gif 5KB
f023.gif 5KB
f004.gif 4KB
f005.gif 4KB
f072.gif 4KB
f021.gif 4KB
f056.gif 4KB
f055.gif 4KB
f045.gif 4KB
f103.gif 4KB
f052.gif 4KB
f012.gif 4KB
f042.gif 4KB
f073.gif 4KB
f054.gif 4KB
f065.gif 4KB
f095.gif 4KB
f015.gif 4KB
f093.gif 4KB
共 8459 条
- 1
- 2
- 3
- 4
- 5
- 6
- 85
Young_Liu
- 粉丝: 12
- 资源: 20
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页