JobInvocation decodeIntentBundle(@NonNull Bundle bundle) {
    if (bundle == null) {
      Log.e(TAG, "Unexpected null Bundle provided");
      return null;
    }

    Bundle taskExtras = bundle.getBundle(GooglePlayJobWriter.REQUEST_PARAM_EXTRAS);
    if (taskExtras == null) {
      return null;
    }

    JobInvocation.Builder builder = decode(taskExtras);

    List<Uri> triggeredContentUris =
        bundle.getParcelableArrayList(BundleProtocol.PACKED_PARAM_TRIGGERED_URIS);
    if (triggeredContentUris != null) {
      builder.setTriggerReason(new TriggerReason(triggeredContentUris));
    }
    return builder.build();
  }
JobCoder is a tool to encode and decode JobSpecs from Bundles.
jobdispatcher/src/main/java/com/firebase/jobdispatcher/JobCoder.java