You need to get the runtime.powerState property. However, you can request just the runtime.powerState property and it should be quite efficient and fast. If it's slow, then it's likely you are getting a lot of other properties or you set it to get all properties.
↧