创建Android应用程序,作为快捷方式,我们的移动网站 [英] Create Android App That Acts As A Shortcut To Our Mobile Site

查看:119
本文介绍了创建Android应用程序,作为快捷方式,我们的移动网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有专门的手机版我们网站,我们希望推动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.

谢谢, 约拿

推荐答案

这是可能的,相当容易的。

This is possible and fairly easy.

您的应用程序将是一个单独的活动。这项活动将创建一个基于信息这里对谷歌的意图了新的意图。中的意图将是类型VIEW_ACTION和你给它一个URL作为值。然后,你会简单地做:

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); 
}

演习剩下的就是包装,与AndroidManifest.xml中,并把它推向市场。

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

另一种方法是提供一个web视图,但,这就是pretty的毫无意义的,如果你的网站的目的是在移动浏览器中已经发挥作用。

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

这篇关于创建Android应用程序,作为快捷方式,我们的移动网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