Alex Cipcigan Ratiu Alex Cipcigan Ratiu - 1 year ago 39
Android Question

Check if the app was launched by a web browser

I have recently built a custom link and when it's tapped it opens my app. How to check if my app was launched by the custom link?



Check out deep linking on Android:

You can know using Uri data if your Activity has been opened by a custom link.

public void onCreate(Bundle savedInstanceState) {

    Intent intent = getIntent();
    String action = intent.getAction();
    Uri data = intent.getData();