Probably because Eclipse is by default setup to build and then launch
your app on the any available targets, which will include your
emulator. So you will maka a change in your code, hit Run, and it will
build the app, deploy it to the emulator, and then automatically
launch your default activity.  This is entirely normal behaviour.

Once you exit your app, then as you say you can go into it again, via
your launcher button, which is what is expected.

So probably you just didn't realise that when you hit Run in Eclipse
it also launches your app after updating it.


On Mar 13, 12:30 am, lakshmi pillai <lakshmip1...@gmail.com> wrote:
> Hi,
>
> I am completely new to android development. So please dumb down your answer
> as much as possible. :)
> I am trying to create a Launcher icon for a mobile website.
> The launcher icon with my website logo should open the site in the default
> web browser.
>
> My code is as follows:
>
> public class Class1 extends Activity {
>     /** Called when the activity is first created. */
>     @Override
>    public void onCreate(Bundle savedInstanceState) {
>     super.onCreate(savedInstanceState);
>     sendTotest();         // Open the browser
>         finish();            // Close this launcher application
>     }
>
>     protected void sendTotest() {
>         String url = "http://www.test.com/";;
>         Intent i = new Intent(Intent.ACTION_VIEW);
>         i.setData(Uri.parse(url));
>         startActivity(i);
>     }
>
> I am still testing this on the emulator.
> Every time I run the app, when i Unlock the emulator or just click on menu,
> the browser is opening with my website url.
> That is without me clicking the launcher icon.
>
> Other than that, the launcher icon is working fine.
> Please help..
>
> TIA.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to