How big are the AppGallery Connect SDKs anyway?
How to retain users in today’s increasingly competitive app market is a pressing issue within the industry, and there are many potential ways of going about it.
One of the top solutions is to reduce the size of your app so that users are less tempted to uninstall it when their storage runs low. To that end, a growing number of developers have attempted to reduce the size of their apps by integrating smaller SDKs. This article introduces the SDK sizes of various AppGallery Connect services so that you have a better understanding of how they will affect the size of your app.
As shown in the table, the largest dependent modules are HiAnalytics and the okhttp package required for sending network requests.
The HiAnalytics package consists of the hiAnalytics and opendevice modules, which have a combined size of around 1 MB. However, the actual size added by the two modules to your app is not necessarily 1 MB.
For example, the okhttp package is required for sending most network requests and may already exist in your app before you integrate any AppGallery Connect SDK.
If so, the okhttp package won’t be included when you integrate the SDK into your app and package the app, which will make your app 487 KB smaller. Meanwhile, the hiAnalytics and opendevice modules are mandatory only when you integrate Crash and APM. You can simply discard these two modules if your app does not need to collect data of services such as App Linking, App Messaging, and Remote Configuration, which further reduce your app size by 810 KB. Currently, these two modules had been decoupled from AppGallery Connect SDKs and you can add their dependencies manually as required.
If your app already contains the okhttp package, and you are not planning to integrate HUAWEI Analytics, the SDK sizes of AppGallery Connect services can be minimized.
For more information about AppGallery Connect services, please visit: