Android Open an app from another by link and with passing parameters

Asked

Viewed 2,260 times

0

We are developing an App that will be a Store and will be responsible for the login and authentication of the user (a token will be generated every time the Store is opened and the user’s credentials are placed).

The idea is that when the user opens the Store, log in and this authentication (token) is saved locally and when calling an application, it is passed as parameter pro next application.

If the user opens an already installed application, it must call the Store, log in and the previous application is called again only this time with the authentication parameters.

We saw that it is possible to make this call from one app to another by passing parameters in a custom URL on iOS. However we could not check a similar solution on Android. There is some native way to do this on Android?

1 answer

0


To pass parameters to the new application, you create a new Intent and pass the parameters map

Intent appIntent = new Intent(this, NewActivityClassName.class);
appIntent.putExtra("nomePrimeiraChave","valorPrimeiraChave");
appIntent.putExtra("nomeSegundaChave","valorSegundaChave");
startActivity(appIntent);
  • But this way you call an Intent, not another App with these parameters, correct?

  • 1

    On Android you start a new APP via Intent.

  • I wanted a call solution via link as Ios, but apparently it has to be a solution for each platform. The idea was to build hybrids using the same call pattern as other apps natively.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.