Affiliate links on Android Authority may earn us a commission.Learn more.

Android Game SDK: What it is and how to use it in your apps

July 31, 2025

TheAndroid Game SDKis a new set of libraries from Google, designed to help facilitate better game development. Or at least, that is what it promises to be in the not-too-distant future. For right now, the Android Game SDK is in fact just one library: theAndroid Frame Pacing Library, apparently also known as “Swappy.”

The announcement came at the start of December 2019 and could be considered a long-overdue inclusion. Hopefully, future iterations will help to streamline the game development process, allowing developers to more quickly design and release puzzle games, platformers, or even 3D titles without relying on third-party engines likeUnityand Unreal.

Android Game SDK

This post will be updated frequently as new elements are added to the Android Game SDK, so bookmark this page and check back. For now, we’ll be taking a look at the Frame Pacing Library.

How the Frame Pacing Library works

This library is designed to help games maintain a steady frame rate with minimal input latency. It does this by synchronizing the game’s rendering loop with the OS display subsystem and hardware. The display subsystem aims to reduce tearing that can sometimes occur when hardware switches from one frame to another mid-way through an update. It does this by buffering previous frames, detecting late submissions, and repeating the display of those past frames should a late frame be detected.

However, this can allow mismatches in synchronization that result in inconsistent frame display times. For example, if a frame gets rendered more quickly, this might shorten the amount of time the previous frame spends on the screen. Should frames take too long to render however, then it may be presented for an additional frame.

Frame Pacing Library Too Fast on android game sdk

The Frame Pacing Library addresses these issues using Android’s Choreographer API in order to synchronize the game with the display subsystem. It achieves this by using a presentation timestamp extension on OpenGL and Vulkan APIs, which ensures that frames are presented at the correct time. It also uses sync fences in order to prevent buffer stuffing. Multiple refresh rates are supported too, allowing developers to target different device types – including 90Hz and 120Hz displays – and customization options. Frame presentation times are automatically adjusted to account for the device hardware.

How to use the Android Game SDK’s Frame Pacing Library

If your game uses either Vulkan on OpenGL, then you will be able to utilize this library. To do so, first you will need todownload the Android Game SDK here.

To see how this works, you’re able to also download theBouncy Ball sample hereto test with OpenGL. You canfind instructions for Vulkan here. Open the project, then run the app to make sure it works.

Unity Android Game SDK

Next, link the project to the library. For static libraries, do this by addinggamesdk/includeto compiler include paths, andswappy/swappyGL.hfor integration with OpenGL ES. In most cases, the header file will contain all necessary functions.

Finally, add the following path to your linker library paths:

Of course, you will swap the bold text for the relevant processor/NDK version etc.

Initialize an instance of Android Frame Pacing using:

And destroy said instance with:

Now the following functions will enable you to configure your swap intervals and refresh periods:

Call these immediately after you have initializedSwappyGL_init(), which should be as close to when your engine launches as possible. Pass the duration of the frame intoSwappyGL_setSwapIntervalNS()using theSWAPPY_SWAP_60FPS,SWAPPY_SWAP_30FPS, orSWAPPY_SWAP_20FPSconstants (where appropriate).

Now perform the frame swap using boolSwappyGL_swap(EGLDisplay display, EGLSurface surface). This wraps theeglSwapBuffers()method used by Open GL ES, so you should replace all instances with the new version.

You can check that Frame Pacing has been enabled at any point usingbool SwappyGL_isEnabled().

For more detailed instructions on how to use the Frame Pacing Library, check out itsofficial Android developer guide page.

Using Android Game SDK in Unity

The Frame Pacing Library is also included inUnityversion 2019.2 and above. Simply select the optimized Frame Pacing checkbox in Android Settings, and you’ll automatically enable smoother frame rates for your games.

Once again, Unity makes life a lot easier for game developers!

Looking ahead

Personally, I feel it’s high time that Google gave game devs some love, so I see this as a very positive thing. The Frame Pacing Library itself is also likely to be a welcome addition, especially for more demanding games looking to offer silky-smooth framerates. It’s a small start though, so I have my fingers crossed for some more broadly useful libraries making their debut with Android Game SDK soon.

Thank you for being part of our community. Read ourComment Policybefore posting.