Service not starting
<p>Probably an easy question for you guys, but its my first attempt at creating a service that sould run in the background when my app closes. My problem is: The service doesnt start when i click on my "start service" button. I dont see any of the toast, and nothing in the logcat (no errors either). Thanks in advance!</p>

<p><strong>Service class</strong></p>

<pre><code>public class MyService extends Service {
private static final String TAG = "MyService";

@Override
public IBinder onBind(Intent intent) {
    return null;
}

@Override
public void onCreate() {
    Toast.makeText(this, "My Service Created", Toast.LENGTH_LONG).show();
    Log.d(TAG, "onCreate");

}

@Override
public void onDestroy() {
    Toast.makeText(this, "My Service Stopped", Toast.LENGTH_LONG).show();
    Log.d(TAG, "onDestroy");

}

@Override
public void onStart(Intent intent, int startid) {
    Toast.makeText(this, "My Service Started", Toast.LENGTH_LONG).show();
    Log.d(TAG, "onStart");

}
}
</code></pre>

<p><strong>My main activity</strong></p>

<pre><code>public void startServiceClick(View v){

    Log.d("foo", "onClick: starting srvice");
    startService(new Intent(this, MyService.class));
}

public void stopServiceClick(View v){

    Log.d("foo", "onClick: stopping srvice");
    stopService(new Intent(this, MyService.class));
}
</code></pre>

<p><strong>Manifest xml</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="se.johanberntsson.main"
android:versionCode="1"
android:versionName="1.0" &gt;

&lt;uses-sdk android:minSdkVersion="15" /&gt;
&lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt;
&lt;uses-permission android:name="android.permission.READ_PHONE_STATE"/&gt;
&lt;uses-permission android:name="android.permission.INTERNET"/&gt;
&lt;uses-permission android:name="android.permission.BLUETOOTH"/&gt;

&lt;application
    android:icon="@drawable/maps1"
    android:label="@string/app_name" &gt;
    &lt;uses-library android:name="com.google.android.maps" /&gt;
    &lt;activity
        android:name=".LongitudeActivity"
        android:label="@string/app_name" &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=".DebugActivity" /&gt;
    &lt;activity android:name=".GoogleMapsActivity" /&gt;

    &lt;service android:enabled="true" android:name=".MyService" /&gt;

&lt;/application&gt;

&lt;/manifest&gt;
</code></pre>
