urbanairship-core/src/main/java/com/urbanairship/iam/InAppRemoteDataObserver.java
void subscribe(final RemoteData remoteData, final InAppMessageScheduler scheduler) {
        cancel();

        this.subscription = remoteData.payloadsForType(IAM_PAYLOAD_TYPE)
                                      .filter(new Predicate<RemoteDataPayload>() {
                                          @Override
                                          public boolean apply(RemoteDataPayload payload) {
                                              return payload.getTimestamp() != preferenceDataStore.getLong(LAST_PAYLOAD_TIMESTAMP_KEY, -1);
                                          }
                                      })
                                      .subscribe(new Subscriber<RemoteDataPayload>() {
                                          @Override
                                          public void onNext(RemoteDataPayload payload) {
                                              try {
                                                  processPayload(payload, scheduler);
                                                  Logger.debug("InAppRemoteDataObserver - Finished processing messages.");
                                              } catch (Exception e) {
                                                  Logger.error("InAppRemoteDataObserver - Failed to process payload: ", e);
                                              }
                                          }
                                      });
    }
/**
     * Subscribes to remote data.
     *
     * @param remoteData The remote data.
     * @param scheduler Scheduler.
     */
Subscribes to remote data.
@param remoteData The remote data.
@param scheduler Scheduler.
Subscribes to remote data . @param remoteData The remote data . @param scheduler Scheduler .
void subscribe(final RemoteData remoteData, final InAppMessageScheduler scheduler) {
        cancel();
        this.subscription = remoteData.payloadsForType(IAM_PAYLOAD_TYPE)
                                      .filter(new Predicate<RemoteDataPayload>() {
                                          @Override
                                          public boolean apply(RemoteDataPayload payload) {
                                              return payload.getTimestamp() != preferenceDataStore.getLong(LAST_PAYLOAD_TIMESTAMP_KEY, -1);
                                          }
                                      })
                                      .subscribe(new Subscriber<RemoteDataPayload>() {
                                          @Override
                                          public void onNext(RemoteDataPayload payload) {
                                              try {
                                                  processPayload(payload, scheduler);
                                                  Logger.debug("InAppRemoteDataObserver - Finished processing messages.");
                                              } catch (Exception e) {
                                                  Logger.error("InAppRemoteDataObserver - Failed to process payload: ", e);
                                              }
                                          }
                                      });
    }
void subscribe ( final RemoteData remoteData , final InAppMessageScheduler scheduler ) { cancel ( ) ; this . subscription = remoteData . payloadsForType ( IAM_PAYLOAD_TYPE ) . filter ( new Predicate < RemoteDataPayload > ( ) { @ Override public boolean apply ( RemoteDataPayload payload ) { return payload . getTimestamp ( ) != preferenceDataStore . getLong ( LAST_PAYLOAD_TIMESTAMP_KEY , - 1 ) ; } } ) . subscribe ( new Subscriber < RemoteDataPayload > ( ) { @ Override public void onNext ( RemoteDataPayload payload ) { try { processPayload ( payload , scheduler ) ; Logger . debug ( "InAppRemoteDataObserver - Finished processing messages." ) ; } catch ( Exception e ) { Logger . error ( "InAppRemoteDataObserver - Failed to process payload: " , e ) ; } } } ) ; }
Subscribes to remote data.
Subscribes to remote data .