Intent Service not called
<p>Here is my service class</p>

<pre><code>package com.example.com.listener;

import android.app.DownloadManager;
import android.app.IntentService;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
import android.widget.Toast;

import com.android.volley.Request;
import com.google.android.gms.gcm.GoogleCloudMessaging;
import com.google.android.gms.iid.InstanceID;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import com.example.com.R;
import com.example.com.listener.GCMRegistrationListener;
import com.example.com.util.Constants;
import com.example.com.web.RawRequest;
import com.example.com.web.WebRequest;

public class GCMRegistrationService extends IntentService{

    private static final String TAG = "GCMRegistrationService";
    private static final String[] TOPICS = {"global"};

    public GCMRegistrationService() {
        super(TAG);
    }

    @Override
    protected void onHandleIntent(Intent intent) {
        SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);

        try {

            InstanceID instanceID = InstanceID.getInstance(this);
            String token = instanceID.getToken(getString(R.string.gcm_defaultSenderId), GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);
            sendRegistrationToServer(token,sharedPreferences.getString(Constants.EMAIL_SHARED_PREF,""));
            Toast.makeText(this,"This is your token " + token,Toast.LENGTH_LONG).show();
            Log.i("token", token);
            // You should store a boolean that indicates whether the generated token has been
            // sent to your server. If the boolean is false, send the token to your server,
            // otherwise your server should have already received the token.
            sharedPreferences.edit().putBoolean(Constants.GCM_TOKEN_TO_SERVER, true).apply();
            // [END register_for_gcm]
        } catch (Exception e) {
            Log.d(TAG, "Failed to complete token refresh", e);
            // If an exception happens while fetching the new token or updating our registration data
            // on a third-party server, this ensures that we'll attempt the update at a later time.
            sharedPreferences.edit().putBoolean(Constants.GCM_TOKEN_TO_SERVER, false).apply();
        }
    }

    /**
     * Persist registration to third-party servers.
     *
     * Modify this method to associate the user's GCM registration token with any server-side account
     *
     * @param token The new token.
     */
    private void sendRegistrationToServer(String token,String email) {
        WebRequest request= new RawRequest(this,Constants.SEND_GCM_TOKEN, Request.Method.POST);
        Map&lt;String,String&gt; requestParams= new HashMap&lt;&gt;();
        requestParams.put(Constants.GCM_TOKEN_LABEL,token);
        requestParams.put(Constants.EMAIL_SHARED_PREF,email);
        request.sendRequest(new GCMRegistrationListener(), requestParams, null);

    }

}
</code></pre>

<p>Here is the code I used to start the service:</p>

<pre><code>Intent gcmRegister= new Intent(context,GCMRegistrationService.class);
                 context.startService(gcmRegister);
</code></pre>

<p>Manifest file entry is:
    Manifest package is com.example.com</p>

<p>and service entry is </p>

<pre><code> &lt;service android:name=".listener.GCMRegistrationService" android:exported="false" /&gt;
</code></pre>

<p>Unfortunately my service is not running. Please help. </p>