Hi , I am making a phaser game with capacitor and when I test it on samsung devices with 120hz screen, I get bad performance, unstable fps and device heating because it tries to stay as 120fps. When I set device to 60hz, it caps to 60fps and runs perfectly.
How can I make my app to switch to 60hz when running? Most native games do it . Phaser fps settings do not affect at all
For Android, You need to create a custom Capacitor plugin utilizing native WindowManager
APIs to explicitly set the display’s refresh rate to 60Hz.
For iOS, focus on optimizing your app to consistently achieve 60 FPS, as iOS handles refresh rate adaptation automatically.
1 Like
doesnt seem to work for samsung. ive set up plugin it works but its overriden by device. its methods have “recommended priority”
ai wrote this: The reason other games can force 60Hz on your Galaxy S20 is almost certainly because they are integrating and using the Samsung GameSDK / Adaptive Performance APIs, not just the standard Android ones we’ve been trying.
What This Means for Your Plugin:
To achieve the same forced 60Hz behavior, this Capacitor plugin would need to:
-
Include the Samsung GameSDK library: You’d need to find the native Android library (.aar or .jar) for the relevant Samsung SDK (GameSDK or Adaptive Performance).
-
Add it as a dependency to the plugin’s build.gradle.
-
Call the Samsung-specific API from the Java code (instead of, or in addition to, the standard Android APIs) to request the 60Hz refresh rate. This would likely involve initializing the SDK and then calling a method similar to the SetRefreshRateByIndex mentioned in the Unity docs.
etc.
so still stuck
While the Samsung SDK might offer specific control for their devices, it’s not a universal Android solution. Ai gave you the wrong guidance. rephrase your question to Ai and it will give you different answers.
This level of customization goes beyond Ionic/Capacitor’s typical scope. For more specialized guidance on this deeper level of Android development, you’ll likely find helpful discussions on dedicated Android development forums. Good luck!
1 Like
Yes, I understand that, its suggestion was to create special solution for samsung and default code for others. Ok, thank you, I will try there
1 Like