This means that p.GetApplicationIntent("com.coloros.screenrecorder") returned an uninitialized Intent. Maybe the package name is wrong or there is no "Main" activity defined in that app (not very likely).
Thank you, Erel.
I used a Package name app to get the packname . I also did the following code. It return the name "com.coloros.screenrecorder"
but if unmark the line If appIntent.IsInitialized Then, it'll get nothing back, so it meets the error msg "object should first be Initialized".
Now, is there possibly a thing that I can do to Start this App? Thank you a lot for your help and kindness
-------------------------------------------------------------------------------------------------------------------------
Dim packageList As List = pm.GetInstalledPackages
For i = 0 To packageList.size - 1
Dim packageName As String = packageList.Get(i)
Dim appIntent As Intent
appIntent = pm.GetApplicationIntent(packageName)
'If appIntent.IsInitialized Then
If sAll<>"" Then sAll=sAll & CRLF
sAll=sAll & packageName
If packageName.ToLowerCase.Contains(theName) Then
Return packageName
End If
'End If
Next