Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I am developing app on NativeActivity(only C/C++). I want to disable screen timeout.
Do you know how to do it?
如果 OP 仍在寻找答案,或者像我这样在搜索时发现此主题的人,您可以这样做:
#include <android/window.h> [...] // place this in your init function once you have a valid window ANativeActivity_setWindowFlags(pYourAppStruct->activity, AWINDOW_FLAG_KEEP_SCREEN_ON, 0);