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

增加腾讯地图插件入口

上级 b0a0d7eb
...@@ -44,6 +44,15 @@ ...@@ -44,6 +44,15 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path" : "pages/SDKIntegration/TencentMap/TencentMap",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, },
{ {
"path" : "pages/SDKIntegration/XToast/XToast", "path" : "pages/SDKIntegration/XToast/XToast",
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<page-head :title="title"></page-head> <page-head :title="title"></page-head>
<uni-list> <uni-list>
<uni-list-item @tap="gotoTencentLocation" title="腾讯定位sdk集成示例" class="itemButton" :clickable="true" link/> <uni-list-item @tap="gotoTencentLocation" title="腾讯定位sdk集成示例" class="itemButton" :clickable="true" link/>
<uni-list-item @tap="gotoTencentMap" title="腾讯地图sdk集成示例" class="itemButton" :clickable="true" link/>
<uni-list-item @tap="gotoXToast" title="XToast集成示例" class="itemButton" :clickable="true" link/> <uni-list-item @tap="gotoXToast" title="XToast集成示例" class="itemButton" :clickable="true" link/>
</uni-list> </uni-list>
</view> </view>
...@@ -27,7 +28,12 @@ ...@@ -27,7 +28,12 @@
uni.navigateTo({ uni.navigateTo({
url:'/pages/SDKIntegration/TencentLocation/TencentLocation' url:'/pages/SDKIntegration/TencentLocation/TencentLocation'
}) })
} },
gotoTencentMap:function(e){
uni.navigateTo({
url:'/pages/SDKIntegration/TencentMap/TencentMap'
})
},
} }
} }
......
<template>
<button> 选择地图位置</button>
</template>
<script>
</script>
<style>
</style>
\ No newline at end of file
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
<uni-list-item @tap="testLifecyle" title="activity生命周期监听" :clickable="true" link /> <uni-list-item @tap="testLifecyle" title="activity生命周期监听" :clickable="true" link />
<uni-list-item @tap="gotoDecorView" title="操作DecorView" :clickable="true" link /> <uni-list-item @tap="gotoDecorView" title="操作DecorView" :clickable="true" link />
<uni-list-item @tap="testMetaRead" title="读取meta配置" :clickable="true" />
<uni-list-item @tap="testAssetLoad" title="播放asset音频(需自定义基座)" :clickable="true" /> <uni-list-item @tap="testAssetLoad" title="播放asset音频(需自定义基座)" :clickable="true" />
<uni-list-item @tap="testMetaRead" title="读取meta配置(需自定义基座)" :clickable="true" />
</uni-list> </uni-list>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
], ],
"repository": "", "repository": "",
"engines": { "engines": {
"HBuilderX": "^3.6.7" "HBuilderX": "^3.6.8"
}, },
"dcloudext": { "dcloudext": {
"type": "uts", "type": "uts",
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
}, },
"client": { "client": {
"Vue": { "Vue": {
"vue2": "n", "vue2": "y",
"vue3": "y" "vue3": "y"
}, },
"App": { "App": {
......
{
"minSdkVersion": "21"
}
\ No newline at end of file
...@@ -4,9 +4,9 @@ import { getAppContext } from "io.dcloud.uts.android"; ...@@ -4,9 +4,9 @@ import { getAppContext } from "io.dcloud.uts.android";
type GetBatteryInfoOptions = { type GetBatteryInfoOptions = {
success?: (res: UTSJSONObject) => void success?: (res: object) => void
fail?: (res: UTSJSONObject) => void fail?: (res: object) => void
complete?: (res: UTSJSONObject) => void complete?: (res: object) => void
} }
export default function getBatteryInfo(options: GetBatteryInfoOptions) { export default function getBatteryInfo(options: GetBatteryInfoOptions) {
......
{
"deploymentTarget": "9"
}
\ No newline at end of file
...@@ -21,7 +21,6 @@ import { ...@@ -21,7 +21,6 @@ import {
onAppActivityPause, onAppActivityPause,
onAppActivityResume, onAppActivityResume,
onAppActivityBack, onAppActivityBack,
onAppActivityStop,
onAppActivityResult, onAppActivityResult,
onAppTrimMemory, onAppTrimMemory,
onAppConfigChange, onAppConfigChange,
......
...@@ -84,7 +84,7 @@ class ScreenFileObserver extends FileObserver { ...@@ -84,7 +84,7 @@ class ScreenFileObserver extends FileObserver {
/** /**
* 开启截图监听 * 开启截图监听
*/ */
export function onUserCaptureScreen(callback: (res:UTSJSONObject) => void) { export function onUserCaptureScreen(callback: (res:object) => void) {
// 检查相关权限是否已经具备 // 检查相关权限是否已经具备
if (ActivityCompat.checkSelfPermission(getUniActivity()!, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { if (ActivityCompat.checkSelfPermission(getUniActivity()!, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
......
{
"id": "uts-tencentmap",
"displayName": "uts-tencentmap",
"version": "1.0.0",
"description": "uts-tencentmap",
"keywords": [
"uts-tencentmap"
],
"repository": "",
"engines": {
"HBuilderX": "^3.6.8"
},
"dcloudext": {
"type": "uts",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "",
"data": "",
"permissions": ""
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "u",
"aliyun": "u"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
},
"App": {
"app-android": "u",
"app-ios": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}
\ No newline at end of file
# uts-tencentmap
### 开发文档
[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html)
[UTS 原生插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html)
[Hello UTS](https://gitcode.net/dcloud/hello-uts/-/tree/dev)
\ No newline at end of file
import {
getUniActivity,
} from "io.dcloud.uts.android";
import Intent from 'android.content.Intent';
import Activity from 'android.app.Activity';
class TencentMapActivity extends Activity{
constructor (){
super();
}
override onCreate(savedInstanceState?: Bundle):void {
super.onCreate(savedInstanceState)
this.setContentView(R.layout.demo_activity);
let btn_start_service_front = findViewById<Button>(R.id.btn_start_service_front);
btn_start_service_front.setOnClickListener(new StartServiceListener());
let btn_start_screen_listen = findViewById<Button>(R.id.btn_start_screen_listen);
btn_start_screen_listen.setOnClickListener(new StartBroadcastListener());
}
}
export default function gotoTencentMapActivity() {
// 跳转到一个新的界面
let intent = new Intent(getUniActivity(),TencentMapActivity().javaClass);
getUniActivity()!.startActivity(intent);
return { name: "gotoTencentMapActivity"};
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册