Class KeyHelper


  • public class KeyHelper
    extends java.lang.Object
    Helper class for generating keys of different types.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int generateRegistrationId​(boolean extendedRange)
      Generate a registration ID.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • generateRegistrationId

        public static int generateRegistrationId​(boolean extendedRange)
        Generate a registration ID. Clients should only do this once, at install time.
        Parameters:
        extendedRange - By default (false), the generated registration ID is sized to require the minimal possible protobuf encoding overhead. Specify true if the caller needs the full range of MAX_INT at the cost of slightly higher encoding overhead.
        Returns:
        the generated registration ID.