Shattered Screen? Turn Your Broken Device into a Complete Media Center!

A cracked screen usually means you’ll have to spend a hefty … more

Gmail 5.0: Material Design and Multiple Account Support

Google started to materialize many of its applications right after announcing the … more

Some of Our Favorite Features in Android 5.0 Lollipop

Android 5.0 Lollipop is the latest major revision to Google’s mobile operating … more

Sony SmartEyeglass SDK Developer Preview Released

A little over a month ago in Tokyo, Japan, Sony unveiled its new SmartEyeglasstechnology. … more
Post Reply

[MOD][Xposed][2014/02/23] S-Pen Only Mode for Galaxy Note devices

OP ObsidianX

23rd February 2014, 10:03 PM   |  #1  
OP Member
Flag San Jose
Thanks Meter: 249
 
89 posts
Join Date:Joined: Apr 2009
Donate to Me
More
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.

If the touch input is not disabled please run this tool: TouchDevice.apk and reply to this thread with the name of the device that's printed out when you touch the screen with your finger and I'll add it to the list of devices to exclude.

This module uses the StandOutWindow library by Mark Wei: Github



Feeling generous?
Bitcoin: 1DyWDTgQGBRbjDrJXVsAQHf73u5x3io5JW
Paypal: http://goo.gl/bWSEo5


XDA:DevDB Information
S-Pen Only for Galaxy Note, a Tool/Utility for the Android General

Contributors
ObsidianX,

Version Information
Status: Stable
Current Stable Version: 1.0
Stable Release Date: 2014-02-23

Created 2014-02-23
Last Updated 2014-03-01
The Following 4 Users Say Thank You to ObsidianX For This Useful Post: [ View ]
23rd February 2014, 10:03 PM   |  #2  
OP Member
Flag San Jose
Thanks Meter: 249
 
89 posts
Join Date:Joined: Apr 2009
Donate to Me
More
Reserved
25th February 2014, 02:35 AM   |  #3  
mjrifath's Avatar
Senior Member
Flag XDA
Thanks Meter: 701
 
1,279 posts
Join Date:Joined: May 2012
More
Thanks for this mod. I'm gonna trg it on my Galaxy note and report it soon.
Does this mod work with non TW samsung base rom. Such like Omni, CM or AOSP..

Regards
mjR

Sent from my GT-N7000 using Tapatalk
25th February 2014, 03:14 AM   |  #4  
OP Member
Flag San Jose
Thanks Meter: 249
 
89 posts
Join Date:Joined: Apr 2009
Donate to Me
More
Quote:
Originally Posted by mjrifath

Thanks for this mod. I'm gonna trg it on my Galaxy note and report it soon.
Does this mod work with non TW samsung base rom. Such like Omni, CM or AOSP..

Theoretically, yes. It doesn't use any TouchWiz code or modify any TouchWiz interface. It specifically singles out the input device "sec_touchscreen" so if your device or ROM gives it a different name then it won't work.
25th February 2014, 12:20 PM   |  #5  
Senior Member
Thanks Meter: 20
 
127 posts
Join Date:Joined: Dec 2010
Doesn't work on my Galaxy Note jb 4.1.2. Touchscreen still works when enabled.

Sent from my SHV-E160S using XDA Premium 4 mobile app
1st March 2014, 08:36 AM   |  #6  
OP Member
Flag San Jose
Thanks Meter: 249
 
89 posts
Join Date:Joined: Apr 2009
Donate to Me
More
I just added a tool to the OP for you to use so I can add your phone's touch device to the list of exclusions. Let me know what it outputs.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Xposed Framework Modules by ThreadRank