How to detect if one of my apps is already installed on the device?

I was doing it with the following code:

in which I used “display.newImage(“”…PackageName)” to find out if the app existed, but in android 13 that doesn’t work for me

function libreriasUI:AppInstalada(PackageName)
	local appIcon = display.newImage(""..PackageName)
	if appIcon then
	   -- App is installed.
	   appIcon.isVisible = false
	   return true
	   -- App is not installed.
	   return false

I’ve never tried to do this procedure, but wouldn’t it be easier to list the names of installed apps and check if yours exists? maybe trying to get the icon image, doesn’t have permission on android.

That still works, but you now need to add the PackageName of each app you want to query in the build.settings file.

android =
  manifestChildElements =
                <package android:name="PackageName here inside the quotes" />

Great, it worked!
thank you