在我的GcmIntentService中收到GCM Intent后,我正在构建推送通知,我必须将特定的Activity设置为EventListener。
public class GcmIntentService extends IntentService {
@Override
protected void onHandleIntent(final Intent intent) {
//This code gets triggered, what to add here
// to make SomeActivity's onEvent get triggered
}
}
public interface EventListener {
int onEvent(Event event);
}
public class SomeActivity extends Activity implements EventListener {
@Override
public int onEvent(Event event) {
}
}