Hello all,
I've been using this code in order to load other apps, and it works great for the most part.
Until you try to load an application that is not installed on the device, then it throws an error. At that point, I'd like to route the user to the Google Play Store to install the application, and I can easily get them to the Play Store app with this code:
That works to open the Play Store app, but I have been unable to locate any instructions regarding how to use B4A to tell the Play Store to search for the desired app. I have found Java-specific instructions, but haven't been able to re-write those so that they will work in B4A.
Does anyone know how to do this?
Thank you!
I've been using this code in order to load other apps, and it works great for the most part.
B4X:
Dim pm As PackageManager
StartActivity(pm.GetApplicationIntent("your.other.app.package.name"))
Until you try to load an application that is not installed on the device, then it throws an error. At that point, I'd like to route the user to the Google Play Store to install the application, and I can easily get them to the Play Store app with this code:
B4X:
Dim pm As PackageManager
Try
StartActivity(pm.GetApplicationIntent("your.other.app.package.name"))
Catch
StartActivity(pm.GetApplicationIntent("com.android.vending"))
End Try
That works to open the Play Store app, but I have been unable to locate any instructions regarding how to use B4A to tell the Play Store to search for the desired app. I have found Java-specific instructions, but haven't been able to re-write those so that they will work in B4A.
Does anyone know how to do this?
Thank you!