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)
Related
Hello,
I want to force some applications to have floating windows using the (awesome ^^ ) Xposed framework.
So far, I managed to hook on the "onAttachedToWindow()" method (as explained here goo.gl/ZFb8iQ ) to set the floating layout (as explained in goo.gl/GyCXac ), which seems to work pretty well (I can't embed a screenshot due to the forum's restrictions to new members).
However, in order to set a transparent background (outside the resized app, in order to allow the manipulation of other apps in the background), the only method that I'm aware of is adding the following line in the app theme (e.g. styles.xml)
Code:
<item name="android:windowIsTranslucent">true</item>
My question is: how can I do that using Xposed ?
Thanks in advance for your help.
windowIsTranslucent can't be set programmatically AFAIK. You could try seeing where windowIsTranslucent is parsed and set (in the AOSP source code), and hook that method to enable it for your package.
GermainZ said:
windowIsTranslucent can't be set programmatically AFAIK. You could try seeing where windowIsTranslucent is parsed and set (in the AOSP source code), and hook that method to enable it for your package.
Click to expand...
Click to collapse
I see. It's a shame the Android framework doesn't allow such a thing...
Is there any other technique for forcing activities to display a floating window (programmatically) ?
Also, would it be possible, with the help of Xposed, to create a translucent floating window then "insert" a hooked activity into it ?
Or, how could I use Xposed to make an app use a custom theme ?
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.
Update 30.11.2022
End of life and open source.
Due to lots of changes both in Android and in my life, I do not have the possibility to maintain / update the code any further, therefore I've decided to open source.
Code is accessible: https://github.com/borconi/obd2aa
I will like to thank all of those who supported this project.
App Requirement
Torque Pro
OBD2 Reader
Android Auto compatible headunit or at least a copy of the Headunit Reloaded App (see signature).
This app will have limited functionality if you are using Android Auto on a your phone, the only functions you will be able to use is to see are notification about the speed cameras and street card!
Gauges and torque data will NOT work!
Previous XDA purchases can be reclaimed here: https://www.b3itlabs.com/download.php
How to purchase:
Visit: https://www.b3itlabs.com/prod.php?id=2
Instructions on how to get it running:
Option 1 - Will work on any phone & car/headunit combination, however the following features won't: - AutoPlay Music, 6 Tap limit remover, DPI change
After installing the app from XDA Labs, sign up for beta testing here: https://play.google.com/apps/testing/uk.co.boconi.emil.obd2aa and update the app
Once app is updated, make sure you disable auto-update in PlayStore then please uninstall it and reinstall it from XDA Labs.
With your screen unlocked, plug in the phone to the car, when prompted which app to use make sure you select "Android Auto"
Option 2 - Might NOT work on some device combination (for sure it won't work on Xiaomi phones), but if this method works all functions of the app are available
Install
Make sure you do not have any other 3rd party app Android Auto app installed.
Open the app and hopefully it will be quite self explanatory on how to set it up (choose colours, set gauge number, etc)
Open Android Auto (on the phone), go to About, tap the "About Android Auto" header 10 times, once you are a developer from the 3 dotted right corner menu select "Start Headunit Server" (ROOT users can skip this step!)
Close Android Auto
MAKE SURE YOUR SCREEN IS UNLOCKED and connect to the car, when prompted which app to use select "OBD2AA" and always (this needs to be done one time only) - If you are a HUR user select Android Auto and always! (If you do not see the prompt to chose, please go to settings -> apps -> all apps -> Google Play Services -> Clear Defaults and then try again)
Select the last tab on the right, by pressing it again you should see an app selector and choose OBD2AA
Give it a bit of time to start pulling the data from Torque.
Change log
Version 3.2 and 3.3 released 04/11/2018
Fix "drunk" map effect on Sync 3 units
Fixed rooted devices not being able to start headunit server.
Added option to change DPI for your screen!
Added option to auto play music on start
Added option to select default start screen.
Version 3.1 releases 26/08/2018
Compatibility fix for Pie devices.
Tap limit remover now working on all device
Tap limit remover allows Maps to be searchable even when driving.
Can be used for those who have problem with the parking brake wire.
Freeze issues fixes.
Important notes
Version 3.0 releases 05/07/2018
Compatibility fix for AA 3.0 and above.
Added option for overriding 6 tap limits
Added option for Bluetooth Audio output.
Important notes
Thanks to @slash_m_a_x for the support offered on this.
- Some users have reported choppy audio when using the app, this will mainly be due to the speed of the phone, the buffer on the car/headunit and other factors which are out of my control, if that is the case and you cannot use the app please feel free to contact me for a refund.
- Bluetooth Audio output might not work on all devices, it does depend how the car/headunit handles the Bluetooth. There will be devices which completely disable A2DP/Bluetooth capabilities of the car when Android Auto is running. In this case all the sound will be heard from the phone speaker rather then the car speakers.
- Tap limit will be disabled only for cars/headunits which are equipped with a GPS.
- In rare cases it can happen that after unplugging the phone from the headunit you will see a message which says that you are still connected to Android Auto, simply Force Stop the Google Play Services.
- You always need to make sure that Headunit Server is running on the phone (unless you have root), if the icon bothers you simply hide it.
Change log
Version 2.0 releases 17/01/2018
Added new layout option
Added styled gauged
Option for custom background on each gauge.
Option for custom needle on each gauge
Removed integration for CamSam/Blitzer.de (fully integrated now)
Possibility to change needle color
Possibility to adjust arch (indent, position, length) when using custom bg
Separated speed camera settings
Option to only download speed cam db over Wifi
Fixes for min/max value
Speed camera warnings over car speaker (Thanks @martoreto for the how-to)
Street info card
Added French translation (Credit to @fbike for doing the translation)
Added Danish (Credit to @Gunde for doing the translation)
Added Finnish (Credit to @Pyrres for doing the translation)
Added Spanish (Credit to @madabase for doing the translation)
Added Italian (Credit to @ilgaspa for doing the translation)
Version 1.6a - releases 03/10/2017
Fixed negative input for min/max values
Code cleanup
Added Greek language (credit to @sosimple for translating)
Version 1.6 - releases 29/09/2017
Fixes for custom PIDS
Fixes on Graphics rendering.
Fixed overlapping text
Fixed PSI/BAR conversion
Enhanced the gauge style.
Different approach for torque data pulling.
Moved to service should start work automatically when connected to the car
Added Supports PID alarms from Torque.
Added Toggle/Collapse layout for Pid settings.
Added Preview button with random data
Added Option to toggle units display
Added notification cleanup on exit
Added translation for DE,HU,RO (Credit to @FormelLMS for DE)
Added import/export setting option
Added option for colored text
Added TPMS option/screen
Added option to override car's headlights based on day/night
Added warning screen if nothing is configured to prevent black screen with no information.
Added more settings and move them to separate Settings options.
Added customizable background
Added search for PIDs
Added Support for Heads-Up notification
Added Speed camera warnings (powered by CamSam Plus)
Supported settings/Features:
3 x Colors for each gauge
Text color
Toggle needle, arch,units,scale,decimal and text for each gauge.
Variable number or gauges ( 1 - 15 )
Set warning limit for each gauge (percentage). This will be calculated relative to the given PID max value which is retrieved from Torque at runtime.
Possibility to set gauge in reverse mode. (example fuel tank)
Units will be converted automatically based on your Preferences in Torque
TPMS Screen (if you have PID's for TPMS data)
Possibility to use custom background/needle for each gauge
Low Fuel warning
Warm Engine warning
Speed Camera Heads Up Warning
Option to Overwrite Headlights state based on calculated sunset/sunrise
How to use it?
Open app and select each PID you want to display on your screen, adjust the number or gauges you want to see adjust the preference for each PID. If you want to use custom background/needle and interested on how to, please read HERE
Locking Pid values
On some PID's Torque reports wrong min/max values, by default if while using the application a reported value is higher/lower than the initially reported range, the app will adjust the range to the new values. However in some cases this is not desired and you will like to specify manually what is the min and max value for the give PID. In this case, simple edit the minimum/maximum for the pid and they will become locked, meaning the app won't make any adjustments.
By editing, it means you have to change the min or max value, the lock is triggered by the first keypress on this input fields.
The lock will be automatically removed when you select a different PID for the same gauge.
Preferences menu
Alternative pulling - Only enable this option if you have difficulties getting gauges updated, it uses an old deprecated method of obtaining data so should not really be used.
Enable debugging - Only enable it if you have problems with the app and I requested you to collect a bug report, otherwise it will spam the logs for no reason.
Automatically start Torque on Android Auto - Nothing to explain here
Launch FartKontrol on start - launches a Danish Speed Camera app (useless outside Denmark)
Custom Background (any background you will like to use instead of the black color)
Demo - When enabled random data is generated for the PID's just to see how things will look (in case you do not have an OBD2 adapter), so don't enable it.
Pid Alarms section. You can set up a low level fuel warning (displayed as a heads up notification) and a notification when the engine is warmed up. There a several PID options for both of this, pretty self explanatory.
TPMS Settings
- You set up the 4 PID's for TPMS, this will be used to display the tyre pressure values on the TPMS screen inside Android Auto
Speed Camera
Show current street card - Displays information about current street (name and speed limit if know). This information is updated once in 5 seconds and at a minimum distance of 200 meters so it's not 100% accurate it's more for general information.
Enable speed camera warnings - This will enable the app to display speed camera warning when driving, like any app which does this it relies on a database, which means it does NOT guarantee that it will warn you of all the cameras, and it might also produce false warnings. All options are pretty self explanatory.
Export & Import
- Allows you to export your current app configuration file which can later be imported (grate way of saving time of re-doing everything) after a clean install or so. The format use for Export & Import is JSON so if you want you can manually edit/adjust the values. Please see following post for more details about the sturcture/value/meanings
Permissions
Read notification permission - Only required so the app can read the notifications from CamSam and display them on AA scren
Locations - Only required if you want the app to overwrite the day/night theme based on sunset/sunrise
Storage - Only needed if you want to use your personal image as a background and/or planning to import/export settings
Can I create my own layout for the gauges?
- Yes, see instructions below:
Here is an example of the XML structure required, once you created the XML please send it over by email to [email protected] and I will include it in the next build.
Code:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:tag="wrapper_layout">
<!-- Left column -->
<View
android:layout_width="226dp"
android:layout_height="226dp"
android:layout_gravity="center_vertical|start"
android:tag="gauge_2"
/>
<!-- Middle column -->
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:tag="gauge_1" />
<!-- right column -->
<View
android:layout_width="226dp"
android:layout_height="226dp"
android:layout_gravity="center_vertical|end"
android:tag="gauge_3" />
</FrameLayout>
Important
Each view must contain a tag, which is formated like in the example, where the number corresponds to the Gauge number from the setting screen.
The layout which wraps everything together must have a tag called: wrapper_layout
You are free to use any Layout you want, except ScrollView.
How to produce bug report?
Step 1 you need to enabled debugging in OBD2AA app, then follow this instruction set:
2. Enabling Developer Mode
Open Settings > About phone.
Scroll down to the Build number.
Tap the Build number 7 times in quick succession until "You're now a developer" appears.
Return to the Settings menu and select Developer options.
At the top of the screen, make sure 'Developer options' is set to On (green).
Scroll down to Debugging and enable both USB debugging and Bug Report Shortcut on (green).
Tab on Logger buffer sizes: Default setting is 256K. Select 16M to help capture more information for debugging. Of note, it can affect the apps performance especially with lower spec phone, so change it back after you have finished submitting bug reports.
3. Capturing a Bug Report
It's very important to do this right after you experience the issue again, so your device can log at least one occurrence of the issue.
Hold the Power button down until the menu appears.
Select Take bug report. and wait for the device to capture the bug report.
Tap the 'Bug report captured' notification when it appears.
Share the bug report. (I recommend to email it to yourself.)
Download the bug report to your computer.
Send the bug report by email to [email protected]
I have decided to open up my software, meaning I have made the source code available on GitHub, but it's only available for personal use, and you are not allowed (under any form) to redistribute your own version of the app. You can download and compile it yourself if you wish to do so, and you can implement your own changes for your own personal use, but you cannot create clones of the software which you redistribute under your own name. Source can be found here: https://github.com/borconi/obd2aa.
Due to the fact that there are some irresponsible developers out there, who created video apps for moving cars, which was one of the main reasons Google blocked 3rd party apps, I won't be updating the code on github any more, to try to prevent those developers to use my technique to overcome the limits. If you are developing a 3rd party app and you will like to know more about how I have done this, you are always welcome to contact me. If your project is something useful, I will be more then happy to share things with you.
This does not mean it is now a free app and apk can be freely shared!
Amazing work Emil, this along with your (and ofcourse @mikereidis) Headunit Reloaded app is perfect for Android Auto on the cheap ,
Gotta subscribe to this thread! The possibility of custom PIDs would be of huge interest to me.
Seems like its stuck without any option to change on Kmph rather than mph for speed etc, its set to mph in torque
fma965 said:
Seems like its stuck without any option to change on Kmph rather than mph for speed etc, its set to mph in torque
Click to expand...
Click to collapse
Yeap a few things to iron out....
Just to tired to work on it tonight.... it was a long one yesterday to get the alpha done for today but planning to work on it this weekend....
Emil Borconi said:
Yeap a few things to iron out....
Just to tired to work on it tonight.... it was a long one yesterday to get the alpha done for today but planning to work on it this weekend....
Click to expand...
Click to collapse
No worries, i wrote that quickly... other than that seems good, still figuring out what my car supports though. thinking about selling my tablet setup and buying the same car thing as me
fma965 said:
No worries, i wrote that quickly... other than that seems good, still figuring out what my car supports though. thinking about selling my tablet setup and buying the same car thing as me
Click to expand...
Click to collapse
Well I love my setup but I HATE my handsfree, have to come up with some solution for that because it's cr...
Emil Borconi said:
Well I love my setup but I HATE my handsfree, have to come up with some solution for that because it's cr...
Click to expand...
Click to collapse
does it not support external microphones?
fma965 said:
does it not support external microphones?
Click to expand...
Click to collapse
No. I have to try with a USB soundcard (which I use with my Odroid) but haven't got the chance yet, or I might just hook my himbox to the AUX in and use it that way. The built in mic is almost unusable especially over 30 MPH.
And first version of the app is live!
Bought, installed and looking good.
I've got the Prius PIDs plugin installed in Torque so I can see the data on my Prius C.
Only about half those PIDs are available to be selected, it looks like it's hitting the maximum number of allowed items in the "Select PID" list.
Great, could you please tell me, where I can find it?
FormelLMS said:
Great, could you please tell me, where I can find it?
Click to expand...
Click to collapse
The XDALabs app was a pain, I had to:
Install the XDA app from the Play Store
Log in
Install the XDALabs app it prompted me to install
Log in again
Then open Emil's link from the first post in the XDALabs app.
Ok, thank you. Any chance to have this in play store?
Hi.
Sorry for the pain caused by XDA labs, unfortunately Google play rejected the app submission so I cannot make it available trough that channel.
As for custom PIDs yes intending to support them in the future. Currently torque doesn't provide a method to expose them to 3rd parties so I need to speak with Torque developer if that is possible, alternatively I will need to fallback to manual PID configuration.
I will see if I can build a quick webpage to host/sell the app could potentially make it easier to get the app, but it will make it more difficult to keep it updated.
Emil Borconi said:
Sorry for the pain caused by XDA labs, unfortunately Google play rejected the app submission so I cannot make it available trough that channel.
Click to expand...
Click to collapse
Understood, I had a feeling Google wasn't going to allow it.
One of the issues with XDA is that you can get there via the web but it's not obvious at all how to buy it from there.
Then you have to jump through hoops to get the right app.
Emil Borconi said:
As for custom PIDs yes intending to support them in the future. Currently torque doesn't provide a method to expose them to 3rd parties so I need to speak with Torque developer if that is possible, alternatively I will need to fallback to manual PID configuration.
Click to expand...
Click to collapse
It's already showing around half of the Prius custom PIDs, it's like the list just runs out of space for more items.
edit:
Screenshot link
leonkernan said:
Understood, I had a feeling Google wasn't going to allow it.
One of the issues with XDA is that you can get there via the web but it's not obvious at all how to buy it from there.
Then you have to jump through hoops to get the right app.
It's already showing around half of the Prius custom PIDs, it's like the list just runs out of space for more items.
Click to expand...
Click to collapse
I'll send you a logging version at some point this weekend just to see if how much data Torque actually send over. For example it doesn't show any of my custom PIDs for KIA.
Thanks for this, it is awesome..
A magnificent add to the current great app.
Here is photo of my test
too low ISO 320.
My Observation:
1: I added in Gauge 2 : Volts(CM), then put "13.5" in W.Level 1, and 12 in W.Level 2, when I switch to ODB2AA it wont open and switch back to the current tab.
then I changed W.Level 1 to "13" and it works, so looks like it wont accept a decimal value!, don't know if its a bug or error from my side.
2: Each time I switch to the OBD2AA tab it takes 13s for the data to be pulled.
3: Just once "no data pulling", I had to unplug/plug usb to work.
suggestion:
* It would be good if there is a timeout option for the data pulling to stop, so no 13s delay when switch back and forth in that time, I don't know if it is applicable in AA.
Great job Emil.
MAJED.y said:
A magnificent add to the current great app.
Here is photo of my test
My Observation:
1: I added in Gauge 2 : Volts(CM), then put "13.5" in W.Level 1, and 12 in W.Level 2, when I switch to ODB2AA it wont open and switch back to the current tab.
then I changed W.Level 1 to "13" and it works, so looks like it wont accept a decimal value!, don't know if its a bug or error from my side.
2: Each time I switch to the OBD2AA tab it takes 13s for the data to be pulled.
3: Just once "no data pulling", I had to unplug/plug usb to work.
suggestion:
* It would be good if there is a timeout option for the data pulling to stop, so no 13s delay when switch back and forth in that time.
Great job Emil.
Click to expand...
Click to collapse
Check your email The version you are mentioning is the Beta, the release version has all those sorted
Sorry I'm moving too fast
My screen dims when the background is black or when there are only few images or texts present in the screen. Is it normal even though adaptive brightness is off? Please help.
I have the same question but with the Adaptive Brightness ON. Can anyone explain how adaptive brightness and screen dimming works in MI A2? I'm a little confuse.
@Calamity.exe
Just tested and I noticed the exact same behavior on mine as well.
I'm using a black background and have 'Adaptive brightness' in 'Settings' disabled.
I also went as far to disable 'Content Adaptive Backlight Settings' and this changed nothing.
Using a third-party tool like 'Lux Lite' helps somewhat but don't expect massive gains.
I did more research and found that many of the Xiaomi devices released in 2017 and onward use one the following display manufacturers:
Tianma OR BOE
The specifications differ (Screen Size/Resolution) but it appears the problems don't; specifically input latency, touch and color accuracy.
However I couldn't find any reports concerning 'Dark Mode' on other models (specifically the Mi 6x which uses built-in themes courtesy of MIUI) so my only hypothesis is a software-related bug.
REQUEST: Can ANYONE who switched their Mi A2 to a 6X confirm this behavior?
ADDENDUM: Keep in mind that none of these displays are high quality. So to achieve a specific price point, Xiaomi could have easily cut corners in both manufacturing AND software testing.
I found the solution. Posting in a moment.
Mi A2 Screen Dimming - No Longer Relevant
EDIT: Clarified explanation of problem statement, restructured text and remove third step.
Scenario:
In some circumstances, where a User has a black background/wallpaper, they may encounter unnecessary screen dimming after switching back from a bright background (e.g., colorful image/video) on the Mi A2.
'Content Adaptive Backlight' appears to be the issue and, as such, may need to be disabled.
Due to how Content Adaptive Backlight operates, this, in many cases, is the intended behavior.
NOTE: Before proceeding further, please ensure you have the latest software updates installed.
What is 'Content Adaptive Backlight'?:
'Content Adaptive Backlight' evaluates the content displayed (e.g., a black background) and actively reduces the amount of light to the display in order to save battery without diminishing quality of the image.
Possible Solution:
Disabling 'Content Adaptive Backlight' via ADB/third-party tool or uninstalling it with root permissions ISN'T the solution. Nor is 'Force Stop', 'Clear Data' or 'Clear Cache'.
We NEED to explicitly access 'Content Adaptive Backlight Settings' via an 'Activity'.
I will NOT be providing support/troubleshooting for ANY of the two available options. Step 1 & 2 are amongst the safest/easiest but you proceed at your own risk. If you are unfamiliar with them, I strongly suggest researching first before attempting. Alternately please use the XDA search as these functions/utilities have been covered in multiple posts. If I am, however, unclear in my instructions, please ask and I will better explain.
There are TWO steps we can utilize to disable 'Content Adaptive Backlight Settings':
1.) Third-Party Launcher (e.g., Nova)
See attached video (20181206_011734.7z). You will need 7zip to decompress.
2.) Using an ADB command
adb shell am start -a android.intent.action.MAIN -n com.qualcomm.cabl/com.qualcomm.cabl.CABLPreferences
Once you've launched 'Content Adaptive Backlight Settings, uncheck 'Enable Content Adaptive Backlight', exit the application and restart your device.
I think it's Qualcomm Assertive Display that doing that.
A_H_E said:
Cause:
'Content Adaptive Backlight' appears to be the issue and, as such, needs to be disabled.
However, due to how Content Adaptive Backlight operates, it is actually behaving correctly.
So this isn't a bug.
'Content Adaptive Backlight' evaluates the content displayed (e.g., a black background) and actively reduces the amount of light to the display in order to save battery without diminishing quality of the image.
However disabling 'Content Adaptive Backlight' via ADB/third-party tool or uninstalling it with root permissions ISN'T the solution. Nor is 'Force Stop', 'Clear Data' or 'Clear Cache'.
We NEED to explicitly access 'Content Adaptive Backlight Settings' via an 'Activity'.
Resolution
I will NOT be providing support/troubleshooting for ANY of the three available options. Step 1 & 2 are amongst the safest/easiest but you proceed at your own risk. If you are unfamiliar with them, I strongly suggest researching first before attempting. Alternately please use the XDA 'Search' as these functions/utilities have been covered in multiple posts. If I am, however, unclear in my instructions, please ask and I will better explain.
There are three steps we can utilize to disable 'Content Adaptive Backlight Settings' with Nova being the preferred and easiest method.
1.) Third-Party Launcher (e.g., Nova)
See attached video (20181206_011734.7z). You will need 7zip to decompress.
2.) ADB
adb shell am start -a android.intent.action.MAIN -n com.qualcomm.cabl/com.qualcomm.cabl.CABLPreferences
3.) Build.prop
Add ro.qualcomm.cabl=0 to the bottom, save the file and reboot the device.
Nova is preferred, followed by ADB and only if need be, build.prop (not preferred).
Once you've launched 'Content Adaptive Backlight Settings, uncheck 'Enable Content Adaptive Backlight', exit the application and restart your device.
Click to expand...
Click to collapse
@ A_H_E, Thanks for the response.
I've tried disabling it through Nova Launcher but the problem still persists. Should I still perform ADB and Build.prop?
I've also contacted the local Mi service center and they're saying that it's probably hardware (LCD problem).
Well I'm not sure I know exactly what the problem is but I tried the Nova method - CABL was enabled. When I disable it, I see no change. Also a I didnt notice my screem dimming when using my phone... I have stock A2 on 2nd November update Oreo. Can you point to situation, where this occurs? The phone only changes to black theme when I have black wallpaper. Also, is there CABL setting available ,,normal" way (e.g. from Settings menu)?
@Calamity.exe
No, there's no further steps you need to take. The only other suggestion I would recommend is removing the black wallpaper and seeing if the problem persists. If it does, head to the repair center.
@Infernus-cz
The issue, based on my testing, only occurs when a User has a black background (wallpaper). In Oreo, this will enable 'Dark Mode' (e.g., Drop-down Menu/Quick Settings changes from white to dark). When a User switches from a black background to a more colorful image, the dimness decreases however when they switch back to their black background, the screen dims again.
If you aren't seeing the problem, there's no need to disable CABL.
If you want to access CABL without Nova, use the following line in ADB to call the CABL settings:
adb shell am start -a android.intent.action.MAIN -n com.qualcomm.cabl/com.qualcomm.cabl.CABLPreferences
You raise an interesting point. The issue MAY be dependent on the version of software (e.g., I'm using the October update and see it) but you are on the November release and haven't encountered it.
A_H_E said:
@Calamity.exe
No, there's no further steps you need to take. The only other suggestion I would recommend is removing the black wallpaper and seeing if the problem persists. If it does, head to the repair center.
@Infernus-cz
The issue, based on my testing, only occurs when a User has a black background (wallpaper). In Oreo, this will enable 'Dark Mode' (e.g., Drop-down Menu/Quick Settings changes from white to dark). When a User switches from a black background to a more colorful image, the dimness decreases however when they switch back to their black background, the screen dims again.
If you aren't seeing the problem, there's no need to disable CABL.
If you want to access CABL without Nova, use the following line in ADB to call the CABL settings:
adb shell am start -a android.intent.action.MAIN -n com.qualcomm.cabl/com.qualcomm.cabl.CABLPreferences
You raise an interesting point. The issue MAY be dependent on the version of software (e.g., I'm using the October update and see it) but you are on the November release and haven't encountered it.
Click to expand...
Click to collapse
@ A_H_E
Removing the black wallpaper or any black background solves the problem (I guess). But whenever I open apps that have a default black background, the problem recurs.
I also have the November release like @Infernus-cz
Interesting.
On my device, once I disable CABL, I see the difference.
However, in your case, I need to understand if this is intended behavior or not.
If disabling the black background somewhat fixes the problem, we at least have a workaround.
Let me do some more digging on my end.
If anyone else has theories, I'd be interested in hearing them.
---------- Post added at 09:19 PM ---------- Previous post was at 08:48 PM ----------
For the interim, I've reached out to Xiaomi directly to inquire further. Will update when I have more details to share.
I don't think this is a software problem. The problem is that the screen doesn't employ local dimming technique for dark and light area of display. Therefore, the brightness of the screen is derived from the object displayed. So, while using dark theme, if any light image comes to any part of the screen, brightness of the whole screen is adjusted to display that lighter part.
This is more of a hardware condition than a software problem.
@kandarpjha
Do you have a source for this information? I've seen this exact problem referenced numerous times between the Mi A1 and Mi A2 on multiple forums but this is the more (most even) sensible answer I've encountered.
A_H_E said:
@kandarpjha
Do you have a source for this information? I've seen this exact problem referenced numerous times between the Mi A1 and Mi A2 on multiple forums but this is the more (most even) sensible answer I've encountered.
Click to expand...
Click to collapse
I don't have a source currently. But i wrote what i observed. I use all the apps in dark mode wherever available. This thing is happening in all the apps, especially in apps using pure black background than dark grey one. I'll post again if i find the source.
Xiaomi Response
Hello,
Writing to update thread.
@kandarpjha has the correct answer.
I am attaching a redacted email (personal details hidden) of a back & forth conversation I had with their Support department (their first response wasn't relevant nor helpful).
We now have an official explanation (although very short) and an excellent explanation given by kandarpjha.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
P2oggle
The Lenovo P2 features a somewhat unusual hardware switch (referred to by Lenovo as the "one-key power saver"). On the stock ROM this switch toggles a battery saving mode but in aftermarket development it has remained unused - until now. P2oggle (pronounced "P-Toggle") is an app which enables this switch and allows you to assign toggleable "actions" to it.
DOWNLOAD(v1.2)
Currently, available actions include:
Flashlight
Silent mode
Battery saver
Aeroplane mode
Wi-Fi
Mobile data
Bluetooth
NFC
Location
Silent
Vibrate
Priority only
Alarms only
Total silence
Play/pause
Caffeine
Dictaphone
Actions can be configured separately for when the screen is on or off. If you have suggestions for any you think would be useful, please make them below and I will be happy to add them.
Additionally you can configure P2oggle to broadcast switch events for other apps.
Requirements
Since the Android input stack more or less ignores the existence of hardware switches, P2oggle uses the kernel's input event interface (evdev) directly. It therefore requires a rooted device. You will need a superuser binary that includes supolicy and BusyBox, e.g. Magisk.
The service that listens for switch input consumes minimal resources: in my testing battery usage has never risen above 0% with memory consumption averaging about 25 MB, depending on the actions selected.
P2oggle is compatible with the stock ROM and should work with all custom ROMs and kernels. I wrote it for the P2a42 (global variant) but it should also be fully compatible with the P2c72 (domestic variant). If it works for you please let me know.
If you are on stock you will probably want to disable the power saver mode from being bound to the switch in order to use P2oggle properly. You can do that by running su -c pm hide com.lenovo.powersetting in a terminal emulator or adb shell. Replace hide with unhide to reverse.
P2oggle is released under the Mozilla General Public License version 2.0. As always, please post any feedback/suggestions/bug reports below, or open an issue on GitHub if you prefer.
Changelog
Latest version - 1.2
Changes in this release:
Bug fixes
Fixes a crash when the service tries to start on an unrooted device
Older versions
1.1
Changes in this release:
Enhancements
New app icon
New overlay icons for Flashlight
Service notification is now hidden on lock screen by default
Optimisations
Updated SDK version to 29
Write external storage is no longer requested on Android 10 and up
Bug fixes
Fixed Dictaphone on Android 11 and up
1.0
Changes in this release:
Enhancements
Added much-requested Dictaphone action
Optimisations
Removed unnecessary library dependency
Many code cleanups and linter warnings fixed
Bug fixes
Fixed service unresponsive to configuration changes until restarted
Fixed Caffeine not working on all ROMs
Fixed overlay delay on Android 10+
Fixed horrible hangs when su access denied
Fixed su sometimes not being detected until app restart
0.4
Changes in this release:
New action: Caffeine
Fixed a crash on unrooted devices
0.3
Changes in this release:
App should now be compatible with Android 10
Minimised number of su processes to reduce toast notification spam from Magisk and lag on enabling service
0.2
New in this release:
New actions: Vibrate, Silent, Play/pause, Location, Priority only, Alarms only
New option: Emit broadcasts for other apps - this lets you extend P2oggle with apps such as Tasker
Overlay theming options added
Action Silent mode renamed to Total silence to better represent its function
Better error messages on initial setup
Bug fixes in this release:
Overlay should now be completely reliable
Disabling Start on boot now actually works
Service now immediately unbinds from switch when disabled
Disabled Notification settings and Hide intents on N, where using these options would prevent the overlay from working
Fixed superuser access not being detected until app restart
0.1
Initial release
[/B]
XDA:DevDB Information
P2oggle, Device Specific App for the Lenovo P2
Contributors
Prospero.X-3
Source Code: https://github.com/biqqles/p2oggle
Version Information
Status: Stable
Current Stable Version: 1.2
Created 2019-09-06
Last Updated 2022-02-20
When i try to enable it say this app is for the Lenovo P2 which your device doesn't seem to be.
Sutcliffe9 said:
When i try to enable it say this app is for the Lenovo P2 which your device doesn't seem to be.
Click to expand...
Click to collapse
Oh, oops. I meant to remove the device compatibility check prior to release as accurately determining the device across all possible setups is difficult and the check doesn't serve much purpose anyway - it's clear the app is device specific. Try now.
It keep asking root access even after switch on root access in magisk...i'm on AEX ROM
---------- Post added at 02:29 AM ---------- Previous post was at 02:14 AM ----------
root access message gone after clearing data
1- run the app
2- go to magisk and give it access
3- clear data and re-open app
The app run perfectly right now i will report if anything show up
Thmank you i really find it good i mean gooooood
Awesome..
I almost forgot about this switch lol
Great initiative....
Everything is working perfectly...
Both screen on and screen off actions are working
Thanks for the development
WoW works Really Great...Thank you so much...Please try to map fr Wifi Hotspot also.
Nice work man !! ?
Awesome!
Can you add to еhe action toggle for maximizing screen brightness by switching on and off Outdoor mode in live display options?
This is awesome, thanks very much.
Wow. Nice work.
Its really nice to finally use the switch. I'm surprised it wasn't seized solid due to lack of use ?
It works very nice.
I'm using it to turn on the flash. Sometimes it happens that the system decects the up position of the switch as "off", so the flash turns on for a moment, then turns off and on again. After the first attemp, it works nice.
Maybe it's only that I've never used the switch, so I need to loosen it!!!
its awesome man
thank you very much
i am using it for flashlight when off-screen and silent switch for on-screen
hope rom developers merge it in advanced settings app
DS-1 said:
It works very nice.
I'm using it to turn on the flash. Sometimes it happens that the system decects the up position of the switch as "off", so the flash turns on for a moment, then turns off and on again. After the first attemp, it works nice.
Maybe it's only that I've never used the switch, so I need to loosen it!!!
Click to expand...
Click to collapse
That certainly could be the result of a stiff switch. If it's still happening please run su -c getevent -lt /dev/input/event4 in a terminal emulator and toggle the switch a few times, then attach a screenshot here. That will print the raw input events directly from the switch.
HACKIMTOSH said:
It keep asking root access even after switch on root access in magisk...i'm on AEX ROM
---------- Post added at 02:29 AM ---------- Previous post was at 02:14 AM ----------
root access message gone after clearing data
1- run the app
2- go to magisk and give it access
3- clear data and re-open app
The app run perfectly right now i will report if anything show up
Thmank you i really find it good i mean gooooood
Click to expand...
Click to collapse
Thanks for pointing this out - I actually didn't consider that the user could press back or tap out of that dialogue rather than press OK which closes the app. This is fixed and will be out in the next release.
balugudidiot said:
WoW works Really Great...Thank you so much...Please try to map fr Wifi Hotspot also.
Click to expand...
Click to collapse
This should be possible. I'll add it in the next release.
comunity said:
Awesome!
Can you add to еhe action toggle for maximizing screen brightness by switching on and off Outdoor mode in live display options?
Click to expand...
Click to collapse
I don't believe toggling outdoor mode will be possible but I'll think about ROM-specific actions more generally.
I'm planning to also add a "Custom" action so you can trigger custom shell commands with the switch. That will probably be a little bit down the line though.
I've just realised that if you're still on stock you will probably want to disable the ultra power saver mode from being bound to the switch in order to use P2oggle properly. You can do that by running su -c pm hide com.lenovo.powersetting in a terminal emulator or adb shell. I'm only basing that off looking at my stock image so I can't guarantee there will be no side effects. Replace hide with unhide to reverse.
Prospero.X-3 said:
I've just realised that if you're still on stock you will probably want to disable the ultra power saver mode from being bound to the switch in order to use P2oggle properly. You can do that by running su -c pm hide com.lenovo.powersetting in a terminal emulator or adb shell. I'm only basing that off looking at my stock image so I can't guarantee there will be no side effects. Replace hide with unhide to reverse.
Click to expand...
Click to collapse
silent mode in settings is don't disturb ..
please change this to Ring/Vibrate mode if possible
IDK if, it's possible or not, but can you please add something like the Nova Launcher's "Custom activities" or "Custom Actions" to the toggle app. So that, it can trigger the activity/actions, whatever is assigned to it.
Btw, thanks for the really awesome app.
1lovedeep said:
silent mode in settings is don't disturb ..
please change this to Ring/Vibrate mode if possible
Click to expand...
Click to collapse
It's a good idea!
1lovedeep said:
silent mode in settings is don't disturb ..
please change this to Ring/Vibrate mode if possible
Click to expand...
Click to collapse
Good point, I didn't consider that that would be confusing. I actually intended this to mimic the "silent" option OnePlus's tri-state switch has but I misremembered how it works. Rather than using do not disturb's "total silence" it sets the ringer mode to silent and the media volume to zero. I will change the behaviour of silent mode to do this in the next release and also add an option for vibrate. Eventually, before the list of actions gets too unwieldy, I would like to compress actions into categories (e.g. "ringer mode", "do not disturb") which are configurable. That will require a fairly large overhaul though.
hackiee said:
IDK if, it's possible or not, but can you please add something like the Nova Launcher's "Custom activities" or "Custom Actions" to the toggle app. So that, it can trigger the activity/actions, whatever is assigned to it.
Btw, thanks for the really awesome app.
Click to expand...
Click to collapse
I think this would be possible but to be honest I would prefer to only have actions which are technically "toggleable". Opening an activity is not something which is toggleable, which means an inconsistency arises: moving the switch up does something and moving it down does nothing. In other words, the switch stops behaving as switch and instead behaves as a button that needs to be manually reset. I could add it if enough people want it but to me it feels slightly wrong. Note that this would be possible, albeit in a less user-friendly way, with the custom shell command option mentioned earlier.
Oh, while I remember, has anyone got this working on the P2c72?
Hello,
thanks a lot for your efforts on getting a use for that switch!
My p2a42 (3GB of ram, 32GB of storage) is running the latest official LOS 16 nightly and the official LOS su zip, and your tool displays it as unsupported.
I have tried to use "su -c getinput -lt /dev/input/event4" with no luck, the command getinput is not there.
I guess that either the kernel or the root method that I'm using is not compatible.
Is there something I could do to get the official LOS supported?
Thanks!
Jk
PS: how about getting compatible with tasker scripts btw?
PPS: I used the getevent command instead and here is what I'm seeing:
when switch pushed to top:
/dev/input/event4: 0005 0013 00000001
/dev/input/event4: 0000 0000 00000000
when switch pushed to bottom:
/dev/input/event4: 0005 0013 00000000
/dev/input/event4: 0000 0000 00000000
jk77 said:
Hello,
thanks a lot for your efforts on getting a use for that switch!
My p2a42 (3GB of ram, 32GB of storage) is running the latest official LOS 16 nightly and the official LOS su zip, and your tool displays it as unsupported.
I have tried to use "su -c getinput -lt /dev/input/event4" with no luck, the command getinput is not there.
I guess that either the kernel or the root method that I'm using is not compatible.
Is there something I could do to get the official LOS supported?
Thanks!
Jk
PS: how about getting compatible with tasker scripts btw?
PPS: I used the getevent command instead and here is what I'm seeing:
when switch pushed to top:
/dev/input/event4: 0005 0013 00000001
/dev/input/event4: 0000 0000 00000000
when switch pushed to bottom:
/dev/input/event4: 0005 0013 00000000
/dev/input/event4: 0000 0000 00000000
Click to expand...
Click to collapse
At first glance I'm guessing that Lineage's su binary doesn't support SELinux patching. Use Magisk if you can. I've never used Tasker but it looks like it's possible to trigger Tasker tasks with broadcasts so it should be possible. And yeah, I meant getevent, thanks (should have checked before posting). Edited it now.