I can run this code in my computer:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
inside onResume()
. I sent the code to someone else for testing. But they tell me that that this line shows an error in their SDK, and replacing it with
getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
works, while in my case, both the codes work. Why is this happening?
PS: My SDK version is the one with the zip file name adt-bundle-windows-x86-20130522
. I am not sure the exact version they are using, but it is newer than mine.