5,606,722 Members 37,491 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
ObsidianX
Old
#1  
Member - OP
Thanks Meter 240
Posts: 89
Join Date: Apr 2009
Location: San Jose

 
DONATE TO ME
Default [MOD][Xposed][2014/02/23] S-Pen Only Mode

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 15 Users Say Thank You to ObsidianX For This Useful Post: [ Click to Expand ]
 
firegras
Old
#2  
firegras's Avatar
Member
Thanks Meter 9
Posts: 45
Join Date: May 2012
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.
 
mrfrosty
Old
#3  
Junior Member
Thanks Meter 1
Posts: 4
Join Date: 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
 
jika23
Old
#4  
Member
Thanks Meter 11
Posts: 64
Join Date: Jan 2013
Location: Viseu
Thank you, works like a charm.
 
CarpeNoctem
Old
#5  
CarpeNoctem's Avatar
Senior Member
Thanks Meter 667
Posts: 1,209
Join Date: Mar 2007
Location: New York
Quote:
Originally Posted by jika23 View Post
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
I am a Cook, not a Chef! I don't pretend to be a dev but still I am learning everyday and enjoy sharing my work

APN Generator
-- OsiMood APN Generator

Benchmarks Comparator
-- OsiMood Benchmarks Comparator


 
thunderwolf17
Old
#6  
Junior Member
Thanks Meter 6
Posts: 22
Join Date: Oct 2008
Location: Chicago
Quote:
Originally Posted by CarpeNoctem View Post
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.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

One-Handed Mode Ported to the Samsung Galaxy S4

People may not realize it much, but this fascination with larger screen sizes on smartphones … more

Speed up the ROM or Kernel Build Process

Creating a kernel, ROM, or any other development projectrequires knowledge and tools. While … more

Google Glass Now Open to Anyone… with $1500 to Spend (Update: Not Anymore)

Google Glass, which recently received its official update … more