my Main app want to start an second app and after few seconds automatiquely comme back to foreground
I found a solution to make it works, but it's not very clean: it seems the problem is my first app can't lanch itself...so it lanch a third app and this one lanch main one...
True, I checked it on Android 14. I have no idea why it only works on Android < 14 and I seem to be not the only one when searching the web for explanations/solutions.
There were some method deprecation in package manager on Android 14.
android.content.pm.PackageManager$NameNotFoundException: appinventor.ai_bodymindpower.app2
at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:568)
at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:551)
at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:545)
at com.sunny.PkgUtils.PkgUtils.IsAppInstalled(Unknown Source:7)
at com.sunny.PkgUtils.PkgUtils.LaunchApp(Unknown Source:0)