提交 37574356 编写于 作者: 杜庆泉's avatar 杜庆泉

腾讯定位发布配置添加

上级 ce930e42
## 1.0.0(2023-09-11)
基于腾讯定位服务,实现uni.getLocation 获取定位功能
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
"id": "uni-getLocation-tencent", "id": "uni-getLocation-tencent",
"displayName": "uni-getLocation-tencent", "displayName": "uni-getLocation-tencent",
"version": "1.0.0", "version": "1.0.0",
"description": "uni-getLocation-tencent", "description": "基于腾讯定位服务,实现uni.getLocation 获取定位功能",
"keywords": [ "keywords": [
"uni-getLocation-tencent" "uni-getLocation-tencent"
], ],
"repository": "", "repository": "",
"engines": { "engines": {
"HBuilderX": "^3.6.11" "HBuilderX": "^3.8.12"
}, },
"dcloudext": { "dcloudext": {
"type": "uts", "type": "uts",
...@@ -24,59 +24,65 @@ ...@@ -24,59 +24,65 @@
"qq": "" "qq": ""
}, },
"declaration": { "declaration": {
"ads": "", "ads": "",
"data": "", "data": "插件使用的 腾讯定位SDK会采集数据,详情可参考:https://lbs.qq.com/",
"permissions": "" "permissions": "<!-- 通过GPS得到精确位置 -->\n\t<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>\n\t<!-- 通过网络得到粗略位置 -->\n\t<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>\n\t<!-- 访问网络,某些位置信息需要从网络服务器获取 -->\n\t<uses-permission android:name=\"android.permission.INTERNET\"/>\n\t<!-- 访问WiFi状态,需要WiFi信息用于网络定位 -->\n\t<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>\n\t<!-- 修改WiFi状态,发起WiFi扫描, 需要WiFi信息用于网络定位 -->\n\t<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>\n\t<!-- 访问网络状态, 检测网络的可用性,需要网络运营商相关信息用于网络定位 -->\n\t<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>\n\t<!-- 访问网络的变化, 需要某些信息用于网络定位 -->\n\t<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>\n\t<!-- 蓝牙扫描权限 -->\n\t<uses-permission android:name=\"android.permission.BLUETOOTH\"/>\n\t<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>\n\t<!-- 前台service权限 -->\n\t<uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\"/>\n\t<!-- 后台定位权限 -->\n\t<uses-permission android:name=\"android.permission.ACCESS_BACKGROUND_LOCATION\"/>\n\t<!-- A-GPS辅助定位权限,方便GPS快速准确定位 -->\n\t<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>\n"
}, },
"npmurl": "" "npmurl": ""
}, },
"uni_modules": { "uni_modules": {
"uni-ext-api": { "uni-ext-api": {
"uni": ["getLocation"] "uni": [
"getLocation"
]
}, },
"dependencies": [], "dependencies": [],
"encrypt": [], "encrypt": [],
"platforms": { "platforms": {
"cloud": { "cloud": {
"tcb": "u", "tcb": "y",
"aliyun": "u" "aliyun": "y"
}, },
"client": { "client": {
"Vue": { "Vue": {
"vue2": "n", "vue2": "y",
"vue3": "y" "vue3": "y"
}, },
"App": { "App": {
"app-android": "u", "app-android": {
"app-ios": "u" "minVersion": "19"
},
"app-ios": {
"minVersion": "9"
}
}, },
"H5-mobile": { "H5-mobile": {
"Safari": "u", "Safari": "n",
"Android Browser": "u", "Android Browser": "n",
"微信浏览器(Android)": "u", "微信浏览器(Android)": "n",
"QQ浏览器(Android)": "u" "QQ浏览器(Android)": "n"
}, },
"H5-pc": { "H5-pc": {
"Chrome": "u", "Chrome": "n",
"IE": "u", "IE": "n",
"Edge": "u", "Edge": "n",
"Firefox": "u", "Firefox": "n",
"Safari": "u" "Safari": "n"
}, },
"小程序": { "小程序": {
"微信": "u", "微信": "n",
"阿里": "u", "阿里": "n",
"百度": "u", "百度": "n",
"字节跳动": "u", "字节跳动": "n",
"QQ": "u", "QQ": "n",
"钉钉": "u", "钉钉": "n",
"快手": "u", "快手": "n",
"飞书": "u", "飞书": "n",
"京东": "u" "京东": "n"
}, },
"快应用": { "快应用": {
"华为": "u", "华为": "n",
"联盟": "u" "联盟": "n"
} }
} }
} }
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
"dependencies": [ "dependencies": [
"com.tencent.map.geolocation:TencentLocationSdk-openplatform:7.3.0" "com.tencent.map.geolocation:TencentLocationSdk-openplatform:7.3.0"
], ],
"minSdkVersion": 21 "minSdkVersion": "19"
} }
...@@ -37,7 +37,7 @@ export const getLocation : GetLocation = function (options : GetLocationOptions) ...@@ -37,7 +37,7 @@ export const getLocation : GetLocation = function (options : GetLocationOptions)
/** /**
* 准备权限 * 准备权限
*/ */
let permissionNeed : string[] = utsArrayOf("android.permission.ACCESS_FINE_LOCATION"); let permissionNeed = ["android.permission.ACCESS_FINE_LOCATION"];
UTSAndroid.requestSystemPermission(UTSAndroid.getUniActivity()!, permissionNeed, function (allRight:boolean,_grantedList:string[]) { UTSAndroid.requestSystemPermission(UTSAndroid.getUniActivity()!, permissionNeed, function (allRight:boolean,_grantedList:string[]) {
if (allRight) { if (allRight) {
// 交给目前的location 引擎,真实执行 // 交给目前的location 引擎,真实执行
......
{
"deploymentTarget": "9"
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册