Skip to content

FAQ

How to Accelerate Balancy Launch Time?

Quick app launches are essential for a positive user experience, as delays can be off-putting. Balancy offers a solution for apps that can be launched offline, minimizing the impact of web requests on the initial user experience.

  1. Pre-download Data:

  2. Initialization with PreInit:

    • During initialization of Balancy, use the parameter PreInit = PreInitType.LoadStaticDataAndLocalProfile. This approach ensures the app launches using locally available data.
  3. Handling OnInitProgress Callback:

    • Monitor for two additional cases in the OnInitProgress callback: BalancyInitStatus.PreInitFromResourcesOrCache and BalancyInitStatus.PreInitLocalProfile. Full usage of Balancy functionalities is advisable after the latter status.
  4. Background Initialization:

    • Balancy continues to initialize in the background. Upon completion of online data and profile synchronization, the OnReadyCallback will notify you.
  5. Conflicts Resolving:

    • Make sure you are resolving conflicts using the method OnSystemProfileConflictAppeared(), most likely you need to choose the Cloud version: Balancy.LiveOps.Profile.SolveConflict(ConflictsManager.VersionType.Cloud);.
  6. Immediate Functionality Post-PreInit:

    • Most features, except A/B Tests, become operational immediately after BalancyInitStatus.PreInitLocalProfile. To enable A/B Tests without awaiting full Balancy initialization, set the A/B Test parameter PreInitLaunch to true. Bear in mind, you won't be able to change any A/B Test parameters on the fly with this flag. You can only stop such a test or update it with the next app release.
  7. Final Initialization:

    • Once all new updates form Balancy are downloaded and the cloud profile is loaded and synchronized with the local progress, AppConfig.OnReadyCallback and void OnSmartObjectsInitialized(); are invoked.

By following these steps, you can ensure a swift launch of your app with Balancy, offering a seamless initial user experience.

Additional advice:

  1. Don't do Auth.SignOut() before Balancy.Main.Init, when using PreInitType.LoadStaticDataAndLocalProfile, because local progress won't be found and the new account will be created.
  2. If a user deletes the game, the local progress will be lost, it means that in OnInitProgress you are getting an empty profile. Don't worry, once the cloud version is loaded, you'll get the latest progress at AppConfig.OnReadyCallback. Make sure your code can work with changing profiles.