code: public static <T extends Callable<?> & Parcelable> Intent foregroundTaskIntent(final Context context,
                                                                                   final String queueName,
                                                                                   final T task,
                                                                                   final int notificationId,
                                                                                   final Notification notification) {
      // It may produce ClassNotFoundException when using custom Parcelable (for example via an AlarmManager).
      // As a workaround pack a Parcelable into an additional Bundle, then put that Bundle into Intent.
      // XXX http://code.google.com/p/android/issues/detail?id=6822
      Bundle taskBundle = new Bundle();
      taskBundle.putParcelable(EXTRA_TASK, task);
      Bundle notificationBundle = new Bundle();
      notificationBundle.putParcelable(EXTRA_NOTIFICATION, notification);
      return new Intent(context, GoroService.class)
          .putExtra(EXTRA_TASK_BUNDLE, taskBundle)
          .putExtra(EXTRA_NOTIFICATION_BUNDLE, notificationBundle)
          .putExtra(EXTRA_QUEUE_NAME, queueName)
          .putExtra(EXTRA_NOTIFICATION_ID, notificationId);
    }
docs: Create an intent that contains a task that should be scheduled
  on a defined queue. The Service will run in the foreground and display notification.
  Intent can be used as an argument for
  {@link android.content.Context#startService(android.content.Intent)}
  or {@link android.content.Context#startForegroundService(Intent)}
  
  @param context context instance
  @param task task instance
  @param queueName queue name
  @param <T> task type
  @param notificationId id of notification for foreground Service, must not be 0
  @param notification notification for foreground Service,
  should be not null to start service in the foreground