public PushDeviceSettings createDeviceProfile(){
  byte[] secretBytes=new byte[SECRET_BYTE_LENGTH];
  secureRandom.nextBytes(secretBytes);
  String sharedSecret=Base64.encode(secretBytes);
  return new PushDeviceSettings(sharedSecret,DEVICE_NAME);
}

public PushDeviceSettings createDeviceProfile ( ) { byte [ ] secretBytes = new byte [ SECRET_BYTE_LENGTH ] ; secureRandom . nextBytes ( secretBytes ) ; String sharedSecret = Base64 . encode ( secretBytes ) ; return new PushDeviceSettings ( sharedSecret , DEVICE_NAME ) ; }
creates and saves a fresh device profile for the given user . this will generate a fresh random shared secret for the device , ensuring a valid device profile is present for device registration .
