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.
-
Pre-download Data:
- Prioritize downloading data before building your app.
-
Initialization with PreInit:
- During initialization of Balancy, use the parameter
PreInit = PreInitType.LoadStaticDataAndLocalProfile
. This approach ensures the app launches using locally available data.
- During initialization of Balancy, use the parameter
-
Handling OnInitProgress Callback:
- Monitor for two additional cases in the
OnInitProgress
callback:BalancyInitStatus.PreInitFromResourcesOrCache
andBalancyInitStatus.PreInitLocalProfile
. Full usage of Balancy functionalities is advisable after the latter status.
- Monitor for two additional cases in the
-
Background Initialization:
- Balancy continues to initialize in the background. Upon completion of online data and profile synchronization, the
OnReadyCallback
will notify you.
- Balancy continues to initialize in the background. Upon completion of online data and profile synchronization, the
-
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);
.
- Make sure you are resolving conflicts using the method
-
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 parameterPreInitLaunch
totrue
. 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.
- Most features, except A/B Tests, become operational immediately after
-
Final Initialization:
- Once all new updates form Balancy are downloaded and the cloud profile is loaded and synchronized with the local progress,
AppConfig.OnReadyCallback
andvoid OnSmartObjectsInitialized();
are invoked.
- Once all new updates form Balancy are downloaded and the cloud profile is loaded and synchronized with the local progress,
By following these steps, you can ensure a swift launch of your app with Balancy, offering a seamless initial user experience.
Additional advice:
- Don't do
Auth.SignOut()
beforeBalancy.Main.Init
, when usingPreInitType.LoadStaticDataAndLocalProfile
, because local progress won't be found and the new account will be created. - 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 atAppConfig.OnReadyCallback
. Make sure your code can work with changing profiles.