Android Application Crashing
<p>I'm trying to make my application start another class. </p>

<p>What im trying to learn is how to get another class to run in the background - like if the user opens the application, the application stays running.</p>

<p>I thought if I could try to open another class by using an intent, it would work. When i run my application on the emulator, it just crashes... </p>

<p>Here is the opening:</p>

<pre><code>package omg.justry;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;

public class MainActivity extends Activity {

@Override
    //super.onCreate(savedInstanceState);
    //setContentView(R.layout.activity_main);
    public void onCreate(Bundle savedInstanceState) {
        Intent openStartingPoint = new Intent("omg.justtry.PartF**king2");
        startActivity(openStartingPoint);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
}
</code></pre>

<p>Here is the <strong>"PartF**king2"</strong> class:</p>

<pre><code>package omg.justry;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.widget.Toast;

public class PartF**king2 extends Activity{
public void onCreate(Bundle savedInstanceState) {
    Context context = getApplicationContext();
    CharSequence text = "Hello toast!";
    int duration = Toast.LENGTH_SHORT;

    Toast toast = Toast.makeText(context, text, duration);
    toast.show();
}
    }
</code></pre>

<p>The thing is, Eclipse doesn't show any errors. I just exported the app and installed it to the emulator using adb. </p>

<p>I also added the class to the <strong>AndroidManifest</strong> as you see here:</p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="omg.justry"
android:versionCode="1"
android:versionName="1.0" &gt;

&lt;uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" /&gt;

&lt;application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" &gt;
    &lt;activity
    android:name=".MainActivity"
    android:label="@string/title_activity_main" &gt;
    &lt;intent-filter&gt;
    &lt;action android:name="android.intent.action.MAIN" /&gt;

    &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
    &lt;/intent-filter&gt;
    &lt;/activity&gt;
    &lt;activity android:name="PartF**king2"&gt;&lt;/activity&gt;
&lt;/application&gt;
</code></pre>

<p></p>

<p>I think its the manifest now that I look at it but whatever i do, it gets an error or crashes with Eclipse not explaining anything. </p>
