Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Wakelock in android app to keep it alive #71

Closed
fredrikchabot opened this issue Oct 23, 2014 · 4 comments
Closed

Wakelock in android app to keep it alive #71

fredrikchabot opened this issue Oct 23, 2014 · 4 comments

Comments

@fredrikchabot
Copy link

Wakelock in android app to keep it alive.

Also make the background black or configurable to save power on oled screens.

@demailly
Copy link

My fork GfxTablet+ (see earlier message) has configurable background color, and also inversion of colors. (It does everything GfxTablet does and much more - you have to install networktablet+ instead of networktablet on your Linux desktop computer; the new protocol is incompatible with the one used by GfxTablet, but both apps can be used independently). There is no wakelock at this point, but it would be extremely easy to add that. I'll definitely include a wakelock in the next release.

@fredrikchabot
Copy link
Author

Thanks. I have tried your fork, it is not for me.

The Android app appears to have everything and the kitchen sink while all I want is a tablet input device.
Then the next detractor was that the xinput driver hung my x session on the first try, and I had to kill it from a different console to regain x, while the original one seems to be very stable so far.

@demailly
Copy link

On Sat, Oct 25, 2014 at 05:53:08AM -0700, Fredrik Chabot wrote:

Thanks. I have tried your fork, it is not for me.

The Android app appears to have everything and the kitchen sink while all I want is a tablet input device.
Then the next detractor was that the xinput driver hung my x session on the first try, and I had to kill it from a different console to regain x, while the original one seems to be very stable so far.

Sorry for that - I have tried it here on different Linux/Debian systems, and
it works very well for me without any drawback; but I haven't made tests on
other Linux variants.

For sure, networktablet+ requires a lot of interaction with X, while
networktablet only interacts through uinput. If you only need a tablet
input device, what you can do is to download the Android SDK, add a
wakelock to GfxTablet, and recompile. Actually, one needs only adding
one line :

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

in the routine from CanvasActivity.java :
protected void onCreate(Bundle savedInstanceState) ...

Best,
Jean-Pierre Demailly

@Blackhawke
Copy link

An easy "wakelock" solution is to use Tasker with a simple profile that keeps the screen on for "24/hrs", or however long you want to set it for. I have a "screen on" task setup for a handful of apps that I don't want timing out the minute I set the tablet down.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants