ddxiami

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2611|回复: 1

[其它] uuid和app version的测试demo

[复制链接]
发表于 2016-11-24 15:49:04 | 显示全部楼层 |阅读模式
<!DOCTYPE html>
<html>
<head>
    <title>Hello World</title>
</head>
<body>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<button onclick="test()">test</button>
<script>

            function test(){
                console.log("test1");
                cordova.getAppVersion.getVersionNumber(function (version) {
                    alert(version);
                });
                alert(device.cordova);
                alert(device.model);
                alert(device.platform);
                alert(device.uuid);
                alert(device.version);
                alert(device.manufacturer);
                alert(device.isVirtual);
                alert(device.serial);
                alert("test3");
            }
        </script>
</body>
</html>
回复

使用道具 举报

 楼主| 发表于 2016-11-24 15:49:40 | 显示全部楼层
安装插件

cordova plugin add cordova-plugin-device
cordova plugin add cordova-plugin-app-version
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|技术文档库 ( 闽ICP备15017263号-2 )|网站地图

GMT+8, 2025-5-19 03:49 , Processed in 0.035086 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表