diff --git a/docs/uts/utsandroid.md b/docs/uts/utsandroid.md index 3fabf6035debc4752963a3a033400e75318d3208..cdb5d43af2a0680c8dd8a9a11852527693896dc3 100644 --- a/docs/uts/utsandroid.md +++ b/docs/uts/utsandroid.md @@ -521,6 +521,20 @@ context.startActivity(intent); +```uts +export function getJavaClassTest() : boolean { + let dispatcherClass = UTSAndroid.getJavaClass(UTSAndroid.getDispatcher()) + if("io.dcloud.uts.task.UTSTaskDispatcher" == dispatcherClass.name){ + return true + } + let applicationClass = UTSAndroid.getJavaClass(UTSAndroid.getAppContext()!) + if("io.dcloud.uniapp.UniApplication" == applicationClass.name){ + return true + } + return false +} +``` + ### getTopPageActivity