[MOD] NFC Screen OFF (.206) - Sony Xperia X Compact Themes, Apps, and Mods

Hello,
Here I leave the NfcNci.apk modded in order to work even when the device is locked and screen is OFF
You don't have to worry about battery life, I have already tested it and it does not have any appreciable impact on it
IT MAY (SHOULD?) WORK WITH SONY XPERIA X TOO, though is untested (post here if it works for you)
Installation:
Download attached NfcNci.apk file
Overwrite it into /system/app/NfcNci.apk and chmod 0644 it
Delete /system/app/NfcNci/oat folder
Reboot or "svc power reboot" through ADB
Done
Click to expand...
Click to collapse
TESTED ON: Sony Xperia X Compact 34.2.A.2.69
UDPATE (22-08-2017):
-Now compatible with FTF build .206 (download NfcNci(.206).apk and rename it to NfcNci.apk)
If you are interested about modding it for your device, you can see what I did here:
https://github.com/bamsbamx/NFCScreenOFF

Is it possible to have a white list of what tag will be processed when the screen is off?

trewelu said:
Is it possible to have a white list of what tag will be processed when the screen is off?
Click to expand...
Click to collapse
I think there is no easy way to mod the system NFC APK to make it work like what you say. Instead, it would be possible to create an app that handles all NFC tags and override the functionality of those tags which aren't in the whitelist

Hi
Thanks for the mod.
I'm wondering if you've included support of taglost detection ?
And maybe : it is hard to have a mod for a detection on lock screen instead of "screen off" ?
For me a "screen off" detection is too annoying since my phone can be in contact with some NFC cards in my pocket/bag.
I was able to do it for android 5.x on my Z3 compact but it's a long time ago.. can't remember what I did back then

Le_Poilu said:
Hi
Thanks for the mod.
I'm wondering if you've included support of taglost detection ?
And maybe : it is hard to have a mod for a detection on lock screen instead of "screen off" ?
For me a "screen off" detection is too annoying since my phone can be in contact with some NFC cards in my pocket/bag.
I was able to do it for android 5.x on my Z3 compact but it's a long time ago.. can't remember what I did back then
Click to expand...
Click to collapse
Hi,
I dont know what do you mean by "taglost detection", but this mod is based on the SONY's stock rom NFC app, so it should be included if it's also in the original app.
I think adding just on-lock-screen detection should be hard, you can follow the quick guide I wrote here: https://github.com/bamsbamx/NFCScreenOFF/blob/master/README.md
But keep in mind if you want just lock screen you should set .field static final NFC_POLLING_MODE:I = 0x2 instead of .field static final NFC_POLLING_MODE:I = 0x1
I cant test by myself that way because I am using AOSP rom right now... But will help you if you need

bamsbamx said:
Hi,
I dont know what do you mean by "taglost detection", but this mod is based on the SONY's stock rom NFC app, so it should be included if it's also in the original app.
Click to expand...
Click to collapse
By default there's no tag lost detection.
The tag_lost detection allow to trigger action when the tag is removed, not only when the phone scan the tag.
For ex you can use this to set the phone in a particular state (commonly: car mode, desk mode, etc) while the tag is detected. When the tag is removed, you use the tag_lost trigger to get off the mode, or trigger any other action (with tasker for ex)
I just got my X compact, and still not rooted yep. At this time I'm trying to use it without root... but the nfc mod my push me to do it
If so I'll take a look at this and post here

Please support 34.3.A.0.238 ?
On my phone, introducing this will cause nfc to disappear.

Related

[Q] disable hardware buttons backlight

