In-app browser / Non-app browser

  1. last year

    Hi have a good day,
    When the button is clicked in the application, I want to direct it to my other applications. But when I click the button, the links are always opened within the application no matter what I do. For example, is there a way to make it open in the Play Store (system default) when I click the button?

    Thanks

  2. Hello!

    To open a link outside of your application, you can use an intent with the ACTION_VIEW action and a URI pointing to the destination application. In your case, to open a link in the Play Store app, you can use the URI "market://details?id=[package_name]" where [package_name] is the package name of the app you want to open in the Play Store.

    Here's an example of how to open a link in the Play Store app:

    scss
    Copy code
    Uri uri = Uri.parse("market://details?id=com.example.package");
    Intent intent = new Intent(Intent.ACTION_VIEW, uri);
    startActivity(intent);
    In this example, "com.example.package" is the package name of the app you want to open in the Play Store. When you call startActivity() with this intent, the Play Store app will be launched and the app's details page will be displayed.

    I hope this helps!

  3. 7 months ago

    [deleted]

    26 Oct 2023
    Deleted 7 months ago by admin
  4. 6 months ago

    [deleted]

    22 Nov 2023
    Deleted 6 months ago by admin
  5. [deleted]

    30 Nov 2023
    Deleted 5 months ago by admin
 

or Sign Up to reply!