Question

Im trying to create an application. I have launched the default android browser from the main activity using intent as

    Intent i = new Intent();
    i.setAction(Intent.ACTION_VIEW);
    i.setData(Uri.parse("http://www.google.com"));

After launching the browser, I need to customise the browser functionality such that when a user long press or tap the browser window, the current url should be saved as a shortcut in the homescreen. How can I implement this.

Was it helpful?

Solution

Your app can not monitor browser action like long press or tap the browser window. But you can do other way, like implementing "Share action". When user want to create short cut, just tell them to do "Share action". Adding an Easy Share Action

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top