From 0c4c6829482ee295e45e06f08d940c0511ad47af Mon Sep 17 00:00:00 2001 From: duqingquan Date: Mon, 27 Nov 2023 18:23:55 +0800 Subject: [PATCH] =?UTF-8?q?android=20=E6=96=B0=E5=A2=9E=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=8C=85=E5=90=8D=E6=A0=B9=E7=9B=AE=E5=BD=95=E4=B8=8B=E6=8F=90?= =?UTF-8?q?=E4=BE=9Bactivity=E7=9A=84=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AndroidManifest.xml | 9 +++++++++ .../utssdk/app-android/index.uts | 17 +++++++++++++++++ .../libs/simpleactivity-release.aar | Bin 0 -> 2564 bytes .../app-android/res/layout/demo_activity.xml | 1 + 4 files changed, 27 insertions(+) create mode 100644 uni_modules/uts-nativepage/utssdk/app-android/libs/simpleactivity-release.aar diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 85e0d2c..2b6a7e1 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -16,5 +16,14 @@ android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/filepaths" /> + + + + + + + diff --git a/uni_modules/uts-nativepage/utssdk/app-android/index.uts b/uni_modules/uts-nativepage/utssdk/app-android/index.uts index ef477b3..fad0cb4 100644 --- a/uni_modules/uts-nativepage/utssdk/app-android/index.uts +++ b/uni_modules/uts-nativepage/utssdk/app-android/index.uts @@ -184,6 +184,21 @@ class ActivityFinishListener extends OnClickListener{ } } +class RootActivityStartListener extends OnClickListener{ + + host:Activity + + constructor(activity:Activity){ + super() + this.host = activity + } + + override onClick(v?: View):void{ + let intent = Intent("uni.UNI70BE9D0.RootPackageActivity") + host.startActivity(intent) + } +} + /** * 自定义异步线程 */ @@ -262,6 +277,8 @@ class DemoActivity extends Activity{ let btn_finish_activity = this.findViewById