修改兼容性,解决sdk版本无法使用相机和权限校验问题

This commit is contained in:
qiji4215
2023-04-25 14:54:25 +08:00
parent 2a6dad3ac0
commit 9fb85862db
15 changed files with 277 additions and 27 deletions

View File

@@ -75,7 +75,7 @@ class LocationLayerHandler(context: AppCompatActivity, mapView: NIMapView) : Bas
//可选默认gcj02设置返回的定位结果坐标系如果配合百度地图使用建议设置为bd09ll;
locationOption.setCoorType("gcj02")
//可选默认0即仅定位一次设置发起连续定位请求的间隔需要大于等于1000ms才是有效的
locationOption.setScanSpan(1000)
locationOption.setScanSpan(1200)
//可选,设置是否需要地址信息,默认不需要
locationOption.setIsNeedAddress(false)
//可选,设置是否需要地址描述
@@ -97,11 +97,11 @@ class LocationLayerHandler(context: AppCompatActivity, mapView: NIMapView) : Bas
//可选默认false设置定位时是否需要海拔信息默认不需要除基础定位版本都可用
locationOption.setIsNeedAltitude(true)
//设置打开自动回调位置模式该开关打开后期间只要定位SDK检测到位置变化就会主动回调给开发者该模式下开发者无需再关心定位间隔是多少定位SDK本身发现位置变化就会及时回调给开发者
// locationOption.setOpenAutoNotifyMode()
locationOption.setOpenAutoNotifyMode()
//设置打开自动回调位置模式该开关打开后期间只要定位SDK检测到位置变化就会主动回调给开发者
locationOption.setOpenAutoNotifyMode(
/* locationOption.setOpenAutoNotifyMode(
5, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT
)
)*/
//需将配置好的LocationClientOption对象通过setLocOption方法传递给LocationClient对象使用
locationClient.locOption = locationOption
} catch (e: Throwable) {