Tracker Discounts Helps You Find Good Deals on Steam

If you’re a PC gamer, you’re undoubtedly well familiar with Steam. This … more

Sony Extends AOSP Project to the Xperia Z3

While most OEMs simply don’t care about the custom ROM community, others are doing an … more

How Open Source Can Help Your Project w/ Ethan Yonker – BABBQ2014

People have finally recovered from this years Big Android BBQ … more

Add Frequency Bands to Your Qualcomm Device

Those of you who travel quite a bit undoubtedly own more than one device due to frequency band … more
Post Reply

[MOD][Xposed][2014/02/23] S-Pen Only Mode

OP ObsidianX

24th February 2014, 07:17 PM   |  #1  
OP Member
Flag San Jose
Thanks Meter: 249
 
89 posts
Join Date:Joined: Apr 2009
Donate to Me
More
DevDB project: http://forum.xda-developers.com/show....php?t=2659436


Code:
Disclaimer:

Your warranty is now void.

I am not responsible for bricked devices, dead SD cards,
thermonuclear war, or you getting fired because the alarm app failed. Please
do some research if you have any concerns about features included in this ROM
before flashing it! YOU are choosing to make these modifications, and if
you point the finger at me for messing up your device, I will laugh at you.
Introduction

This module provides an S-Pen-only touch mode for Galaxy Note devices. I wrote this module for my girlfriend who had expressed frustration with the inability to draw naturally on her Galaxy Note 10.1 (with her wrist resting on the tablet). I cooked up this module to give her an easy way to switch between touch and no-touch modes while drawing.

The module works by injecting code prior to "dispatchTouchEvent" on both the Activity and View classes. If the name of the device sending touch events is "sec_touchscreen" the event is swallowed and never reaches the Activity or View (by returning false).

The module is toggled at runtime with the file "spenonly" on external storage. Included in the module is a floating, moveable toggle window that will create and delete this file for you for quick switching between modes.

Installation
  • Download APK attached OR install via Google Play (Link)
  • Open the Xposed Installer and navigate to the Modules section
  • Enable "S-Pen Only [1.0]"
  • Reboot device

At this point the module will be enabled but turned off. To toggle the state of the module launch the "S-Pen Only" application which will pop-up a small floating window in the top-right corner of your screen with a single Switch widget. While the switch is turned on touch input will be rejected.

If you lose your Pen and cannot disable the module you can always remove the "spenonly" file from external storage via ADB or PC file manager.

Changelog

Code:
1.0:
Initial release
Downloads

Google Play:
S-Pen Only (Xposed Module)

APK:
DevHost

Source:
Github

Notes

Since the module is toggled via the presence of a file on external storage, applications that don't have READ_EXTERNAL_STORAGE probably won't work with this mod. Since most drawing applications save their files to external I haven't seen this present any real issue.

On a fresh installation you might need to toggle the module a couple of times if it's not working right off the bat.

This module uses the StandOutWindow library by Mark Wei: Github



Feeling generous?
Bitcoin: 1DyWDTgQGBRbjDrJXVsAQHf73u5x3io5JW
Paypal: http://goo.gl/bWSEo5
The Following 17 Users Say Thank You to ObsidianX For This Useful Post: [ View ]
1st March 2014, 05:36 AM   |  #2  
firegras's Avatar
Member
Thanks Meter: 13
 
58 posts
Join Date:Joined: May 2012
More
Thumbs up Perfect with mazecs3 Note 7
Thank you so much. I've been waiting a long time for this. It will really change the way that I use my Note 10.1.
Just started using it. But is flawless so far.
4th March 2014, 11:53 AM   |  #3  
Junior Member
Thanks Meter: 1
 
4 posts
Join Date:Joined: Jul 2008
This module is invaluable for those who draw and take handwritten notes. Also a fantastic deterrent for would be snoopers. (Sorry hunny, it's just better if you think my phone is broken)

Sent from my SPH-L900 using xda app-developers app
4th March 2014, 04:43 PM   |  #4  
Senior Member
Flag Viseu
Thanks Meter: 35
 
142 posts
Join Date:Joined: Jan 2013
More
Thank you, works like a charm.
8th April 2014, 03:02 AM   |  #5  
CarpeNoctem's Avatar
Senior Member
Flag New York
Thanks Meter: 676
 
1,209 posts
Join Date:Joined: Mar 2007
More
Quote:
Originally Posted by jika23

Thank you, works like a charm.

It would be great if it could be integrated to tasker to be automatically triggered when pen is out and turned off when pen in
The Following User Says Thank You to CarpeNoctem For This Useful Post: [ View ]
8th April 2014, 04:22 PM   |  #6  
Junior Member
Flag Chicago
Thanks Meter: 6
 
23 posts
Join Date:Joined: Oct 2008
More
Quote:
Originally Posted by CarpeNoctem

It would be great if it could be integrated to tasker to be automatically triggered when pen is out and turned off when pen in

Agreed! Then you could also trigger it when you launch specific apps.
29th April 2014, 07:43 PM   |  #7  
Senior Member
Thanks Meter: 32
 
383 posts
Join Date:Joined: May 2011
Quote:
Originally Posted by CarpeNoctem

It would be great if it could be integrated to tasker to be automatically triggered when pen is out and turned off when pen in

Agree! I was looking for this and it works great !
Just make it turned on or at least triggered when the pen is out and closed when its back inside.
5th May 2014, 11:50 AM   |  #8  
Senior Member
Flag Lexington, KY
Thanks Meter: 34
 
175 posts
Join Date:Joined: Jul 2007
More
Quote:
Originally Posted by mcjordan92

Agree! I was looking for this and it works great !
Just make it turned on or at least triggered when the pen is out and closed when its back inside.

@ObsidianX

I just found this mod last night, and was on my way here to post this exact question!
24th May 2014, 12:13 PM   |  #9  
apocalypse_bg's Avatar
Member
Thanks Meter: 3
 
71 posts
Join Date:Joined: May 2010
More
This is exactly what I needed, espesially in Photoshop Touch and S-Pen. Much better than the built-in Palm rejection.

Besides being manageable via Tasker (or Automated Device) a cool feature would be to switch the input method on pen in/out.

Thank you very much for this module, really increases the S-pen value..

Sent from my GT-N8000 using XDA Free mobile app
29th May 2014, 11:05 AM   |  #10  
Member
Thanks Meter: 5
 
33 posts
Join Date:Joined: Jan 2014
Quote:
Originally Posted by apocalypse_bg

This is exactly what I needed, espesially in Photoshop Touch and S-Pen. Much better than the built-in Palm rejection.

Besides being manageable via Tasker (or Automated Device) a cool feature would be to switch the input method on pen in/out.

Thank you very much for this module, really increases the S-pen value..

Sent from my GT-N8000 using XDA Free mobile app

I think this is exactly what you need.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes