Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
Hello UTS
提交
b061d3b4
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看板
提交
b061d3b4
编写于
10月 31, 2023
作者:
杜庆泉
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
手动移除全部无效的 UTSAndroid 引用,避免告警
上级
1caa0a8c
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
117 addition
and
54 deletion
+117
-54
uni_modules/uts-alert/utssdk/app-android/index.uts
uni_modules/uts-alert/utssdk/app-android/index.uts
+0
-5
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-file-manager/utssdk/app-android/index.uts
uni_modules/uts-file-manager/utssdk/app-android/index.uts
+2
-3
uni_modules/uts-getbatteryinfo/utssdk/app-android/index.uts
uni_modules/uts-getbatteryinfo/utssdk/app-android/index.uts
+0
-1
uni_modules/uts-hello-component/utssdk/app-android/index.vue
uni_modules/uts-hello-component/utssdk/app-android/index.vue
+113
-18
uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts
...modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts
+0
-2
uni_modules/uts-nativepage/utssdk/app-android/index.uts
uni_modules/uts-nativepage/utssdk/app-android/index.uts
+0
-5
uni_modules/uts-platform-api/utssdk/app-android/index.uts
uni_modules/uts-platform-api/utssdk/app-android/index.uts
+0
-1
uni_modules/uts-screenshot-listener/utssdk/app-android/index.uts
...ules/uts-screenshot-listener/utssdk/app-android/index.uts
+1
-6
uni_modules/uts-tencentgeolocation/utssdk/app-android/index.uts
...dules/uts-tencentgeolocation/utssdk/app-android/index.uts
+0
-6
uni_modules/uts-toast/utssdk/app-android/index.uts
uni_modules/uts-toast/utssdk/app-android/index.uts
+1
-6
未找到文件。
uni_modules/uts-alert/utssdk/app-android/index.uts
浏览文件 @
b061d3b4
import {
UTSAndroid
} from "io.dcloud.uts";
import Toast from 'android.widget.Toast';
import Toast from 'android.widget.Toast';
import AlertDialog from 'android.app.AlertDialog';
import AlertDialog from 'android.app.AlertDialog';
import DialogInterface from 'android.content.DialogInterface';
import DialogInterface from 'android.content.DialogInterface';
...
...
uni_modules/uts-animation-view/utssdk/app-android/index.vue
浏览文件 @
b061d3b4
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
import
LottieAnimationView
from
'
com.airbnb.lottie.LottieAnimationView
'
import
LottieAnimationView
from
'
com.airbnb.lottie.LottieAnimationView
'
import
LottieDrawable
from
'
com.airbnb.lottie.LottieDrawable
'
import
LottieDrawable
from
'
com.airbnb.lottie.LottieDrawable
'
import
FileInputStream
from
'
java.io.FileInputStream
'
import
FileInputStream
from
'
java.io.FileInputStream
'
import
{
UTSAndroid
}
from
"
io.dcloud.uts
"
;
class
CustomAnimListener
extends
Animator
.
AnimatorListener
{
class
CustomAnimListener
extends
Animator
.
AnimatorListener
{
...
...
uni_modules/uts-file-manager/utssdk/app-android/index.uts
浏览文件 @
b061d3b4
import { ReadFileSuccessResult, ReadFile
,ReadFile
Options } from "../interface.uts"
import { ReadFileSuccessResult, ReadFileOptions } from "../interface.uts"
import { WriteFileSuccessResult, WriteFile
,WriteFile
Options } from "../interface.uts"
import { WriteFileSuccessResult, WriteFileOptions } from "../interface.uts"
import { GetFileSystemManager,FileSystemManager} from "../interface.uts"
import { GetFileSystemManager,FileSystemManager} from "../interface.uts"
import { UniErrorSubject, UniErrors } from "../unierror.uts"
import { UniErrorSubject, UniErrors } from "../unierror.uts"
import File from "java.io.File"
import File from "java.io.File"
import UTSAndroid from 'io.dcloud.uts.UTSAndroid';
import Base64 from "android.util.Base64"
import Base64 from "android.util.Base64"
export { ReadFileOptions, WriteFileOptions } from "../interface.uts"
export { ReadFileOptions, WriteFileOptions } from "../interface.uts"
...
...
uni_modules/uts-getbatteryinfo/utssdk/app-android/index.uts
浏览文件 @
b061d3b4
import Context from "android.content.Context";
import Context from "android.content.Context";
import BatteryManager from "android.os.BatteryManager";
import BatteryManager from "android.os.BatteryManager";
import { UTSAndroid } from "io.dcloud.uts";
import IntentFilter from 'android.content.IntentFilter';
import IntentFilter from 'android.content.IntentFilter';
import Intent from 'android.content.Intent';
import Intent from 'android.content.Intent';
...
...
uni_modules/uts-hello-component/utssdk/app-android/index.vue
浏览文件 @
b061d3b4
<
template
>
<
template
>
<view
class=
"defaultStyles"
>
<view
>
</view>
</view>
</
template
>
</
template
>
...
@@ -7,11 +8,12 @@
...
@@ -7,11 +8,12 @@
import
TextUtils
from
'
android.text.TextUtils
'
import
TextUtils
from
'
android.text.TextUtils
'
import
Button
from
'
android.widget.Button
'
import
Button
from
'
android.widget.Button
'
import
LinearLayout
from
'
android.widget.LinearLayout
'
import
LinearLayout
from
'
android.widget.LinearLayout
'
import
Color
from
'
android.graphics.Color
'
import
View
from
'
android.view.View
'
import
View
from
'
android.view.View
'
class
ButtonClickListsner
extends
View
.
OnClickListener
{
class
ButtonClickListsner
extends
View
.
OnClickListener
{
constructor
()
{}
constructor
()
{
super
()
}
override
onClick
(
v
?
:
View
)
{
override
onClick
(
v
?
:
View
)
{
console
.
log
(
v
)
console
.
log
(
v
)
}
}
...
@@ -19,21 +21,35 @@
...
@@ -19,21 +21,35 @@
//原生提供以下属性或方法的实现
//原生提供以下属性或方法的实现
export
default
{
export
default
{
/**
* 组件名称,也就是开发者使用的标签
*/
name
:
"
uts-hello-view
"
,
name
:
"
uts-hello-view
"
,
/**
* 组件涉及的事件声明,只有声明过的事件,才能被正常发送
*/
emits
:
[
'
buttonClick
'
],
/**
* 属性声明,组件的使用者会传递这些属性值到组件
*/
props
:
{
props
:
{
/**
* 字符串类型 属性:buttonText 需要设置默认值
*/
"
buttonText
"
:
{
"
buttonText
"
:
{
type
:
String
,
type
:
String
,
default
:
"
点击触发
"
default
:
"
点击触发
"
}
}
},
},
/**
* 组件内部变量声明
*/
data
()
{
data
()
{
return
{}
return
{}
},
},
/**
* 属性变化监听器实现
*/
watch
:
{
watch
:
{
"
buttonText
"
:
{
"
buttonText
"
:
{
/**
/**
...
@@ -47,26 +63,105 @@
...
@@ -47,26 +63,105 @@
}
}
}
}
},
},
immediate
:
false
immediate
:
false
//创建时是否通过此方法更新属性,默认值为false
},
},
},
/**
* 规则:如果没有配置expose,则methods中的方法均对外暴露,如果配置了expose,则以expose的配置为准向外暴露
* ['publicMethod'] 含义为:只有 `publicMethod` 在实例上可用
*/
expose
:
[
'
doSth
'
],
methods
:
{
/**
* 对外公开的组件方法
*/
doSth
(
paramA
:
string
)
{
// 这是组件的自定义方法
console
.
log
(
"
paramA
"
,
paramA
)
},
},
/**
* 内部使用的组件方法
*/
privateMethod
()
{
}
},
/**
* 组件被创建,组件第一个生命周期,
* 在内存中被占用的时候被调用,开发者可以在这里执行一些需要提前执行的初始化逻辑
* [可选实现]
*/
created
()
{
},
/**
* 对应平台的view载体即将被创建,对应前端beforeMount
* [可选实现]
*/
NVBeforeLoad
()
{
},
/**
* 创建原生View,必须定义返回值类型
* 开发者需要重点实现这个函数,声明原生组件被创建出来的过程,以及最终生成的原生组件类型
* (Android需要明确知道View类型,需特殊校验)
* todo 补充IOS平台限制
* [必须实现]
*/
NVLoad
():
LinearLayout
{
NVLoad
():
LinearLayout
{
//必须实现
//必须实现
let
contentLayout
=
new
LinearLayout
(
$androidContext
)
let
contentLayout
=
new
LinearLayout
(
this
.
$androidContext
)
let
button
=
new
Button
(
$androidContext
)
let
button
=
new
Button
(
this
.
$androidContext
)
button
.
setText
(
"
点击触发
"
);
button
.
setText
(
"
点击触发
"
);
button
.
setTag
(
"
centerButton
"
);
button
.
setTag
(
"
centerButton
"
);
contentLayout
.
addView
(
button
,
LinearLayout
.
LayoutParams
(
500
,
500
));
contentLayout
.
addView
(
button
,
new
LinearLayout
.
LayoutParams
(
500
,
500
));
button
.
setOnClickListener
(
new
ButtonClickListsner
())
button
.
setOnClickListener
(
new
ButtonClickListsner
())
return
contentLayout
return
contentLayout
},
/**
* 原生View已创建
* [可选实现]
*/
NVLoaded
()
{
},
/**
* 原生View布局完成
* [可选实现]
*/
NVLayouted
()
{
},
/**
* 原生View将释放
* [可选实现]
*/
NVBeforeUnload
()
{},
/**
* 原生View已释放,这里可以做释放View之后的操作
* [可选实现]
*/
NVUnloaded
()
{
},
/**
* 组件销毁
* [可选实现]
*/
unmounted
()
{},
/**
* 自定组件布局尺寸
* [可选实现]
*/
NVMeasure
(
size
:
UTSSize
):
UTSSize
{
size
.
width
=
120.0
.
toFloat
()
size
.
height
=
800.0
.
toFloat
()
return
size
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
/* 定义默认样式值, 组件使用者没有配置时使用 */
.defaultStyles
{
width
:
750
rpx
;
height
:
240
rpx
;
}
</
style
>
</
style
>
\ No newline at end of file
uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts
浏览文件 @
b061d3b4
...
@@ -2,8 +2,6 @@ import AppWidgetProvider from 'android.appwidget.AppWidgetProvider';
...
@@ -2,8 +2,6 @@ import AppWidgetProvider from 'android.appwidget.AppWidgetProvider';
import Context from 'android.content.Context';
import Context from 'android.content.Context';
import AppWidgetManager from 'android.appwidget.AppWidgetManager';
import AppWidgetManager from 'android.appwidget.AppWidgetManager';
import RemoteViews from 'android.widget.RemoteViews';
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';
import R from 'io.dcloud.uni_modules.uts_nativepage.R';
export class DoAppWidget extends AppWidgetProvider {
export class DoAppWidget extends AppWidgetProvider {
...
...
uni_modules/uts-nativepage/utssdk/app-android/index.uts
浏览文件 @
b061d3b4
...
@@ -17,14 +17,9 @@ import IBinder from 'android.os.IBinder';
...
@@ -17,14 +17,9 @@ import IBinder from 'android.os.IBinder';
import Toast from 'android.widget.Toast';
import Toast from 'android.widget.Toast';
import {
UTSAndroid
} from "io.dcloud.uts";
import Service from 'android.app.Service';
import Service from 'android.app.Service';
import System from 'java.lang.System';
import System from 'java.lang.System';
import Exception from 'java.lang.Exception';
import Exception from 'java.lang.Exception';
import ResolveInfo from 'android.content.pm.ResolveInfo';
import RecyclerView from 'androidx.recyclerview.widget.RecyclerView';
import RecyclerView from 'androidx.recyclerview.widget.RecyclerView';
import TextView from 'android.widget.TextView';
import TextView from 'android.widget.TextView';
import ViewGroup from 'android.view.ViewGroup';
import ViewGroup from 'android.view.ViewGroup';
...
...
uni_modules/uts-platform-api/utssdk/app-android/index.uts
浏览文件 @
b061d3b4
...
@@ -2,7 +2,6 @@ import MediaStore from "android.provider.MediaStore";
...
@@ -2,7 +2,6 @@ import MediaStore from "android.provider.MediaStore";
import Activity from "android.app.Activity";
import Activity from "android.app.Activity";
import Bitmap from "android.graphics.Bitmap";
import Bitmap from "android.graphics.Bitmap";
import FileOutputStream from "java.io.FileOutputStream";
import FileOutputStream from "java.io.FileOutputStream";
import File from "java.io.File";
import Intent from 'android.content.Intent';
import Intent from 'android.content.Intent';
/**
/**
...
...
uni_modules/uts-screenshot-listener/utssdk/app-android/index.uts
浏览文件 @
b061d3b4
import {
import { UserCaptureScreenCallback, OnUserCaptureScreenResult } from "../interface.uts"
UTSAndroid
} from "io.dcloud.uts";
import { OnUserCaptureScreen, OffUserCaptureScreen, UserCaptureScreenCallback, OnUserCaptureScreenResult } from "../interface.uts"
import ActivityCompat from "androidx.core.app.ActivityCompat";
import ActivityCompat from "androidx.core.app.ActivityCompat";
...
@@ -14,7 +10,6 @@ import Build from "android.os.Build";
...
@@ -14,7 +10,6 @@ import Build from "android.os.Build";
import FileObserver from "android.os.FileObserver";
import FileObserver from "android.os.FileObserver";
import File from "java.io.File";
import File from "java.io.File";
import Environment from "android.os.Environment";
import Environment from "android.os.Environment";
import System from 'java.lang.System';
...
...
uni_modules/uts-tencentgeolocation/utssdk/app-android/index.uts
浏览文件 @
b061d3b4
import {
UTSAndroid
} from "io.dcloud.uts";
import ActivityCompat from "androidx.core.app.ActivityCompat";
import Manifest from "android.Manifest";
import Manifest from "android.Manifest";
import Looper from "android.os.Looper";
import Looper from "android.os.Looper";
import TencentLocationManager from "com.tencent.map.geolocation.TencentLocationManager";
import TencentLocationManager from "com.tencent.map.geolocation.TencentLocationManager";
...
@@ -10,8 +6,6 @@ import TencentLocationListener from "com.tencent.map.geolocation.TencentLocation
...
@@ -10,8 +6,6 @@ import TencentLocationListener from "com.tencent.map.geolocation.TencentLocation
import TencentLocation from "com.tencent.map.geolocation.TencentLocation";
import TencentLocation from "com.tencent.map.geolocation.TencentLocation";
import TencentLocationRequest from "com.tencent.map.geolocation.TencentLocationRequest";
import TencentLocationRequest from "com.tencent.map.geolocation.TencentLocationRequest";
import PackageManager from "android.content.pm.PackageManager";
import PackageManager from "android.content.pm.PackageManager";
import Class from 'java.lang.Class';
import Exception from 'java.lang.Exception';
...
...
uni_modules/uts-toast/utssdk/app-android/index.uts
浏览文件 @
b061d3b4
import {
UTSAndroid
} from "io.dcloud.uts";
import XToast from "com.hjq.xtoast.XToast";
import XToast from "com.hjq.xtoast.XToast";
import R from "io.dcloud.uni_modules.uts_toast.R";
import R from "io.dcloud.uni_modules.uts_toast.R";
import Runnable from 'java.lang.Runnable';
import Class from 'java.lang.Class';
import Exception from 'java.lang.Exception';
class UIRunnable extends Runnable {
class UIRunnable extends Runnable {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录