Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
Hello UTS
提交
a418cbb5
H
Hello UTS
项目概览
DCloud
/
Hello UTS
通知
1598
Star
27
Fork
9
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
2
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
Hello UTS
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
2
Issue
2
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
a418cbb5
编写于
9月 13, 2023
作者:
杜庆泉
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
移除手动引用 utsandroid 的问题
上级
3ac3992c
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
13 addition
and
45 deletion
+13
-45
uni_modules/uts-advance/utssdk/app-android/index.uts
uni_modules/uts-advance/utssdk/app-android/index.uts
+0
-5
uni_modules/uts-alert/utssdk/app-android/index.uts
uni_modules/uts-alert/utssdk/app-android/index.uts
+0
-3
uni_modules/uts-animation-view/utssdk/app-android/index.vue
uni_modules/uts-animation-view/utssdk/app-android/index.vue
+0
-1
uni_modules/uts-getbatteryinfo/utssdk/app-android/index.uts
uni_modules/uts-getbatteryinfo/utssdk/app-android/index.uts
+0
-1
uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts
...modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts
+0
-1
uni_modules/uts-nativepage/utssdk/app-android/index.uts
uni_modules/uts-nativepage/utssdk/app-android/index.uts
+0
-4
uni_modules/uts-screenshot-listener/utssdk/app-android/index.uts
...ules/uts-screenshot-listener/utssdk/app-android/index.uts
+0
-4
uni_modules/uts-tencentgeolocation/utssdk/app-android/index.uts
...dules/uts-tencentgeolocation/utssdk/app-android/index.uts
+13
-23
uni_modules/uts-toast/utssdk/app-android/index.uts
uni_modules/uts-toast/utssdk/app-android/index.uts
+0
-3
未找到文件。
uni_modules/uts-advance/utssdk/app-android/index.uts
浏览文件 @
a418cbb5
...
...
@@ -22,11 +22,6 @@ import AlertDialog from 'android.app.AlertDialog';
import DialogInterface from 'android.content.DialogInterface';
import EditText from 'android.widget.EditText';
import {
UTSAndroid
} from "io.dcloud.uts";
/**
* 定时任务参数封装
...
...
uni_modules/uts-alert/utssdk/app-android/index.uts
浏览文件 @
a418cbb5
import {
UTSAndroid
} from "io.dcloud.uts";
import Toast from 'android.widget.Toast';
import AlertDialog from 'android.app.AlertDialog';
...
...
uni_modules/uts-animation-view/utssdk/app-android/index.vue
浏览文件 @
a418cbb5
...
...
@@ -10,7 +10,6 @@
import
LottieAnimationView
from
'
com.airbnb.lottie.LottieAnimationView
'
import
LottieDrawable
from
'
com.airbnb.lottie.LottieDrawable
'
import
FileInputStream
from
'
java.io.FileInputStream
'
import
{
UTSAndroid
}
from
"
io.dcloud.uts
"
;
class
CustomAnimListener
extends
Animator
.
AnimatorListener
{
...
...
uni_modules/uts-getbatteryinfo/utssdk/app-android/index.uts
浏览文件 @
a418cbb5
import Context from "android.content.Context";
import BatteryManager from "android.os.BatteryManager";
import { UTSAndroid } from "io.dcloud.uts";
type GetBatteryInfoOptions = {
...
...
uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts
浏览文件 @
a418cbb5
...
...
@@ -3,7 +3,6 @@ import Context from 'android.content.Context';
import AppWidgetManager from 'android.appwidget.AppWidgetManager';
import RemoteViews from 'android.widget.RemoteViews';
import Handler from 'android.os.Handler';
import UTSAndroid from 'io.dcloud.uts.UTSAndroid';
import R from 'io.dcloud.uni_modules.uts_nativepage.R';
export class DoAppWidget extends AppWidgetProvider {
...
...
uni_modules/uts-nativepage/utssdk/app-android/index.uts
浏览文件 @
a418cbb5
...
...
@@ -17,10 +17,6 @@ import IBinder from 'android.os.IBinder';
import Toast from 'android.widget.Toast';
import {
UTSAndroid
} from "io.dcloud.uts";
import Service from 'android.app.Service';
import System from 'java.lang.System';
import Looper from 'android.os.Looper';
...
...
uni_modules/uts-screenshot-listener/utssdk/app-android/index.uts
浏览文件 @
a418cbb5
import {
UTSAndroid
} from "io.dcloud.uts";
import { OnUserCaptureScreen, OffUserCaptureScreen, UserCaptureScreenCallback, OnUserCaptureScreenResult } from "../interface.uts"
...
...
uni_modules/uts-tencentgeolocation/utssdk/app-android/index.uts
浏览文件 @
a418cbb5
import {
UTSAndroid
} from "io.dcloud.uts";
import ActivityCompat from "androidx.core.app.ActivityCompat";
import Manifest from "android.Manifest";
...
...
@@ -23,26 +21,18 @@ export function requestPremission() {
*/
TencentLocationManager.setUserAgreePrivacy(true);
// 注册一个请求回调
UTSAndroid.onAppActivityRequestPermissionsResult((requestCode: number,
permissions: MutableList<string>,
grantResults: MutableList<number>) => {
/**
* 0 已同意
* -1 已拒绝
*/
console.log(grantResults);
console.log(permissions);
console.log(requestCode);
});
// 发起权限申请
ActivityCompat.requestPermissions(
UTSAndroid.getUniActivity()!,
arrayOf(Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION), 1001);
// 请求权限
return { name: "requestPremission"};
/**
* 准备权限
*/
let permissionNeed = [Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION];
UTSAndroid.requestSystemPermission(UTSAndroid.getUniActivity()!, permissionNeed, function (allRight:boolean,_grantedList:string[]) {
console.log("用户同意了权限")
}, function (_doNotAskAgain:boolean,_grantedList:string[]) {
console.log("用户拒绝了部分权限:")
})
// 请求权限
return { name: "requestPremission"};
}
...
...
uni_modules/uts-toast/utssdk/app-android/index.uts
浏览文件 @
a418cbb5
import {
UTSAndroid
} from "io.dcloud.uts";
import XToast from "com.hjq.xtoast.XToast";
import R from "io.dcloud.uni_modules.uts_toast.R";
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录