hi
is there any way to disable the led of the hardware buttons. i know where the buttons are. i dont need a light to find them. and it looks ugly when they light up. after i used them i always wait to touch the screen until they are off.
I think neldar knows the most about this since he has done the backlight notifications mod. It would be super to have an option in the recovery to disable backlight in the buttons. They are annoying at night when using Screen filter to dim the screen, buttons are very bright in contrast to the screen.
Agreed. I would love to be able to switch them off.
Yes this is true and really anoying!
At night they are much to bright. Would love a "disable" option, too.
Is it maybe possible to dimm the buttons, too?? This would really be awesome
ok, i'm not the only one who wants that leds switched off. but isn't there anyone who has an idea how to do that
Anyone figured this out yet?
i found an app in the market called“ leds hack“. it supports samsung vibrant, but it dont works on my phone. isnt it the us-name for the sgs? maybe the rom is the problem. i'm on darkys 9.3
i tryed to find the script that controls the backlight. here: stackoverflow.com/questions/4152053/android-turn-off-key-lights i found this info:
A: The keyboard backlight can be controlled via /sys/class/leds/ keyboard-backlight/brightness. It appears that it's a simple on-off control (echoing '0' turns it off, echoing '1' or higher turns it on). For some reason, the default system backlight control stuff seems to set this to "83", but I don't know why. I can't seem to see any difference between 83 and any other number. The file is readable by anyone, but only writable by root, so you'll need root access to the phone to manipulate it this way.
can anyone tell me where i can find the file on my phone...
Has anyone found the answer?
This is honestly something that I would even pay for if a dev wanted to create a little app or mod that could do this quickly and easily for those that are not confident to make these changes on their own.
No one? :/
magooo said:
/sys/class/leds/ keyboard-backlight/brightness
Click to expand...
Click to collapse
this doesnt exist on our android.
There is is /sys/devices/virtual/misc/melfas_touchkey/brightness
you can do
echo '1' > /sys/devices/virtual/misc/melfas_touchkey/brightness
to turn it on, but i have not found a way to turn it off permanently
Can some one bind this to light sensor? So that we can have it disabled during day and have it enabled at night??
how can i edit this files? i cant find an editor or something like that. i'd like to play around with this script?
joseph.carty said:
This is honestly something that I would even pay for if a dev wanted to create a little app or mod that could do this quickly and easily for those that are not confident to make these changes on their own.
Click to expand...
Click to collapse
I'd pay too
Please, It have to be so easy
magooo said:
A: The keyboard backlight can be controlled via /sys/class/leds/ keyboard-backlight/brightness
Click to expand...
Click to collapse
I don't have the folder /leds. What version of android do you have?
I found this. As a new user, I can't send links to the forum, I paste the important part:
Samsung GT-I9000
s3c-keypad
- scancode = 26 (confirmed with keylayout/s3c-keypad.kl)
/sys/class/backlight/s5p_bl/brightness
drivers/input/keyboard/s3c-keypad.c
drivers/video/backlight/backlight.c
- brightness and actual_brightness 's get/set method. (actual_brightness is read only)
drivers/video/samsung/s3cfb_tl2796.c
- Samsung's implementation. MIN_BL = 30. Lower than this == black out.
Could it be useful?
Thanks

[MOD][KERNEL] Screen Dimmer

