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

manifest key 修改进行中

上级 330de077
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
"name" : "HelloUTS", "name" : "HelloUTS",
"appid" : "__UNI__70BE9D0", "appid" : "__UNI__70BE9D0",
"description" : "", "description" : "",
"versionName" : "1.0.6", "versionName" : "1.0.8",
"versionCode" : "106", "versionCode" : "108",
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus" : {
...@@ -38,7 +38,9 @@ ...@@ -38,7 +38,9 @@
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ],
"minSdkVersion" : 21,
"abiFilters" : [ "armeabi-v7a" ]
}, },
/* ios打包配置 */ /* ios打包配置 */
"ios" : { "ios" : {
......
{ {
"minSdkVersion": "21"
} }
\ No newline at end of file
{ {
"libs": [
],
"dependencies": [{
}],
"minSdkVersion": 21
} }
\ No newline at end of file
{ {
"libs": [
],
"dependencies": [{
}],
"minSdkVersion": 21
} }
\ No newline at end of file
# uts-tencentgeolocation # uts-tencentgeolocation
### 开发文档
## 填写配置信息
[申请腾讯地图Key](https://lbs.qq.com/mobile/androidMapSDK/developerGuide/getKey)
修改项目根目录下 AndroidManifest.xml
<meta-data android:name="TencentMapSDK" android:value="您申请的Key" />
## 相关开发文档
[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) [UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html)
[UTS 原生插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) [UTS 原生插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html)
[Hello UTS](https://gitcode.net/dcloud/hello-uts/-/tree/dev) [Hello UTS](https://gitcode.net/dcloud/hello-uts/-/tree/dev)
\ No newline at end of file
{ {
"dependencies": [{
"id": "androidx.core:core",
"source": "implementation 'androidx.core:core:1.0.0'"
},
{
"id": "com.tencent.map.geolocation:TencentLocationSdk-openplatform",
"source": "implementation 'com.tencent.map.geolocation:TencentLocationSdk-openplatform:7.3.0'"
}],
"minSdkVersion": 21 "minSdkVersion": 21
} }
...@@ -99,10 +99,12 @@ class SingleLocationListener extends TencentLocationListener { ...@@ -99,10 +99,12 @@ class SingleLocationListener extends TencentLocationListener {
override onLocationChanged(location:TencentLocation , error:Int , override onLocationChanged(location:TencentLocation , error:Int ,
reason:string ):void{ reason:string ):void{
console.log(location);
this.hostOptionWraper.onLocationChanged(location,error,reason); this.hostOptionWraper.onLocationChanged(location,error,reason);
} }
override onStatusUpdate(name:string, status:Int, desc:string ):void{ override onStatusUpdate(name:string, status:Int, desc:string ):void{
console.log(name);
this.hostOptionWraper.onStatusUpdate(name,status,desc); this.hostOptionWraper.onStatusUpdate(name,status,desc);
} }
...@@ -126,7 +128,7 @@ export function getLocation(locationOptions: LocationOptions) { ...@@ -126,7 +128,7 @@ export function getLocation(locationOptions: LocationOptions) {
}else{ }else{
locationRequest.setRequestLevel(TencentLocationRequest.REQUEST_LEVEL_GEO); locationRequest.setRequestLevel(TencentLocationRequest.REQUEST_LEVEL_GEO);
} }
console.log(locationRequest);
mLocationManager.requestSingleFreshLocation(locationRequest, mLocationListener, Looper.getMainLooper()); mLocationManager.requestSingleFreshLocation(null, mLocationListener, Looper.getMainLooper());
return { name: "getLocation"}; return { name: "getLocation"};
} }
\ No newline at end of file
...@@ -2,16 +2,24 @@ ...@@ -2,16 +2,24 @@
-keepclassmembers class ** { -keepclassmembers class ** {
public void on*Event(...); public void on*Event(...);
} }
-keep public class com.tencent.location.**{ -keep public class com.tencent.location.**{
public protected *; public protected *;
} }
-keepclasseswithmembernames class * { -keepclasseswithmembernames class * {
native <methods>; native <methods>;
} }
-keep class c.t.**{*;} -keep class c.t.**{*;}
-keep class com.tencent.map.geolocation.**{*;} -keep class com.tencent.map.geolocation.**{*;}
-dontwarn org.eclipse.jdt.annotation.** -dontwarn org.eclipse.jdt.annotation.**
-dontwarn c.t.** -dontwarn c.t.**
# sdk版本小于18时需要以下配置, 建议使用18或以上版本的sdk编译
-dontwarn android.location.Location -dontwarn android.location.Location
-dontwarn android.net.wifi.WifiManager -dontwarn android.net.wifi.WifiManager
-dontnote ct.** -dontnote ct.**
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册