Gets the current registration ID for application on GCM service, if there is one.
<p/>
If result is empty, the app needs to register.

@return registration ID, or empty string if there is no existing
registration ID.
338940
public static String getRegistrationId(Context context) {
        final SharedPreferences prefs = getGcmPreferences(context);
        final String registrationId = prefs.getString(PROPERTY_REG_ID, "");
        if (registrationId.isEmpty()) {
            Logger.d("Registration not found.");
            return "";
        }
        // Check if app was updated; if so, it must clear the registration ID
        // since the existing regID is not guaranteed to work with the new
        // app version.
        final int registeredVersion = prefs.getInt(PROPERTY_APP_VERSION, Integer.MIN_VALUE);
        final int currentVersion = GcmUtils.getAppVersion(context);
        if (registeredVersion != currentVersion) {
            Logger.d("App version changed.");
            return "";
        }
        return registrationId;
    }
1153179
public ApplicationID getApplicationID() throws IOException {
    final String url = "ws/v1/cluster/apps/new-application";
    final HttpPost post = preparePost(url);
    try (final CloseableHttpResponse response = this.httpClient.execute(post, this.httpClientContext)) {
      final String message = IOUtils.toString(response.getEntity().getContent());
      final ApplicationID result = this.objectMapper.readValue(message, ApplicationID.class);
      return result;
    }
  }
899158
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getId");

    String id = consumerDispatcher.getSubscriptionUuid().toString();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())             
      SibTr.exit(tc, "getId", id);
    return id;
  }
1130459
public SIBUuid8 getMessagingEngineUuid()
  {
    if (tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getMessagingEngineUuid");
      SibTr.exit(tc, "getMessagingEngineUuid", messagingEngineUuid);
    }

    return messagingEngineUuid;
  }
1221599
public AppIdentity getAppIdentity() {
		if (isCached(defaultApiConfig.getApplication()))
			return applicationIdentityCache.get(defaultApiConfig.getApplication()).getAppIdentity();
		else
			return getAppIdentity(defaultApiConfig);
 	}
688505
public String getMessageId() {
        return (data != null && data.payload != null) ? data.payload.messageId : null;
    }
1212563
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getId");
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getId", aoBrowserSession.toString());
    return aoBrowserSession.toString();
  }
732540
static final String getUserId() {
    UserService userService = UserServiceFactory.getUserService();
    User loggedIn = userService.getCurrentUser();
    Preconditions.checkState(loggedIn != null, "This servlet requires the user to be logged in.");
    return loggedIn.getUserId();
  }
1013181
public static String getCurrentId()
  {
    SystemManager system = getCurrent();

    if (system == null) {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();

      throw new IllegalStateException(L.l("{0} is not available in this context.\n  {1}",
                                          SystemManager.class.getSimpleName(),
                                          loader));
    }

    return system.getId();
  }
721814
public String getApplicationId() {
		String applicationId = null;
		Integer applicationIdObject = querySingleTypedResult(
				"PRAGMA application_id", null, GeoPackageDataType.MEDIUMINT);
		if (applicationIdObject != null) {
			try {
				applicationId = new String(ByteBuffer.allocate(4)
						.putInt(applicationIdObject).array(), "UTF-8");
			} catch (UnsupportedEncodingException e) {
				throw new GeoPackageException(
						"Unexpected application id character encoding", e);
			}
		}
		return applicationId;
	}
993803
public function createRegistrationId()
    {
        $registration = new GcmRegistration();
        // build uri
        $uri = $this->endpoint.$this->hubPath.'/registrationIDs/';

        $token = $this->generateSasToken($uri);
        $headers = array_merge(['Authorization: '.$token], $registration->getHeaders());
        $headers = array_merge(['Content-length: 0'], $headers);

        $response = $this->request(self::METHOD_POST, $uri.self::API_VERSION, $headers, null, true);

        preg_match(
            '#'.$uri.'([^?]+)'.preg_quote(self::API_VERSION).'#',
            $response,
            $matches
        );

        return $matches[1];
    }
1057244
public int getJvmPid() {
        int pid = -1;
        if (strPID !=null) {
            try {
                pid = Integer.parseInt(strPID);
            }
            catch (NumberFormatException e) {/* */  }
        }
        return pid;
    }
152345
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getId");
      SibTr.exit(tc, "getId", new Long(getSequenceID()));
    }
    return ""+getSequenceID();
  }
755190
public String currentTransactionId() {
        try {
            javax.transaction.Transaction txn = txnMgr.getTransaction();
            return txn != null ? txn.toString() : null;
        } catch (SystemException e) {
            return null;
        }
    }
1179858
public String getId() {
        if (id == null) {
            synchronized (this) {
                if (id == null) {
                    id = "rpc-cfg-" + ID_GENERATOR.getAndIncrement();
                }
            }
        }
        return id;
    }
683965
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getId");
    String id = new Long(_tick).toString();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getId", id);
    return id;
  }
42628
protected static void getRegistrationId(OrtcClient ortcClient){
		if (checkPlayServices(ortcClient)) {
            gcm = GoogleCloudMessaging.getInstance(ortcClient.appContext);

            if (ortcClient.registrationId.isEmpty()){
                String regid = getRegistrationId(ortcClient.appContext);
                ortcClient.registrationId = regid;
                if (regid.isEmpty()) {
                    registerInBackground(ortcClient);
                }
            }

        } else {
        	ortcClient.raiseOrtcEvent(EventEnum.OnException, ortcClient, new OrtcGcmException("No valid Google Play Services APK found."));
        }
	}