0

I created a chrome shortcut for a specific page using "Add to home screen". How can I run/start this shortcut from my app?

a fair player
  • 10,061
  • 9
  • 39
  • 46
  • If chrome is default browser you can use http://stackoverflow.com/questions/2201917/how-can-i-open-a-url-in-androids-web-browser-from-my-application – Tapa Save Sep 04 '14 at 08:35
  • @TapaSave I'm using android 4.4.2 ... if I open the browser, the domain area will be shown but, if I open the shortcut it'll be full screen and that's what I want. – a fair player Sep 04 '14 at 08:39
  • but apart from this ... is there a way to target a specific shortcut? – a fair player Sep 04 '14 at 08:45

2 Answers2

0

I understand that you're looking to use Chrome, as per the shortcut, but if you're not looking to use intents, could you perhaps use a Webview to embed the URL / intent in? This will also hide the domain information and such.

Narstyle
  • 1
  • 2
0

To open a URL/website you do the following:

String url = "http://www.example.com";
Intent mIntent = new Intent(Intent.ACTION_VIEW);
mIntent.setData(Uri.parse(url));
startActivity(mIntent);

Here's the documentation of Intent.ACTION_VIEW.

Now if chrome is installed on the device the device will show option for default browser and chrome.

Sagar Pilkhwal
  • 5,825
  • 2
  • 24
  • 76