class ParseAnalytics {

  static String getPushHashFromIntent(Intent intent) {
    String pushData = null;
    if (intent != null && intent.getExtras() != null) {
      pushData = intent.getExtras().getString(ParsePushBroadcastReceiver.KEY_PUSH_DATA);
    }
    if (pushData == null) {
      return null;
    }
    String pushHash = null;
    try {
      JSONObject payload = new JSONObject(pushData);
      pushHash = payload.optString("push_hash");
    } catch (JSONException e) {
      PLog.e(TAG, "Failed to parse push data: " + e.getMessage());
    }
    return pushHash;
  }

}