Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Java for Android
  • Android Studio
  • Android Kotlin
  • Kotlin
  • Flutter
  • Dart
  • Android Project
  • Android Interview
Open In App
Next Article:
How to Use Phone Selector API in Android?
Next article icon

How to Use Game Mode API in Android 13?

Last Updated : 24 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

It has been a really long time since Android has a dedicated game mode of its own, but it appears that Google has finally listened to all the gamers out there. When the user chooses the appropriate game mode, the Game Mode API enables you to optimize your game for the greatest performance or the longest battery life. Three more choices are also available on the game dashboard: a performance profile tuning menu, a shortcut to broadcast your gameplay on YouTube, and a widget with data from Google Play Games integrated. To improve the performance of games that are no longer receiving updates from their developers, you can also submit requests for Game Mode interventions.

You may access the Game Mode API on:

  • Specific Android 12 devices
  • Android devices with version 13 or higher 

Setup the Game Mode API

Setting up the game mode API is fairly simple, and does not require many steps or tough complications. Follow these steps to incorporate the Game Mode API into your game:

Step #1: Install the Android 13 SDK after downloading it
Declare your app to be a game in the AndroidManifest.xml file by setting the appCategory attribute in the application> element:

android:appCategory="game"

Step #2: Add the following to your main activity to inquire about the current game mode

Java
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ) {   // This feature will work only if you are running Android 12+   GameManager gfgGameManager = Context.getSystemService(GameManager.class);    // Returns the selected GameMode   int gameMode = gfgGameManager.getGameMode(); } 

You can use the table below to understand the various modes available to optimize your game in Android 13:

Particulars

Features

STANDARDNeither a game mode nor standard mode has been chosen by the user.
UNSUPPORTEDBoth the Game Mode API and Game Mode interventions are not explicitly supported by the game.
PERFORMANCEOffers the lowest latency frame rates but at the cost of fidelity and battery life.
BATTERYThe greatest battery life is feasible at the cost of lower fidelity or frame rates.

GeekTip #1: Each game has the option to implement the Game Mode API behavior, suggest options for Game Mode interventions to OEMs, or forego Game Mode interventions altogether.

Ideal Techniques to use GM API

You should choose the proper settings for performance and power-saver modes if your game already supports a variety of quality and frame rate targets:

  • You should concentrate on attaining high consistent frame rates for high-fidelity games like first-person shooters, multiplayer online battle arenas (MOBAs), and role-playing games (RPGs) to optimize user immersion
  • Consider using a lower display refresh rate (such as 30Hz or 60Hz) and using frame pacing to target the lower rate if you want to extend the life of your battery.
  • Consider small fidelity sacrifices to get greater frame rates in order to regularly reach the device's maximum frame rates.
  • You should enable energy saver mode for both high-fidelity and casual games to extend playtime by lowering your peak frame rates.
Image #1: Understanding the Game Mode API in Android 13.
Image #1: Understanding the Game Mode API in Android 13.

Changing game modes

You can use the Game Dashboard (available on Pixel devices) or comparable programs offered by OEMs to move between the different game modes. As an alternative, you can use the shell command for game mode while developing.

You might need to upload your program to Google Play Console and install it via the Play Store if, while using Game Dashboard, the optimization symbol does not appear when your game runs.

GeekTip #2: It's important to note that Battery Saver mode is game-specific and has no effect on how Android Battery Saver behaves overall.

Conclusion

This is how we will implement the game Mode API in your devices running Android 13, also note that certain devices have already had the function enabled since the previous Android 12 release.

However using them will purely be based on how your OEM makes your ROM, depending on that the availability of this feature could be absent from your RAM. We believe that the stock ROMs would be carrying this feature, and adding this to your current app, would be a great option.


Next Article
How to Use Phone Selector API in Android?
author
therebootedcoder
Improve
Article Tags :
  • Technical Scripter
  • Android
  • Technical Scripter 2022
  • Android 13

Similar Reads

  • How to Use Text Conversion API in Android 13?
    With the introduction of Android 13, Google introduced a wide array of Text Conversion API improvements and features to it, in this Geeks for Geeks article, we will be looking at how your app can benefit from using this new API. If you already have an idea about what the Text Conversion APIs are, th
    4 min read
  • How to Use AppSearch in Android 13?
    AppSearch is an efficient on-device search solution for managing locally stored, structured data is called AppSearch. It includes APIs for indexing data and full-text data retrieval. Applications can use AppSearch to provide unique in-app search features, enabling users to conduct offline content se
    5 min read
  • How to Add Memes Using API Call in Android?
    Application Programming Interface calling is the process of making requests to external web-based services to retrieve or manipulate data. APIs provide a standardized way for different software applications to communicate with each other. It involves sending a request from one application to another
    4 min read
  • How to Use Predictive Back Gesture in Android 13?
    A predictive back gesture is now available for Android devices with phones, big screens, and foldable in Android 13 (API level 33). This feature, which is a part of a multi-year release, will allow users to preview the destination or another outcome of a back gesture before fully completing it, givi
    5 min read
  • How to Use Phone Selector API in Android?
    Phone Selector API is used to detect phone numbers being used in the phone. Using this you can avoid manual input of Phone Numbers by users and prompt them to choose the desired number. A sample image is given below to get an idea about what we are going to do in this article. Note that we are going
    3 min read
  • How to Use Canvas API in Android Apps?
    Canvas API is also one of the most used in Android. The name of the API itself tells us that the API is being used for drawing on the drawing board. With the help of this API, we can draw different types of shapes and create custom UI components that are not present in Android. In this article, we w
    5 min read
  • How to Use Photo Picker in Android 13?
    With Android 13, Google unveiled a new specialized media picker. This new option provides a more private and user-friendly alternative for those times when you want to share photographs, as opposed to potentially granting apps access to all of your files via the well-known document picker. You don't
    4 min read
  • How to Use Dagger Library in Android App?
    When we create a new Android Project, eventually we start accumulating different-different dependencies to get certain functionalities, but over time managing them becomes cumbersome, thus an injection framework like Dagger comes into play. However, setting up an injection service like Dagger requir
    5 min read
  • How to Create a News App in Android?
    Networking is an integral part of android development, especially when building data-driven clients. The java class mainly used for network connections is HttpUrlConnection. The class requires manual management of data parsing and asynchronous execution of requests. For network operations, we are be
    10 min read
  • How to get user location in Android
    Many apps in Android uses user's locations be it for ordering cabs or delivering food and items. Here, a simple android app that would return the user's latitude and longitude is made. Once the latitude and longitude are known, the exact location on Google Maps can be seen using the following query:
    6 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences