Can two or more classes send data to the same IntentService? <p>I'm a beginner in Android programming, and I was reading about handling time consuming operations via IntentServices. However, I have this doubt - </p> <p>Can I have two classes (say A and B) issuing a call to the same class (C) extending the IntentService? Is this possible and/or safe?</p> <p>If so, how do I help the IntentService differentiate between the two calling classes?</p> <p>I was thinking of this way:</p> <pre><code>public class DoSomething extends IntentService{ @Override public void onHandleIntent(Intent intent){ Bundle data = intent.getExtras(); String type = data.getString("TagForClass"); if(type.equals("TagForClassA")){ //Do operations for Class A } else if(type.equals("TagForClassB")){ //Do operations for Class B } } } </code></pre> <p>Will this method work?</p>