This tweak is no longer supported, use Touch Wake instead!
For notebook/netbook computers switching off the screen after a certain timeout is a simple yet effective way of saving battery life and such a feature is integrated into every OS. Android also has a screen timeout feature, however this suspend function also disables the touchscreen controls (and touchkey buttons) and you have to press the power button to re-enable the screen (plus, if you did not disable the lockscreen, you also have to unlock it again).
Since this is kinda annoying I tried to find an app which could disable the screen after a timeout and re-enable it on touch, however I could not find one. After some digging I found out that there is no way with the current Android API to disable the screen without simultaneously disabling the touchscreen controls.
So I took a look at the kernel source and after some trial and error it seems I have found a stable way to implement such a screen off feature.
To enable (disable) the screen dimmer pass 1 (0) to 'enabled' in /sys/class/misc/screendimmer. Pass the delay in ms (this is milliseconds; 1000ms = 1s) to 'delay'. The default state is disabled and a delay of 15000 = 15s.
Changes to the source (based on kernel with BLD 3; apply patches in exactly this order):
http://www.pastie.org/2408247
http://www.pastie.org/2408254
http://www.pastie.org/2408257
http://www.pastie.org/2408259
http://www.pastie.org/2408260
BUGFIX:
I already have the first bug fix for you. The kernel was not compiling anymore without the screen dimmer activated in the .config. Besides that nothing has changed, so if you already have a compiled kernel with the screen dimmer running this will not change anything.
Bug fix: http://www.pastie.org/2408688
BUGFIX #2:
Fixed the auto brightness not working anymore.
Bug fix: http://www.pastie.org/2418667
BUGFIX #3:
The user space access to the framebuffer is closed down before the screen is dimmed which makes sense and took care of one oddity I did notice. Also it should save some more battery.
Bug fix: http://www.pastie.org/2420744
BUG FIX #4:
Patch to avoid race conditions.
Bug fix: http://www.pastie.org/2441551
Get Jonathon Grigg's 'Spark Mod Manager' GUI for controlling Screen Dimmer: http://forum.xda-developers.com/showthread.php?p=17291034
I do not accept donations and since I reached my 50GB limit of free space on SpiderOak, thanks to all of you kind people who got an account using my referral link, I could not ask for more.
Instead if you really want to donate your hard earned money to someone who deserves and needs it, consider donating to the Free Software Foundation at fsf.org: These guys are at the frontline when it comes to keeping Linux free and fighting these greedy bastards who think they are entitled to collect royalties and other fees from Linux users due to some silly patents - and if Linux falls, Android will be next.
This tweak is no longer supported, use Touch Wake instead!
good...thanks!!
You are the GOD ...
Amazing... can't wait one of the kernel dev have this on their kernel. So I can easly flash it.
I already have the first bug fix for you. The kernel was not compiling anymore without the screen dimmer activated in the .config. Besides that nothing has changed, so if you already have a compiled kernel with the screen dimmer running this will not change anything.
Bug fix: http://www.pastie.org/2408688
Nice job, looks like a cool mod.
I'll release it under a experimental version of my kernel enabled by default to see how people like it.
One question, does the screen go off while I'm watching a video such as YouTube?
Sent from my Nexus S using XDA Premium App
Highly Appreciated.
reddv1 said:
Nice job, looks like a cool mod.
I'll release it under a experimental version of my kernel enabled by default to see how people like it.
One question, does the screen go off while I'm watching a video such as YouTube?
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
Yes, unfortunately the screen always gets dimmed even if the app has the FLAG_KEEP_SCREEN_ON set. I took a look at the kernel source and it seems this flag is not passed on to the kernel and handled only by the Android OS; so the kernel does not know whether currently an app is open which has this flag set. Maybe I can think of something, but most likely this is a limitation which I cannot remove.
This will be amazing.
I have always wanted a way to wake up the phone without reaching over to the power button. I remapped my power button to the soft search key just so I didn't have to reach over to push the power button but it obviously didn't work to wake the phone. This is something I've dreamed of, to just touch the screen or the touch keys and it would wake.
Couple questions:
1) Is it possible that only touching the 4 soft keys will wake the screen (instead of the screen)?
2) How does this affect battery? Is a wake lock held? Does the phone sleep correctly to go into power saving? I'm assuming if the screen is touchable that the phone isn't sleeping and as such, this will be a battery drainer.
Enhanced said:
This will be amazing.
I have always wanted a way to wake up the phone without reaching over to the power button. I remapped my power button to the soft search key just so I didn't have to reach over to push the power button but it obviously didn't work to wake the phone. This is something I've dreamed of, to just touch the screen or the touch keys and it would wake.
Couple questions:
1) Is it possible that only touching the 4 soft keys will wake the screen (instead of the screen)?
2) How does this affect battery? Is a wake lock held? Does the phone sleep correctly to go into power saving? I'm assuming if the screen is touchable that the phone isn't sleeping and as such, this will be a battery drainer.
Click to expand...
Click to collapse
1) Currently the screen is re-enabled both when touching the screen and the touchkeys. I think that makes the most sense. However, one could easily modify the code to limit this to the touchkeys.
2) The phone is not put to sleep, only the screen is disabled. So compared to the normal screen lock this will drain the battery much quicker. This tweak is not intended as a replacement for the stock screen lock, but as an addition. You can set the screen lock to a value like one or two minutes, so it will properly lock the phone for example if put it in your pocket, while having the screen dimmer set to a lower timeout like 15sec, so the screen will be disabled and some battery saved if you just pause for some time for example because you wait for a download to finish or talk to somebody. So, if you use it right, you should save some amount of battery.
I found a bug after running this mod for about a couple hours. The screen would not turn on after leaving the phone for about half an hour. The touchkeys would light up and the when I clicked the volume keys I could hear the volume settings changing.
Sent from my Nexus S using XDA Premium App
Ezekeel said:
1) Currently the screen is re-enabled both when touching the screen and the touchkeys. I think that makes the most sense. However, one could easily modify the code to limit this to the touchkeys.
2) The phone is not put to sleep, only the screen is disabled. So compared to the normal screen lock this will drain the battery much quicker. This tweak is not intended as a replacement for the stock screen lock, but as an addition. You can set the screen lock to a value like one or two minutes, so it will properly lock the phone for example if put it in your pocket, while having the screen dimmer set to a lower timeout like 15sec, so the screen will be disabled and some battery saved if you just pause for some time for example because you wait for a download to finish or talk to somebody. So, if you use it right, you should save some amount of battery.
Click to expand...
Click to collapse
This is exactly what I'm lookin for. i will set 1 minute for screen dimmer and 2 minute for screen lock.
Ezekeel said:
For notebook/netbook computers switching off the screen after a certain timeout is a simple yet effective way of saving battery life and such a feature is integrated into every OS. Android also has a screen timeout feature, however this suspend function also disables the touchscreen controls (and touchkey buttons) and you have to press the power button to re-enable the screen (plus, if you did not disable the lockscreen, you also have to unlock it again).
Since this is kinda annoying I tried to find an app which could disable the screen after a timeout and re-enable it on touch, however I could not find one. After some digging I found out that there is no way with the current Android API to disable the screen without simultaneously disabling the touchscreen controls.
So I took a look at the kernel source and after some trial and error it seems I have found a stable way to implement such a screen off feature.
To enable (disable) the screen dimmer pass 1 (0) to 'enabled' in /sys/class/misc/screendimmer. Pass the delay in ms (this is milliseconds; 1000ms = 1s) to 'delay'. The default state is disabled and a delay of 15000 = 15s.
Changes to the source (based on kernel with BLD 3; apply patches in exactly this order):
http://www.pastie.org/2408247
http://www.pastie.org/2408254
http://www.pastie.org/2408257
http://www.pastie.org/2408259
http://www.pastie.org/2408260
BUGFIX:
I already have the first bug fix for you. The kernel was not compiling anymore without the screen dimmer activated in the .config. Besides that nothing has changed, so if you already have a compiled kernel with the screen dimmer running this will not change anything.
Bug fix: http://www.pastie.org/2408688
wor
I have send Netarchy, reddv1 and mathkid a notice (could not reach morfic) about this update, so they aware of this change. As soon as the new version is implemented I will update the list below. Be patient.
Kernels including these modifications:
none yet
Click to expand...
Click to collapse
it works great in trinity with the cm7 nightlies.. thank you.
I don't understand the instruction. what I have to do?
reddv1 said:
I found a bug after running this mod for about a couple hours. The screen would not turn on after leaving the phone for about half an hour. The touchkeys would light up and the when I clicked the volume keys I could hear the volume settings changing.
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
Hmm. Yeah, that sounds like a bug. Did any error messages appear in the log? Could you reproduce the error?
simms22 said:
it works great in trinity with the cm7 nightlies.. thank you.
Click to expand...
Click to collapse
Great. If you run into any problems please let me know. I am glad we have such a thorough tester on board.
tonno16 said:
I don't understand the instruction. what I have to do?
Click to expand...
Click to collapse
Wait for the kernel devs to implement this tweak. Then follow their instructions to activate the dimmer; they probably will supply you with some init.d scripts for convenience.
simms22 said:
it works great in trinity with the cm7 nightlies.. thank you.
Click to expand...
Click to collapse
Can I have your kernel please.
Can't hardly wait till u released it for public. I will realy appreciate it.
If I could give a try for your kernel, would please send me by email at [email protected]
Many thx before.
rejanmanis said:
Can I have your kernel please.
Can't hardly wait till u released it for public. I will realy appreciate it.
If I could give a try for your kernel, would please send me by email at [email protected]
Many thx before.
Click to expand...
Click to collapse
Here lucid blue kernel with the screen dimmer: http://goo.gl/nBHir
The screen dimmer is enabled and set at 30 seconds. Post any issue you have here.
Sent from my Nexus S using XDA Premium App
rejanmanis said:
Can I have your kernel please.
Can't hardly wait till u released it for public. I will realy appreciate it.
If I could give a try for your kernel, would please send me by email at [email protected]
Many thx before.
Click to expand...
Click to collapse
it should be out soon, maybe today or tomorrow. you dont want the one im using, its really a raw test kernel.
Found another bug, the auto brightness doesn't work anymore.
Sent from my Nexus S using XDA Premium App
reddv1 said:
Found another bug, the auto brightness doesn't work anymore.
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
i can confirm it
reddv1 said:
Here lucid blue kernel with the screen dimmer: http://goo.gl/nBHir
The screen dimmer is enabled and set at 30 seconds. Post any issue you have here.
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
grate thx men. i love u
it should be out soon, maybe today or tomorrow. you dont want the one im using, its really a raw test kernel.
Click to expand...
Click to collapse
okay mr simms. i can wait.

