Determines whether this Intent is a push notification sent from Apptentive.

@param intent The received {@link Intent} you received in your BroadcastReceiver.
@return True if the Intent came from, and should be handled by Apptentive.
335827
public static boolean isApptentivePushNotification(Intent intent) {
		try {
			if (!ApptentiveInternal.checkRegistered()) {
				return false;
			}
			return ApptentiveInternal.getApptentivePushNotificationData(intent) != null;
		} catch (Exception e) {
			ApptentiveLog.e(PUSH, e, "Exception while checking for Apptentive push notification intent");
			logException(e);
		}
		return false;
	}
174529
public boolean isMessagingEngine () {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "isMessagingEngine");

    boolean rc = (this instanceof MessagingEngine);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "isMessagingEngine", Boolean.valueOf(rc));
    return rc;
  }
1160571
@Override
    public void onReceive(Context context, Intent intent) {
        // display errors to the user
        Bundle bundle = intent.getExtras();
        if (intent.getAction().equals(DDPStateSingleton.MESSAGE_ERROR)) {
            String message = bundle
                    .getString(DDPStateSingleton.MESSAGE_EXTRA_MSG);
            onError("Login Error", message);
        } else if (intent.getAction().equals(
                DDPStateSingleton.MESSAGE_CONNECTION)) {
            int state = bundle.getInt(DDPStateSingleton.MESSAGE_EXTRA_STATE);
            if (state == DDPStateSingleton.DDPSTATE.Closed.ordinal()) {
                // connection was closed, show error message
                onError("Disconnected",
                        "Websocket to server was closed");
            } else if (state == DDPStateSingleton.DDPSTATE.Connected.ordinal()) {
                onDDPConnect(mDDP);
            } else if (state == DDPStateSingleton.DDPSTATE.LoggedIn.ordinal()) {
                onLogin();
            } else if (state == DDPStateSingleton.DDPSTATE.NotLoggedIn.ordinal()) {
                onLogout();
            }
        } else if (intent.getAction().equals(
                DDPStateSingleton.MESSAGE_SUBUPDATED)) {
            String subscriptionName = bundle
                    .getString(DDPStateSingleton.MESSAGE_EXTRA_SUBNAME);
            String changeType =
            bundle.getString(DDPStateSingleton.MESSAGE_EXTRA_CHANGETYPE);
            String docId = bundle.getString(DDPStateSingleton.MESSAGE_EXTRA_CHANGEID);
            onSubscriptionUpdate(changeType, subscriptionName, docId);
        }
    }
821039
public boolean isMaintenanceModeEnabled(String appName) {
        App app = connection.execute(new AppInfo(appName), apiKey);
        return app.isMaintenance();
    }
1142154
public static boolean isMessagingEngine (byte[] b) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "isMessagingEngine", new Object[]{ b });

    boolean rc = false;

    if (b.length > 0) {
      rc = (b[0] == MESSAGINGENGINE);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "isMessagingEngine", Boolean.valueOf(rc));
    return rc;
  }
1155788
@Override
    public boolean isPushSupported() {

        // Find the existing H2 connection and stream so we can use them to send the
        // push_promise frame to the client.
        HttpInboundServiceContext isc = (HttpInboundServiceContext) getServiceContext();
        HttpInboundLink link = ((HttpInboundServiceContextImpl) isc).getLink();

        if (!(link instanceof H2HttpInboundLinkWrap)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "HTTPRequestMessageImpl.isPushSupported(): Error: This is not an HTTP2 connection, push() was ignored.");
            }
            return false;
        }

        if ((((H2HttpInboundLinkWrap) link).muxLink == null) ||
            (((H2HttpInboundLinkWrap) link).muxLink.getRemoteConnectionSettings() == null)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "HTTPRequestMessageImpl.isPushSupported(): The H2HttpInboundLinkWrap muxlink is null, push() was ignored.");
            }
            return false;
        }

        // If the link is closing, don't bother
        //if (((H2InboundLink) link).linkStatus == LINK_STATUS.CLOSING) {
        //    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
        //        Tr.debug(tc, "HTTPRequestMessageImpl.pushNewRequest(): Link is closing, push() was ignored.");
        //    }
        //    return false;
        // }

        // Don't send the push_promise frame if the client doesn't want it
        if (((H2HttpInboundLinkWrap) link).muxLink.getRemoteConnectionSettings().getEnablePush() != 1) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "HTTPRequestMessageImpl.isPushSupported(): The client does not accept push_promise frames, push() was ignored.");
            }
            return false;
        }

        return true;
    }
574562
public boolean isDelivered()
  {
    if (tc.isEntryEnabled()) 
      SibTr.entry(tc, "isDelivered");
      
    boolean delivered = aiValueTick.isDelivered();
    
    if (tc.isEntryEnabled()) 
      SibTr.exit(tc, "isDelivered", Boolean.valueOf(delivered));
    return delivered;
  }
418391
public boolean isCommitted() {
		//the message is an incoming request for which a final response has been generated
		if(getTransaction() instanceof ServerTransaction &&
				(RoutingState.FINAL_RESPONSE_SENT.equals(routingState) || isFinalResponseGenerated)) {
			return true;
		}
		//the message is an outgoing request which has been sent
		if(getTransaction() instanceof ClientTransaction && this.isMessageSent) {
			return true;
		}
		/*
		if(Request.ACK.equals((((Request)message).getMethod()))) {
			return true;
		}*/
		return false;
	}
1235308
protected Intent getServiceIntent() {
        final Intent intent = new Intent(GooglePlay.VENDING_ACTION);
        intent.setPackage(GooglePlay.ANDROID_INSTALLER);
        return intent;
    }
