3

I have a client who simply needs a link installed on their Android. I need to create an APK file for them to navigate to on their phone. Then, when clicked, needs to simply install a link icon on their phone's desktop. After install, the new icon link needs to link to a url I declare in the APK file. I'm sure this is very simple but I'm new to Android SDK and my client is in a jam... any help is MUCH appreciated!

Dan Gibson
  • 151
  • 2
  • 2
  • 7

4 Answers4

3

If all you really want to do is add a link to a URL on the home screen then you might want to consider just adding a bookmark to the home screen instead of creating an Android app. Google "android bookmark home screen" and you will get the instructions such as this, http://philwilson.org/blog/2010/01/adding-a-bookmark-to-an-android-home-screen.

If you actually do want to proceed with writing an Android app for some reason then what you need to do is create one single Activity with a WebView control on it. Then you just load your URL using the loadUrl method of WebView. See the sample code on this link, http://developer.android.com/reference/android/webkit/WebView.html.

WebView webview = new WebView(this);
setContentView(webview);
webview.loadUrl("http://slashdot.org/");
Matt Accola
  • 3,980
  • 4
  • 26
  • 37
1

There are many existing questions that basically address this. All you're looking to do is start the browser. Take a look at this question: How can I open a URL in Android's web browser from my application?

As for when to do that, you want to do it at launch. Since ALL you want to do is launch this URL, you'll want to use an AliasActivity.

Community
  • 1
  • 1
kabuko
  • 35,009
  • 7
  • 75
  • 92
0

You can directly get an apk file for any url using this website http://www.appsgeyser.com/ No code will be generated. only apk file will be generated which can be installed on a device.

Swathi
  • 142
  • 1
  • 3
  • 6
0

You can create a basic app using Eclipse with the ADK plugin.

For the code you can simply add something such as:

public class MyApp extends Activity {

WebView wb;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main );
    wb = new WebView(this);
    wb.loadUrl("http://www.link.com");
    setContentView(wb);
}
}

Once installed you can just drag the icon onto the main screen.

Brent Hacker
  • 374
  • 2
  • 8
  • 26