Button click, another app open?

how to make a button click process when button click app checks for another app, it another app installs than open it otherwise go to another app’s play store page? how to do it please someone tells me I am new at kodular.

for example
button click, first check WhatsApp installed or not
and if it is installed then open it
if it is not installed then go to play store where the user can install it.

how to do it.
please tell me anyone please

1 Like

Read this :

Starting Other App Inventor Applications

You can use the Activity Starter to start another app that was created with App Inventor. This is similar to using OpenAnotherScreen in multiple screen applications, except that now we’re dealing with two separate applications rather than two screens within a single application. To open the other application, you need to know its package name and class name. If you have the source code of the App Inventor app (aia file), you can find these names as follows:

  1. Download the source code to your computer.
  2. Using a file explorer or unzip utility, find the file called youngandroidproject/project.properties .
  3. The first line will start with " main= ". Everything after that is the package and class name.

For example, here is a first line you might see for an App named HelloPurr.

main=appinventor.ai_ElsaArendelle.HelloPurr

The ElsaArendelle part of the name comes from the App Inventor user account.

To start this app, you would use an activity starter component and set these properties:

ActivityPackage: appinventor.ai_ElsaArendelle.HelloPurr

ActivityClass: appinventor.ai_ElsaArendelle.HelloPurr.Screen1

Invoking the activity starter’s StartActivity method will start HelloPurr. When HelloPurr finishes (if it does), the original app’s AfterActivity method will be invoked.

If you are going to start another App Inventor app, make sure you use the correct package name. For example, if someone posts the source code (aia file) for an app, and you repackage that app, you’ll end up with a different package name than the original.

Starting a Built-in Android Application from your App Inventor App

Apps that come built in with the Android device can be invoked “explicitly” by using package names and class names, as above. They can also be started “implicitly” by specifying an Action, in which case the Android operating system can figure out which actual application to start. The information used to start an app is called an intent, and the process for determining which application to start is called intent resolution. You can find information about intents in the Android system documentation on intents and intent filters.

Some apps are designed to accept extra information when they are launched. For example, the Android Map activity can accept geographic information that specifies a location to display. You must consult the documentation for the particular app to learn what this extra information is and how to specify it. You can also find information on Android Common Intents for Google Android applications available on most device.

Generally, you specify the information by setting the ActivityStarter’s properties just before the you launch the other app with StartActivity. You can set these in App Inventor using the ActivityStarter propertiesDataType and DataURI. There is also an Extras property that takes a list of keys and values and specifies the property values for the corresponding keys. The particular values you have to set depend on the activity you want to launch.

Here are some examples.

Warning: The values in these examples depend on the version of the Android operating system on the app user’s device. If you are creating an app that will be used on many different devices, you can run the ActivityStarter.ResolveActivity command to test whether the activity you need is supported on the user’s device and generate an appropriate error message if it is not supported.

http://ai2.appinventor.mit.edu/reference/other/activitystarter.html

If this helped don’t forget to mark it as the solution

1 Like

i dont understand, please show me in blocks.
I know you guys might have your work to do but please let me learn this.
please tell me which blocks combination should I use to archive this.

See this. It’s mentioned clearly, I’ll try to make an aia but see if you understand

2 Likes
  1. Download AIA.
  2. Extract it using WINRAR or 7ZIP.
  3. Go to “youngandroidproject” and open “project.properties
  4. You will see :arrow_heading_down:
  1. Copy line after “main=”

  2. Paste it in “Activity Class” of “Activity Starter

  3. Put this in “Action” of “Activity Starter:arrow_heading_down:
    android.intent.action.MAIN

  4. Enter your “Package Name” in “Activity Package” of “Activity Starter

You are done now :+1:

4 Likes

thanks friends

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.