547567
private void checkUndefinedNotification(Notification notification) {
        String type = notification.getType();
        PathAddress source = notification.getSource();
        Map<String, NotificationEntry> descriptions = getRootResourceRegistration().getNotificationDescriptions(source, true);
        if (!descriptions.keySet().contains(type)) {
            missingNotificationDescriptionWarnings.add(ControllerLogger.ROOT_LOGGER.notificationIsNotDescribed(type, source));
        }
    }
388934
@SuppressWarnings({"unused", "WeakerAccess"})
    public void pushNotificationViewedEvent(Bundle extras){

        if (extras == null || extras.isEmpty() || extras.get(Constants.NOTIFICATION_TAG) == null) {
            getConfigLogger().debug(getAccountId(), "Push notification: " + (extras == null ? "NULL" : extras.toString()) + " not from CleverTap - will not process Notification Viewed event.");
            return;
        }

        if (!extras.containsKey(Constants.NOTIFICATION_ID_TAG) || (extras.getString(Constants.NOTIFICATION_ID_TAG) == null)) {
            getConfigLogger().debug(getAccountId(), "Push notification ID Tag is null, not processing Notification Viewed event for:  " + extras.toString());
            return;
        }

        // Check for dupe notification views; if same notficationdId within specified time interval (2 secs) don't process
        boolean isDuplicate = checkDuplicateNotificationIds(extras, notificationViewedIdTagMap, Constants.NOTIFICATION_VIEWED_ID_TAG_INTERVAL);
        if (isDuplicate) {
            getConfigLogger().debug(getAccountId(), "Already processed Notification Viewed event for " + extras.toString() + ", dropping duplicate.");
            return;
        }

        JSONObject event = new JSONObject();
        try {
            JSONObject notif = getWzrkFields(extras);
            event.put("evtName", Constants.NOTIFICATION_VIEWED_EVENT_NAME);
            event.put("evtData", notif);
        } catch (Throwable ignored) {
            //no-op
        }
        queueEvent(context, event, Constants.RAISED_EVENT);
    }
351688
final void launchIntent(Intent intent) {
    try {
      rawLaunchIntent(intent);
    } catch (ActivityNotFoundException ignored) {
      AlertDialog.Builder builder = new AlertDialog.Builder(activity);
      builder.setTitle(R.string.app_name);
      builder.setMessage(R.string.msg_intent_failed);
      builder.setPositiveButton(R.string.button_ok, null);
      builder.show();
    }
  }
530271
@Override
    public void onReceive(Context context, Intent intent) {
        String messageId = intent.getStringExtra(ID);
        MFPPush.getInstance().changeStatus(messageId, MFPPushNotificationStatus.DISMISSED);
    }
683826
@Override
  public void onMessageReceived(RemoteMessage remoteMessage) {
    Map<String, String> data = remoteMessage.getData();
    if (null == data) {
      return;
    }
    LOGGER.d("received message from: " + remoteMessage.getFrom() + ", payload: " + data.toString());
    try {
      JSONObject jsonObject = JSON.parseObject(data.get("payload"));
      if (null != jsonObject) {
        String channel = jsonObject.getString("_channel");
        String action = jsonObject.getString("action");

        AndroidNotificationManager androidNotificationManager = AndroidNotificationManager.getInstance();
        androidNotificationManager.processGcmMessage(channel, action, jsonObject.toJSONString());
      }
    } catch (Exception ex) {
      LOGGER.e("failed to parse push data.", ex);
    }
  }
317110
public synchronized void postNotification(final String name, final Map<String, Object> userInfo) {
		ApptentiveLog.v(NOTIFICATIONS, "Post notification: name=%s userInfo={%s}", name, StringUtils.toString(userInfo));

		final ApptentiveNotificationObserverList list = findObserverList(name);
		if (list != null) {
			list.notifyObservers(new ApptentiveNotification(name, userInfo));
		}
	}
306738
public static Bundle getAppLinkExtras(Intent intent) {
    Bundle appLinkData = getAppLinkData(intent);
    if (appLinkData == null) {
      return null;
    }
    return appLinkData.getBundle(KEY_NAME_EXTRAS);
  }
927299
@Override
	public final boolean packetReceived(AbstractPacket packet)
    {
        if (packet.getType() == PacketType.NOTIFICATION)
        {
            final NotificationPacket notifPacket = (NotificationPacket)packet;
            final AbstractMessage prefetchedMessage = notifPacket.getMessage();
            
            boolean acceptedByConsumer = false;
                
    		AbstractSession session = lookupRegisteredSession(notifPacket.getSessionId());
            if (session != null)
            {                   
                RemoteMessageConsumer consumer = (RemoteMessageConsumer)session.lookupRegisteredConsumer(notifPacket.getConsumerId());
                if (consumer != null)		
                    acceptedByConsumer = consumer.addToPrefetchQueue(prefetchedMessage,notifPacket.isDonePrefetching());
                else
                	log.debug("#"+id+" No such consumer : #"+notifPacket.getSessionId()+":"+notifPacket.getConsumerId()); // Consumer was concurrently closed or not yet registered
            }
            else
            	log.debug("#"+id+" No such session : #"+notifPacket.getSessionId()); // Session was concurrently closed
            
            // If the consumer was already gone, we need to rollback the prefetched message on the server side
            if (!acceptedByConsumer)
                scheduleRollback(notifPacket.getSessionId(),
                		         notifPacket.getConsumerId(),
                		         prefetchedMessage);
            
            return true;
        }
        
        if (packet.getType() == PacketType.R_PING)
        	return true;
        
        // Standard response, route to target endpoint
        transportHub.routeResponse((AbstractResponsePacket)packet);
        
        return true;
    }