Hi,
I need to create a situation whereby while my activity is running, a touch of the screen results in code jumping to the Activity_Touch function. This must happen regardless of what state the screen is in (powersave dim or off).
I know when the screen is off my activity won't be running, so this means I must prevent this situation, which I can do with reflection and FLAG_KEEP_SCREEN_ON.
However, my app could be running a long time, so I want to allow screen dimming, so instead of doing the above, I tried pw.PartialLock.
On the samsung S3 I am developing on, this seems to have no effect - the screen turns off after 2 mins and my taps are ignored.
So my question is, why does partial lock no work on the samsung device? Or have I misunderstood what it does? And, are there any better ways to achive my goal (for example detecting touches from a service, but I wouldn't know how to detect touches from a service).
Thanks
I need to create a situation whereby while my activity is running, a touch of the screen results in code jumping to the Activity_Touch function. This must happen regardless of what state the screen is in (powersave dim or off).
I know when the screen is off my activity won't be running, so this means I must prevent this situation, which I can do with reflection and FLAG_KEEP_SCREEN_ON.
However, my app could be running a long time, so I want to allow screen dimming, so instead of doing the above, I tried pw.PartialLock.
On the samsung S3 I am developing on, this seems to have no effect - the screen turns off after 2 mins and my taps are ignored.
So my question is, why does partial lock no work on the samsung device? Or have I misunderstood what it does? And, are there any better ways to achive my goal (for example detecting touches from a service, but I wouldn't know how to detect touches from a service).
Thanks