Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create Android App That Acts As A Shortcut To Our Mobile Site

Tags:

android

We have a special mobile version of our site that we would like to promote in the android marketplace. The "app" would effectively be a shortcut to the website, but you would be able to download it and have an icon for it, just like any other app.

Is this possible? If so, can you link me to instructions? I was not able to find any info searching google.

Thanks, Jonah

like image 530
Jonah Avatar asked Mar 04 '11 22:03

Jonah


1 Answers

This is possible and fairly easy.

Your application would be a single Activity. That activity would create a new intent based on the info here on the google intents. The intent would be of type VIEW_ACTION and you'd give it an url as a value. Then you'd simply do:

onCreate(Bundle bundle){
 Intent myIntent = new Intent(Intent.VIEW_ACTION, Uri.parse("http://www.google.com"));
 startActivity(myIntent); 
}

The rest of the exercise is just wrapping that with the AndroidManifest.xml and putting it into the market.

The alternative would be to provide a webview, but, thats pretty pointless if your website is designed to function in a mobile browser already.

like image 116
Nick Campion Avatar answered Sep 28 '22 05:09

Nick Campion