diff --git a/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts b/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts index cce58765e3ac7d2ef0a017cf707f82669aa5b704..446dc719ca31f92f1e5715cb8350b68d08a4ca14 100644 --- a/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts +++ b/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts @@ -19,7 +19,7 @@ export class DoAppWidget extends AppWidgetProvider { appWidgetManager: AppWidgetManager, appWidgetIds: IntArray ):void{ - console.log("dqqdo", "周期更新函数被触发") + console.log("周期更新函数被触发") // There may be multiple widgets active, so update all of them for (appWidgetId in appWidgetIds) { updateAppWidget(context, appWidgetManager, appWidgetId) @@ -28,12 +28,12 @@ export class DoAppWidget extends AppWidgetProvider { override onEnabled(_context: Context):void{ // Enter relevant functionality for when the first widget is created - console.log("dqqdo", "桌面组件被添加") + console.log("桌面组件被添加") } override onDisabled(_context: Context):void{ // Enter relevant functionality for when the last widget is disabled - console.log("dqqdo", "桌面组件被移除") + console.log("桌面组件被移除") } } diff --git a/uni_modules/uts-nativepage/utssdk/app-android/index.uts b/uni_modules/uts-nativepage/utssdk/app-android/index.uts index 43c745b64bfcdd865d8cf99351d392f21edd70f2..dfc3ed2c8b29f23919470bd74947192dcac18b2a 100644 --- a/uni_modules/uts-nativepage/utssdk/app-android/index.uts +++ b/uni_modules/uts-nativepage/utssdk/app-android/index.uts @@ -23,10 +23,7 @@ import { import Service from 'android.app.Service'; import System from 'java.lang.System'; -import Looper from 'android.os.Looper'; -import Class from 'java.lang.Class'; import Exception from 'java.lang.Exception'; -import PackageManager from 'android.content.pm.PackageManager'; import ResolveInfo from 'android.content.pm.ResolveInfo'; import RecyclerView from 'androidx.recyclerview.widget.RecyclerView'; import TextView from 'android.widget.TextView'; @@ -195,9 +192,10 @@ class CustomThread extends Thread{ class FruitAdapter extends RecyclerView.Adapter{ - mFruitList: Array + mFruitList: Array = [] constructor(param:Array){ + super() mFruitList = param } @@ -240,24 +238,24 @@ class DemoActivity extends Activity{ super.onCreate(savedInstanceState) this.setContentView(R.layout.demo_activity); - let btn_start_service_front = findViewById