Alex Cipcigan Ratiu Alex Cipcigan Ratiu - 1 year ago 71
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?


Answer Source

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();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download