NoRefresh enabler

Hi,
I am trying to put a code together to control the refresh behavior of the e-ink screen. The final goal is to have a drop-in library for app developers to help making their app more e-ink friendly.
The code works already for the PRS-T1, but needs a different driver for the Nook Touch (N2EpdController included).
My one and only beta tester gets the famous "There is a problem parsing the package" error. Pls find enclosed the sources.
I would be grateful if someone could fix possible Eclipse setting or other errors.
Hi,
I have some interest in adapting apps to the eink screen, so I will try to help with this. Unfortunately, I cannot post in the dev forums yet.
When you get error installing apps via android UI, it is useful to do via "adb install" to be able to know the error cause. The message was "INSTALL_FAILED_OLDER_SDK", which I solved by lowering the android:minSdkVersion parameter in Manifest. Then, the app installed and ran fine, but didn't do the desired effect yet. I will check the code now...
---------- Post added at 02:41 AM ---------- Previous post was at 01:53 AM ----------
I see that you're trying to use enterA2Mode() for the nook (btw, there is a typo at NoRefreshEnablerActivity.java:29, it should read EINK_NOOK). I've been playing around with this some time ago when I started developing a fast e-ink drawing app for the NST, you can see it here: https://github.com/marspeople/E-Paper (WIP).
With few testing I've done, I guess the 1-bit mode (A2) setting is not applied globally: it should take effect only in the View from which it is called. I haven't investigated further to try to use it globally.
Hi marspeople,
Thanks for pointing out the type, it should read
} else if (DeviceInfo.EINK_NOOK)
Regarding the global value of mode setting. From what I understand, A2 is a permanent mode, so whatever function or app is setting the updatemode, it is kept. With the PRS-T1, it is reset by calling any stock (Sony) app. For the Nook I don't know..
Good luck in compiling, hopefully we come to a version which works on both devices. Then I can proceed to dynamically change the updatemode within an app.
Yes, the A2 mode is kept until any process resets the EPD. Using logcat, I noticed several epd_reset_region messages appearing automatically when I close your app to go back to the launcher. It seems the system overrides the EPD setting, making impossible to use A2 system-wide (at least by this method).
However, if you want A2 just for an app, calling enterA2mode() will probably work, as I used in my own app above.
Can you send me your apk?
salsichad2 said:
Can you send me your apk?
Click to expand...
Click to collapse
You mean the apk for "NoRefresh" or my drawing app?
Hi marspeople,
I would be most interested to know why the initial source code does compile ok, works on the PRS-T1 and does not install on the Nook Touch + the fixes.
With this knowledge I can write either an app to set refresh modes or within apps.
Did you succeed to compile and install on Nook?
Hi again,
in your N2EpdController.java
Code:
83: mtSetRegion.invoke(null, "aarddict", enumsRegion[region], regionParams, enumsMode[mode]);
I would like to replace the hardcoded "aarddict" by something dynamic.
What would be the correct function to infer the wanted name?
Code:
activity.class.getName()
this.getClass().toString()
.. ?
bardo8430 said:
Hi marspeople,
I would be most interested to know why the initial source code does compile ok, works on the PRS-T1 and does not install on the Nook Touch + the fixes.
With this knowledge I can write either an app to set refresh modes or within apps.
Did you succeed to compile and install on Nook?
Click to expand...
Click to collapse
Yes, sorry about the confusion, but I managed to do it, despite the A2 mode didn't work. What I did was just edit the AndroidManifest.xml, changing the android:minSdkVersion parameter to 7 (since the NST runs Android 2.1).
Good luck finding out how to set A2 mode permanently. I guess you don't have a Nook, so feel free to ask me for testing purposes.
Since the Nook A2 mode seems to be overridden when switching foreground activity, I've tried another approach with a background service which toggles A2 mode when requested by user. This way, the foreground activity isn't switched and "fast refreshing" mode works (until you change activity).
This fast refresh mode (called A2) is only possible because it uses only 1-bit depth, i.e, just black on white, meaning you can't see grayscale pictures but it's good enough for black text on white background and scrolling. I have not "created it", it is built-in from the device (you can test using the stock reader, it is activated when holding a page button). What I implemented is a way to activate and deactivate it at user will from inside any app.
Thanks to dairyknight for his N2EpdController class, which made this possible.
Thanks to bardo8430 for bringing the idea.
Thanks to AndroSS source code for screenshots used in automatic contrast.
Changelog:
01/Mar: Now when you launch the app and it is already running, it will activate NoRefresh mode. So you can also use an activation shortcut to the app using NookTouchTools (i.e. B&N's book icon at top left corner).
02/Mar: Improve activation shortcut to perform toggle between modes. Tap gestures aren't needed anymore (use "-noGestures" apk version if you don't want them).
04/Mar: Got rid of initial ghosting by redrawing the screen after activating A2.
04/Mar (2): Minor improvement of removing ghosting at screen edges.
12/Mar (Beta): Now you can adjust contrast in A2 mode. Images shouldn't be dark or black anymore if you raise the contrast a bit.
22/May: Completely redesigned version 2.0:
- Several options can be customized via settings screen.
- NoRefresh can be toggled by manual app shortcut, tap gestures or automatically according to screen animation (new).
- New App Whitelist to avoid unwanted activation in specific apps (except for manual mode).
- Background service can be launched at boot.
- Small improvements and tweaks.
- Custom app icon (finally )
06/Jun: Fix crash on empty whitelist
08/Jul: (Version 2.1)
- Automatic contrast when activating NoRefresh, according to total "brightness" of the screen (simple algorithm). This should ask you for root permission.
- Also supports manual setting in specific situations (customizable).
- Fix possible crash at startup.
26/Jul: (Version 2.2)
- Fix contrast setting behaviour
06/Dec:
- Alternative version with fixed compatibility for FW 1.2.0 available at https://github.com/marspeople/NoRefreshToggle/downloads
First Video: http://youtu.be/6pBPsyno5PY
Other Video: http://youtu.be/kBbl6egyPsQ
Another demo: http://youtu.be/5b7JjllImjM
Repository: https://github.com/marspeople/NoRefreshToggle
Great to see that it works on the Nook! Good job.
When I try to compile on Eclipse, I have to remove the below Override:
//@Override
public boolean onTouch(View v, MotionEvent event) {
otherwise I get an error: The method onTouch(View, MotionEvent) of type A2Service must override a superclass method
When I compile with this mod and run the app, nothing happens after using your gestures. Except that I tap on other icons which then try to launch other apps.
Should NoRefreshToggle keep the focus?
I have a suspicion: The PRS-T1 needs to call a function of the Sony library with extended parameters to pass the updatemode. ANY function carrying the mUpdateMode parameter would do - but it must be called. Which might be the problem here. In the used EinkListView.java, a lot of "injection" functions like below are defined.
Code:
@Override
public void scrollTo(int x, int y) {
try {
Method invalidateMethod = super.getClass().getMethod("scrollTo",
int.class, int.class, int.class);
invalidateMethod.invoke(this, x, y , mUpdateMode);
} catch(Exception e) {
e.printStackTrace();
}
But your code has neither a Listview, nor would any injection function trigger. I am afraid you would have to make the app use a ListView (or WebView).
Can you?
bardo8430 said:
Great to see that it works on the Nook! Good job.
When I try to compile on Eclipse, I have to remove the below Override:
//@Override
public boolean onTouch(View v, MotionEvent event) {
otherwise I get an error: The method onTouch(View, MotionEvent) of type A2Service must override a superclass method
When I compile with this mod and run the app, nothing happens after using your gestures. Except that I tap on other icons which then try to launch other apps.
Should NoRefreshToggle keep the focus?
Click to expand...
Click to collapse
Well, I noticed that problem of accidentally tapping unwanted widgets, I would recommend tapping on a free area of the screen. I could use an overlay button, but it would occasionally get in the way too. What do you mean by "keep the focus"?
---------- Post added at 09:13 PM ---------- Previous post was at 09:05 PM ----------
bardo8430 said:
I have a suspicion: The PRS-T1 needs to call a function of the Sony library with extended parameters to pass the updatemode. ANY function carrying the mUpdateMode parameter would do - but it must be called. Which might be the problem here. In the used EinkListView.java, a lot of "injection" functions like below are defined.
Code:
@Override
public void scrollTo(int x, int y) {
try {
Method invalidateMethod = super.getClass().getMethod("scrollTo",
int.class, int.class, int.class);
invalidateMethod.invoke(this, x, y , mUpdateMode);
} catch(Exception e) {
e.printStackTrace();
}
But your code has neither a Listview, nor would any injection function trigger. I am afraid you would have to make the app use a ListView (or WebView).
Can you?
Click to expand...
Click to collapse
Well, to capture touch events I've used a dummy View which is added to an overlay (see A2Service.java:43). Despite being an android Service instead of Activity, maybe you can instantiate your ListView there and hopefully it will work.
Thanks for the hint on the dummy view, will try.
"keep the focus"?: window manager speak, I mean that a tap stays within your app and does not act on the icons below.
bardo8430 said:
Thanks for the hint on the dummy view, will try.
"keep the focus"?: window manager speak, I mean that a tap stays within your app and does not act on the icons below.
Click to expand...
Click to collapse
Since I'm using a transparent overlay, I have to let touch events pass through, otherwise only my app would see them.
PS: I've added a demo video at a previous post.
I've been trying to improve the functionality of the app by changing from this manual toggle approach to something like: fast mode is triggered (a bit after) when user starts dragging his finger on the screen and restored when released.
However, I've been searching how to do this with no success so far. The invisible overlay that detects touch events currently is only able to capture MotionEvent.ACTION_OUTSIDE event type, which is useful to detect a tap, but can't deal with a drag. I also need that the drag is passed normally to the app below (to perform scrolling or whatever).
I've found this page (http://stackoverflow.com/questions/8073803/android-multi-touch-and-type-system-overlay) in which is proposed a solution that can detect a drag but can't pass it to the app below.
The code is now here: https://github.com/marspeople/NoRefreshToggle . I would appreciate any help from developers.
Maybe it can be run every 1 second when screen is on. I mean nook is not locked. I don't think that changing one parameter would eat battery. Is it worth a try?
Hi marspeople,
thanks again for taking this. My initial intention was to help app developers with no e-ink experience to easily adapt their code. Doing these things inside an app is much easier but needs access to the source.
See the related question on stackoverflow:
http://stackoverflow.com/questions/9391710/adapt-scrolling-swiping-to-e-ink-screens
The external app was used as a mere demonstrator to have it work on the NST and PRS-T1. Good to have a repository for it now.
marspeople said:
Ok, I think I've got it.
Since the Nook A2 mode seems to be overridden when switching foreground activity, I've tried another approach with a background service which toggles A2 mode when requested by user via a touch gesture. This way, the foreground activity isn't switched and "fast refreshing" mode works (until you change activity).
The activation gestures I'm currently using (unfortunately, it seems you can't use hardware keys using this approach) are:
- 4 "downward-right" taps (each tap must be done to the right and below the previous one) to activate (A2 mode)
- 4 "upward-left" taps to deactivate (Normal mode)
Video: http://youtu.be/6pBPsyno5PY
Here is the source code and a apk. bardo8430, I believe it would be easy to port this to the PRS-T1.
Click to expand...
Click to collapse
Noob question.
So I just install the apk and run it and I have Norefresh.
dark_hawk said:
Noob question.
So I just install the apk and run it and I have Norefresh.
Click to expand...
Click to collapse
yes, just open the norefresh app, and like the youtube video tap the screen from top left to bottom right 4 point
but i think the trade off is the screen go black&white with no grayscale (at lease for me)

[MOD] No Bluetooth Prompt For Lenovo Vibe Z2 Pro (K920)

For some reason Lenovo decided to prevent enabling Bluetooth using the standard BluetoothAdapter.enable() method and always request user confirmation in a popup for any 3rd party app.
This behavior pretty much prevents using any profile manager, Tasker or other app from automatic switching Bluetooth on. This module fixes that and allows any app to power on Bluetooth - just like with any other Android device.
v0.2: It also enables the cover to power on/off the device when using Google UI.
No Bluetooth Prompt For Lenovo Vibe Z2 Pro (K920) is also available from Xposed Module Repository (source).
Not working on lenovo vibez (k910). Can you fixed?
Great work, thanks
moneytoo said:
v0.2: It also enables the cover to power on/off the device when using Google UI.
Click to expand...
Click to collapse
Could you make a separate Xposed module just for the cover actions to work with Google UI on Lollipop?
That would be really great.
Electry said:
Could you make a separate Xposed module just for the cover actions to work with Google UI on Lollipop?
That would be really great.
Click to expand...
Click to collapse
I will probably do that but I don't have Xposed installed yet as it's not that straightforward - bootloader is locked so Xposed can't be installed using recovery. It only takes to rewrite the installation script but I haven't done that yet.
-deleted-

wide view mode trigger

https://blog.tmyt.jp/entry/2019/12/13/225204
This works on all apps
https://play.google.com/store/apps/details?id=net.refy.android.g8x.widemode
This is seriously very impressive. Nice work, only issue is it breaks the navigation bar and won't come back regardless if changing between gestures or normal navbar. Only fix is a reboot.
It does crash frequently inside an app.
kalinskym said:
It does crash frequently inside an app.
Click to expand...
Click to collapse
Could you provide some information of your device?
* Android Version
* ro.product.vendor.device
* Files inside `/system/framework`
tmyt said:
Could you provide some information of your device?
* Android Version
* ro.product.vendor.device
* Files inside `/system/framework`
Click to expand...
Click to collapse
hi, are you the developer of this awesome wide mode enabler?
If so, is it possible to enable dual screen working when folded completely (360 deg) same as lg g8X. i guess screen turns off when the magnetic latch (hall sensor) detected.
Also, possible to turn on dualscreen, switch/swap between screens, through tasker integration? disabling on-screen buttons
shameemindia said:
hi, are you the developer of this awesome wide mode enabler?
If so, is it possible to enable dual screen working when folded completely (360 deg) same as lg g8X. i guess screen turns off when the magnetic latch (hall sensor) detected.
Also, possible to turn on dualscreen, switch/swap between screens, through tasker integration? disabling on-screen buttons
Click to expand...
Click to collapse
Yes, thank you using!
- May not possibe to enable dual screen while 360 deg. Framework checks cover state internally, ignore power on message when cover fully opened.
- Turn On or Off dualscreen through tasker integration is possible.
- Switch or Swap screen can use only activities from same package if non privileged apps. Could not possible Switch/Swap from Tasker integration.
tmyt said:
Yes, thank you using!
- May not possibe to enable dual screen while 360 deg. Framework checks cover state internally, ignore power on message when cover fully opened.
- Turn On or Off dualscreen through tasker integration is possible.
- Switch or Swap screen can use only activities from same package if non privileged apps. Could not possible Switch/Swap from Tasker integration.
Click to expand...
Click to collapse
Is it optimized for dual notch in wideview?
This app is wonderful! It works for my LG v50, but I have one problem, the wide mode screen is smaller than my phone's screen, leaving black borders. Is there any way to fix this?
Sorry I mean when it crashes in app its due to say keyboard opening, or clicking on a link. I don't think it's to do with the app, just which LG allows you to modify. Like, without root do you think its possible to have widemode on all time even when switching between apps or will we have to always open a widemode using the toggle. It be awesome if you could remap the activity to a button such as Google assistant button or include in floating menu LG has. Or swipes up from navigation bar.
harysviewty said:
Is it optimized for dual notch in wideview?
Click to expand...
Click to collapse
What mean the 'optimized' that are you expecting?
tmyt said:
What mean the 'optimized' that are you expecting?
Click to expand...
Click to collapse
The system is aware that there are two notch on each half of the top bar
Cpamazing said:
This app is wonderful! It works for my LG v50, but I have one problem, the wide mode screen is smaller than my phone's screen, leaving black borders. Is there any way to fix this?
Click to expand...
Click to collapse
Half full half empty glass problem. At least you still got this update
Poor design
harysviewty said:
Poor design
Click to expand...
Click to collapse
That's not what I meant. The app itself doesn't fully fit either the dual screen or the main screen, it's smaller than both. It leaves borders around the bottom of the dual screen and the right of the main screen, as if the app is too small to fit the display. Perhaps Android 10 will fix some of these issues.
Does anyone have the APK for this? I'm wanting to try it on the Asus ROG Phone II second screen attachment just to see if it might work, and can't find the apk anywhere, or get it to download.
Gc13psj said:
Does anyone have the APK for this? I'm wanting to try it on the Asus ROG Phone II second screen attachment just to see if it might work, and can't find the apk anywhere, or get it to download.
Click to expand...
Click to collapse
No you cannot. Asus uses different developer kit for twindock. LG & Asus apps aren't cross compatible to each other. Asus dual screen games also didn't work the same on LG
And this app uses LG's own implementation (which is very new, not yet published in public for developers)
harysviewty said:
No you cannot. Asus uses different developer kit for twindock. LG & Asus apps aren't cross compatible to each other. Asus dual screen games also didn't work the same on LG
And this app uses LG's own implementation (which is very new, not yet published in public for developers)
Click to expand...
Click to collapse
That completely makes sense, but a shame. Thanks for getting back to me so quickly
Doesnt work on v50 pie. Just crashes.
snaske65 said:
Doesnt work on v50 pie. Just crashes.
Click to expand...
Click to collapse
I observed this problem from crash report, v50 pie has not API same as g8x.
I need system image of v50 pie to resolve this crash.
tmyt said:
I observed this problem from crash report, v50 pie has not API same as g8x.
I need system image of v50 pie to resolve this crash.
Click to expand...
Click to collapse
Even newer updated v50 with wideview mode?

Categories

Resources