I ran into a problem, I need to determine the availability of the application through the mit app inventor, but I don’t know how.
I do not understand the question... please elaborate...
Taifun
I need to find my second application using the first one. So that you can install it if it's not there.
Something like an update installer.
try the packagemanager extension to find out, if your app is installed App Inventor Extensions: Package Manager | Pura Vida Apps
and read also chapter "Questions and Answers" there
Taifun
Have you tried Using the Activity Starter
## Starting other external apps
You can use the Activity Starter to start any activity at all. You’ll need to know the package name and class name, or the appropriate intent.
Is the application available on the device?*
If your app tries to start other apps, you'll want to check that those other apps are available on your user's phone before trying to start them. You can determine this using the ActivityStarter.ResolveActivity , which returns the name of the Activity that would be started by ActivityStarter.StartActivity, given the package or other information you've provided. If this name is blank, then the required application is not present, and you can make your app alert the user.
Thanks guys, i will use both ways.
Can you give more details? I just didn't get it completely.
Details are in the ActivityStarter link Nikko.
If your second app is made with App Inventor there are detailed explanations in the link. For other apps, you need to know the second app package name and class name which you would have to research.
What have you tried? You need to use the ActivityStarter component.
Unfortunately, it is not that simple in android 11. Google has implemented security and additional permission is required to check if the package is installed.
Yes, I used the ActivityStarter component and only managed to start the application, but I only need to check for the existence of the given application, not start.
I agree, but to find out some things I use an emulator, in my case VPhoneGaGa.
Did you read this?
Is the application available on the device?
If your app tries to start other apps, you'll want to check that those other apps are available on your user's phone before trying to start them. You can determine this using the ActivityStarter.ResolveActivity , which returns the name of the Activity that would be started by ActivityStarter.StartActivity, given the package or other information you've provided. If this name is blank, then the required application is not present, and you can make your app alert the user.
Okay, where to use Activity Starter.ResolveActivity?
I'm just new to this.
Something like
in the ActivityStarter.AfterActivity Block
might work (untested). Did it work for you?
Thanks. I set ActivityPackage, ActivityClass and Did almost everything as in the picture (just changed what happens). The application is simply launched, and nothing happens when it comes back.
Shall I drop blocks and settings?
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.