0

I set a break point in the onHandleIntent(Intent intent) and it is never reached... Any ideas

Manifest declaration

 <service android:name=".FeedIntentService" />

IntentService:

public class FeedIntentService  extends IntentService{
    public static final String MSG = "iMSG";
    public static final String TAG = "FeedIntentService";
    public FeedIntentService() {
        super("FeedIntentService");
    }

    @Override
    public void onCreate(){
        super.onCreate();
    }

    @Override
    public void onDestroy(){
        super.onDestroy();
    }

    @Override 
    protected void onHandleIntent(Intent intent){

        String msg = intent.getStringExtra(MSG);
        Log.i(TAG, msg);
        //Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();
    }
}

Call of service from MainActivity:

Intent serviceIntent = new Intent(thisActivity,FeedIntentService.class);
          serviceIntent.putExtra(FeedIntentService.MSG,"YEEEET");
          startService(serviceIntent);
Fabii
  • 3,820
  • 14
  • 51
  • 92
  • may be this is useful? (not overriding onStartCommand) http://stackoverflow.com/questions/15755785/android-java-intentservice-onhandleintent-does-not-get-called – fersarr Apr 04 '14 at 03:48
  • @fersarr No dice, still same issue. – Fabii Apr 04 '14 at 03:53

1 Answers1

0

The issue was with the package name:

Instead of :

<service android:name=".FeedIntentService"></service>

I needed :

<service android:name="com.android.service.FeedIntentService"></service>
Fabii
  • 3,820
  • 14
  • 51
  • 92