Android App - disappearance of app GUI

Posted by Radek Šimko on Stack Overflow See other posts from Stack Overflow or by Radek Šimko
Published on 2010-06-02T09:22:14Z Indexed on 2010/06/02 9:23 UTC
Read the original article Hit count: 284

Filed under:
|

I'm trying to create a simple app, whose main task is to open the browser on defined URL. I've created first Activity:

public class MyActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //setContentView(R.layout.main);

    Intent myIntent = new Intent(Intent.ACTION_VIEW,
            Uri.parse("http://my.url.tld"));
    startActivity(myIntent);
}

Here's my AndroidManifest.xml:

<manifest ...>
    <application ...>
        <activity android:name=".MyActivity" ...>
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>

This code is fully functional, but before it opens the browser, it displays a black background - blank app GUI. I didn't figured out, how to go directly do the browser (without displaying the GUI).

Anyone knows?

© Stack Overflow or respective owner

Related posts about android

Related posts about android-sdk