Related
hey does anyone know i can get my Black Majik to stay permanently in landscape mode unless I change the settings? I don't like the delay in the screen when i open the keyboard and I'd rather the screen just always be in landscape mode unless i absolutely need to read something in portrait (rarely).
Thanks.
ive been looking for this since i got a ppc
Do you think this is a Hermes issue or all WM6 htc phones? I just think that its sad that the interface to type and look up contacts on my old sidekick is faster than my Hermes!
I think, it's not possible, unless you remove the magnet between the case and the keyboard.
Here are some settings:
HKLM->System->GDI->Rotation
and here are some tweaks:
Hide/Show Screen orientation icon
If you wish to hide the Screen orientation icon, shown in the task bar on some devices, you can set:
HKLM\Services\?ScreenRotate\ShowIcon = 0 (DWORD decimal)
HKLM\System\GDI\Rotation\HideOrientationUI = 1 (DWORD decimal)
And to show it again:
HKLM\Services\?ScreenRotate\ShowIcon = 1 (DWORD decimal)
HKLM\System\GDI\Rotation\HideOrientationUI = 0 (DWORD decimal)
If this doesn't work, you can try:
HKLM\Services\screenrotate = 0 (DWORD decimal)
And to show it again:
HKLM\Services\screenrotate = 1 (DWORD decimal)
Note that this icon and its feature may not be available on your device at all.
lynxxx said:
I think, it's not possible, unless you remove the magnet between the case and the keyboard.
Here are some settings:
HKLM->System->GDI->Rotation
and here are some tweaks:
Hide/Show Screen orientation icon
If you wish to hide the Screen orientation icon, shown in the task bar on some devices, you can set:
HKLM\Services\?ScreenRotate\ShowIcon = 0 (DWORD decimal)
HKLM\System\GDI\Rotation\HideOrientationUI = 1 (DWORD decimal)
And to show it again:
HKLM\Services\?ScreenRotate\ShowIcon = 1 (DWORD decimal)
HKLM\System\GDI\Rotation\HideOrientationUI = 0 (DWORD decimal)
If this doesn't work, you can try:
HKLM\Services\screenrotate = 0 (DWORD decimal)
And to show it again:
HKLM\Services\screenrotate = 1 (DWORD decimal)
Note that this icon and its feature may not be available on your device at all.
Click to expand...
Click to collapse
Well the orientation problem is with hermes. I saw other models of HTC and they are accepting the changes very well. And asked to make it fixed not to remove the icon from the settings.
FINALLY... WHAT YOU HAVE ALL BEEN WAITING FOR
Originally posted from here
shlomki said:
I've come to notice that no one REALLY knew how to fully disable screen rotation on WM devices.
Some offered 3rd party apps to get the job done, some only knew how to disable automatic rotation, but when the device went into standby and woke up again - the screen rotated back. So that didnt really work.
So if you're as desperate as i was about screen rotation,
this is what you need to do:
1. Get dotfred's free taskmanager HERE, and run it.
2. Go to "Devices" tab, and look for "MIS1:" device (oem_misc.dll)
3. Long-Tap on it, and tap on "Stop"
4. Long-Tap on it again, and now choose "Set Manual"
5. Go to "Notifications" tab, and look for "Notifications\NamedEvents\VCPowerWakeupEvent"
6. Tap on it to make it selected
7. Disable it
(In dotfred's taskmanager, there should be a button for disabling it, but for some reason some devices couldn't see the button icons, although the buttons are still clickable. Under the notifications list there is an empty light-blue line - the buttons are there, eventough you can't see them.
The disable buttons is somewhere i the middle of that light-blue line, just tap the center until a message box popps up and asks if you'd like to disable this notification - Tap on yes.)All those steps are a one time deal - they stick even after an SR.
This has been tested on htc universal and works great.
The screen will keep its orientation even if you flip your screen, take out your built in keyboard, or turn the device off and back on.
The only time your screen will revert back to the original orientation is when you soft reset your device.
Hope this helps
Click to expand...
Click to collapse
If I'm already releasing alpha software, why not this one, too...
SEE BUG REPORT AT END.
Here is a calculator for the dash. The idea is similar to Lygea 123 and 1-calc for the s620, in that it displays a replacement keyboard on the screen. This way one can use our dash almost like any other scientific calculator. Why did I make this one when the other two already exist?
Lygea 123 is not a scientific calculator, but instead just a financial/business calculator, so it didn't have the features I wanted. And I didn't like the interface of 1-calc....
It is very rough, and I'm sure has some bugs. But it is quite usable - it is the calculator that I use. The problem is that I don't have time to work on it now, but I think people might already enjoy it!
It might be a bit strange to use - it is a mixture of infix and prefix. You can use it as a regular calculator if you like, and everything should work as expected.
Here is an example of how it can be used:
say you want to calculate
2*sin(40+35)
you enter: 2 * sin ( 40 + 35 ) =
you can also enter: 2 * ( 40 + 35 ) sin =
(which would be like a regular calculator - infix)
to calculate sin(60) you can enter
60 sin =
or
sin 60 =
to calculate 1/4 +3 you can type
[1/x] 4 + 3 =
or
4 [1/x] + 3 =
Notice that because of this strange way to calculate things, the result of 4 [1/x] is only displayed when you type '+'. (maybe a later version will not have this 'problem')
the button 'ANS' recalls the last answer (the result of the last time '=' was pressed)
There is now prelimnary unit conversion. It isn't really optimal. What I'd really like is to be able to do
1 [m] + 3 [feet] =
Currently, it just switches the current number displayed. So to convert m to inches, do this:
2.5 [m] [inch]
To switch to unit conversion mode, press right. To switch back, press left.
To store in a memory location, hit STO, and then write the location. Valid locations are 0..99
memory locations 0..9 are displayed under the respective key.
STO+ STO- STO* STO/ do operations on those locations.
example:
1+4 = [STO] 9 =
memory location 9 now contains 5.
You can also do operations while doing calculations.
34 + 60 [STO] 3 =
displays 94, and 60 is stored in memory location 3.
To recall simply hit recall, and the location
34 [STO] 3 =
5 + [RCL] 3 * 9 + [RCL] 3 =
should give
5 + 34 * 9 + 34, i.e. 345.
The calculator still does not remember things across separate invocations.....
################################################
BUG:
There currently is a problem with using the calculator postfix.
So you can calculate
sin(60) by typing
60 sin =
or
sin 60 =
But there are problems with using two operations postfix.
sin(60^2) will give the wrong result if done like this:
60 [x^2] sin
but the right result if done like this:
sin [x^2] 60
So for now, if you envoke multiple functions in a row, use prefix - type the function before the operand.
This is especially annoying for RC, for doing calculations on stored values.
You have to type
sin RCL 2
and not
RCL 2 sin
------------------
update: now a cab file is available! And, new version will run only one instance at time.
------------------
update: keys have the letters on them now. Also moved keys a bit. Now / and * are in the right place.
------------------
update:
1. added a few functions (factorial, n choose k)
2. added deg-rad-grad for trigonometric functions. Switch between them with up-down
3. added preliminary unit conversion. Celsius<->Fahrenheit.
4. added preliminary unit conversion for lengths and weights. Switch between modes using left-right.
------------------
update: v2.01
The two current ugliest bugs fixed:
keys don't wander down any more on a long press (I kinda liked it...)
Pressing * twice doesn't crash any more.
In addition, a small change: You can leave the shift (yellow key) pressed when pressing another key. In this case the alternate
function is used, but the keys do not remained shifted. Pressing only shift leaves it locked.
------------------
update: v2.02
made a bit more stable. Can now calculate up to 170 factorial. Log window scrolls.
------------------
update: v2.03
Added memory functions.
To store in a memory location, hit STO, and then write the location. Valid locations are 0..99
memory locations 0..9 are displayed under the respective key.
STO+ STO- STO* STO/ do operations on those locations.
To recall, hit RCL, and then location.
------------------
update: v2.031: small cosmetic change.
I wll test it tomorrow. Good point anyway .
update: now a cab file
I uploaded new file: now it is a cab file.
And, now if program is running, it will be brought into the foreground when run again (instead of running a 2nd version).
I tried, Its hard to use it coz I am not sure what button what does.
/ is the simbol on my key, but in your calc is * - why?
And when I hit * twice I have some error exepton
littleclown said:
I tried, Its hard to use it coz I am not sure what button what does.
Click to expand...
Click to collapse
The layout on screen is supposed to be identical to the layout of the s620 keyboard. So don't look at the keyboard, only at the screen.
littleclown said:
/ is the simbol on my key, but in your calc is * - why?
Click to expand...
Click to collapse
Here I'm not sure what is better. If you really look only at the screen, and not at the keys, then my layout is better, because then the keys are in logical places - otherwise '-' would be somewhere on the right, '*' at the bottom-left.
But I also get confused by the '*' vs. '/' key. Maybe I'll just switch them in the layout....
littleclown said:
And when I hit * twice I have some error exepton
Click to expand...
Click to collapse
This is a bug....
Dude... its so no-user-friendly .
In many situation I must count buttons from left to right and to right to left to find my button - you may know it, put for new users is some kind of hell .
Can you combine this with cursor, to control with narrows some sqare to select buttons?
This is good idea to utilize Dash's keyboard, but counting which key to use makes it much harder then necessary. I suggest you can display keyboard letters on screen, in a small font or in background. It will make key-hunting much easier.
You are right, I'll try to add little letters to the buttons.
In the meantime - here is a hint: the numbers and the left black column are really no problem. The only problem are the middle block black of keys, such as
sin cos tan
x^2 exp 10^x
For these, you can use the top row as guides: + ( ) are all in the right place....
Very useful looking! The mental reinforcement of the glowing letters/symbols on the keypad is just too much for me to overcome, though.
Having '=' mapped to space is very practical, but I want to press enter. Are you up for feature requests? A base converter on one of the yet unused keys would be outstanding. bin/hex/dec? OF course, then you'd need more numeral keys... hmmm.
Or, it could be skinnable/mappable. Some shiny .png buttons, remapping options, and you would probably have the #1 Smartphone Calc. No, you definitely would.
OK OK - keys have labels.
I added labels with the letter to each key. This is not read from key mapping, though, so it only works correctly for QWERTY keyboard. I also moved the keys around a bit, so now / and * are in the right place.
What's the best way to read the keyboard mapping?
Much better now! Do you have time to add Memory functions and some basic unit conversion functions?
The following is a tiny calculator I wrote many years ago for REX6000. Still have that baby in my wallet today
Ahhhhh the Rex...
qaplus said:
Much better now! Do you have time to add Memory functions and some basic unit conversion functions?
The following is a tiny calculator I wrote many years ago for REX6000. Still have that baby in my wallet today
Click to expand...
Click to collapse
Wow! That is really cool! I got my wife a Rex for her birthday many years ago. Why don't they make this form factor any more? It was perfect!
Her second one died just last year
That's a cool calculator! If it had been my Rex, I would have installed it
added unit conversion and a few other things
Due to popular demand, I added unit conversions. I'm still not quite happy with the result. But I'm not quite sure how it should be done.
The best would be to be able to do
1 [m] + 3 [inch] =
and then pressing [feet] will give the result in feet.
This doesn't work now.
For now, just do unit conversion on the result of calculations... not during calculations.
So, you can do
1.54 [inch][m]
or
2 + 4*6 = [feet][km]
To switch to conversion mode, press .
See first post for other changes.
Bugs:
The yellow square creeps down the screen if you hold alt. Fixes on relaunch.
The numeral keys do this as well.
Pressing + twice with no entry causes an exception.
This appears to happen with the * key as well.
Soft Key labels do not take Windows Button appearance.
---------------------
I really like the speed with which I can get to everything. Switching to units mode is elegant and going to be very handy at work, thanks!
I am curious as to why the temp conversion is on the scientific functions page rather than the units page.
May I make more requests? Automatic save on exit of last page used would be handy. Perhaps the Alt key should say alt and flash when clicked instead of movingMaking the ! match its keyboard location would be nice, I guess, too.
Profezza said:
Bugs:
The yellow square creeps down the screen if you hold alt. Fixes on relaunch.
The numeral keys do this as well.
Click to expand...
Click to collapse
This was quite ugly. I liked the fact that the program still worked correctly, but with a crooked keyboard...
Fixed now
Profezza said:
Pressing + twice with no entry causes an exception.
This appears to happen with the * key as well.
Click to expand...
Click to collapse
This is also fixed. Now you can correct your last operation.
3 [+] [*] 2 =
gives 6.
Profezza said:
Soft Key labels do not take Windows Button appearance.
Click to expand...
Click to collapse
This I don't understand. Do you mean that the shift key is not trapesoidal, like on the keyboard? Or that the key labels (i.e. the blue letters) don't move down?
Profezza said:
I am curious as to why the temp conversion is on the scientific functions page rather than the units page.
Click to expand...
Click to collapse
Simply ugly programming. First I just made a F->C and C->F button like qaplus' REX6000 program. Then I added my style of units as a different function.
But there is a problem that if I want the following to work later, then
3[m] - 2[mm] =
makes sense. But
98 F - 32 F =
is something special. It is not degrees F any more, but instead a difference between degrees, in F.
So
99 [F] - 90 [F] =
[C]
should eventually show a difference of 5 degrees C, and not
9 degrees F converted to C, which is (-12.777) degrees C.
Profezza said:
Perhaps the Alt key should say alt and flash when clicked instead of moving
Click to expand...
Click to collapse
It could say alt. Though on my keyboard, it is labeled FN (I have a dopod). But why flash instead of moving?
If you mean that the change shouldn't be permanent (i.e. not shift-lock), then now there are two ways to use shift:
press and hold, and press another key will not lock, just do the alternate function. Press and release shift with no interveaning keypress will lock the shift state.
Profezza said:
Making the ! match its keyboard location would be nice, I guess, too.
Click to expand...
Click to collapse
This will come later, when instead of ln, exp, log, 10^, log2, 2^, I will have just one key, and you can switch the log base as you do now with rad-grad-deg.
Currently I like that they are all together.
ghostwheel said:
This was quite ugly. I liked the fact that the program still worked correctly, but with a crooked keyboard...
Fixed now
This is also fixed. Now you can correct your last operation.
3 [+] [*] 2 =
gives 6.
This I don't understand. Do you mean that the shift key is not trapesoidal, like on the keyboard? Or that the key labels (i.e. the blue letters) don't move down?
Click to expand...
Click to collapse
That was fast! I was making a lighthearted reference to the fact that the bottom-of-screen captions for the "soft keys", meaning the two above the home and back <- keys, don't have the shiney/glowie look that they do in the native OS screens.
I imagine this is related to the software you are developing in, and not really important anyway.
ghostwheel said:
should eventually show a difference of 5 degrees C, and not
9 degrees F converted to C, which is (-12.777) degrees C.
Click to expand...
Click to collapse
Sounds like it will be really handy for doing several rapid temp related tasks! K would be nice too, if you can find space for it.
ghostwheel said:
It could say alt. Though on my keyboard, it is labeled FN (I have a dopod). But why flash instead of moving?
Click to expand...
Click to collapse
I was just thinking of other ways to communicate it's state, I didn't realize you would be able to stop the creep-bug so fast.
ghostwheel said:
If you mean that the change shouldn't be permanent (i.e. not shift-lock), then now there are two ways to use shift:
press and hold, and press another key will not lock, just do the alternate function. Press and release shift with no intervening keypress will lock the shift state.
Click to expand...
Click to collapse
That sounds consistent with xt9, so perfect to our existing habits.
ghostwheel said:
This will come later, when instead of ln, exp, log, 10^, log2, 2^, I will have just one key, and you can switch the log base as you do now with rad-grad-deg.
Currently I like that they are all together.
Click to expand...
Click to collapse
Then, I will keep watching on this thread for updates. I already am using it a bit in work and home Thanks!
FYI: It works perfectly with 6.1, but throws an alert on install. "made for older version, blah blah..."
Very very good job gentelman....!!!!!!!!!!!!!
nice job! thanks!
Let me try it for several days before posting feedback/requests
sorry for hang from your post. But will there be a financial calculator like the HP 17BII for 19bii for use with the S620?
I'm trying to type the italian vocabulary letters à è ì ò ù with the US Sprint TP2 hardware keyboard as an alternate typing of keys A E I O U.
This can be easily accomplished using the keys in connection with FN key by editing CH1 and CH2 value in the eT9.Rhodium.0409.kmap.txt file this way:
(before mod: )
// Row 3
{A A A A A 0x0a}
(after mod: )
// Row 3
{A A A À À 0x0a}
Unfortunately in US Sprint hardware keyboard only the A key is free to have an FN alternate meaning, while the keys E I O U have already a printed alternate value with € + = - charachters, so i wanted to use the "press and hold" function provided by VK2 value, editing .kmap file this way:
(before mod: )
{U U U + + 0x06}
(after mod: )
{U U Ù + + 0x06}
This way i expected that:
- pressing the U key to get u charachter
- pressing and holding the U key to get ù charachter
- pressing the U key along with FN to get + charachter
Instead the press and hold function don't work, i get only a repeating u charachter.
Anyone knows how to take advantage of the press and hold function in .kmap file (perhaps need enabling?)?
Thanx all.
try installing Rhodium Keyboard Controller, as it allows you to remap any key to do whatever you want (single press, long press, double-click, etc)
Joe
Joe Pinball said:
try installing Rhodium Keyboard Controller, as it allows you to remap any key to do whatever you want (single press, long press, double-click, etc)
Joe
Click to expand...
Click to collapse
Does that work on the stock roms too?
Joe Pinball said:
try installing Rhodium Keyboard Controller, as it allows you to remap any key to do whatever you want (single press, long press, double-click, etc)
Joe
Click to expand...
Click to collapse
Thank you Joe for the hint, though i'm still looking for a way to have it to work in the simplest way.
Peace All....
Does anybody know of any replacement Lockscreens that support HTC 10's Fingerprint Scanner? CM Locker only supports Galaxy phones based on what I've read and I'm currently a beta tester for them--but I hate using a pin code.
ZEDEK said:
Peace All....
Does anybody know of any replacement Lockscreens that support HTC 10's Fingerprint Scanner? CM Locker only supports Galaxy phones based on what I've read and I'm currently a beta tester for them--but I hate using a pin code.
Click to expand...
Click to collapse
aosp lockscreen
SacredDeviL666 said:
aosp lockscreen
Click to expand...
Click to collapse
Yup, The asop is nice because you can go straight to your home screen with the fingerprint instead of having the lock screen pop up first.
To re-enable it use
adb pm hide com.htc.lockscreen
or fire up a terminal emulator and type in pm hide com.htc.lockscreen
I just did it with my phone, and it doesn't break android pay like going into the system partition would and deleting it.
Sivat said:
Yup, The asop is nice because you can go straight to your home screen with the fingerprint instead of having the lock screen pop up first.
To re-enable it use
adb pm hide com.htc.lockscreen
or fire up a terminal emulator and type in pm hide com.htc.lockscreen
I just did it with my phone, and it doesn't break android pay like going into the system partition would and deleting it.
Click to expand...
Click to collapse
Any idea how I can activate double tap to wake and wake with fingerprint sensor with AOSP lockscreen?
With double tap to wake the HTC 10 just vibrate one time and nothing else happens.
Maik268 said:
Any idea how I can activate double tap to wake and wake with fingerprint sensor with AOSP lockscreen?
With double tap to wake the HTC 10 just vibrate one time and nothing else happens.
Click to expand...
Click to collapse
Wake with the fingerprint should work by default. The main reason why I disabled the htc one was because the htc one would pop up before unlocking. i think double tap can be enabled by an xposed module or a custom rom. I don't use double tap to wake so idk
Sivat said:
Wake with the fingerprint should work by default. The main reason why I disabled the htc one was because the htc one would pop up before unlocking. i think double tap can be enabled by an xposed module or a custom rom. I don't use double tap to wake so idk
Click to expand...
Click to collapse
Wake with fingerprint isn't working for me.
If I press it short, nothing happens.
If I press it long, it unlocks the phone.
Sent from my HTC 10 using XDA Labs
Maik268 said:
Wake with fingerprint isn't working for me.
If I press it short, nothing happens.
If I press it long, it unlocks the phone.
Click to expand...
Click to collapse
Its supposed to unlock the moment it reads an accurate fingerprint (less than a second for me) with a asop. Wake on tap is part of the htc one.
I'm not exactly sure how to enable that, I prefer the straight unlock and just use the power button to check my lock screen.
Sivat said:
Its supposed to unlock the moment it reads an accurate fingerprint (less than a second for me) with a asop. Wake on tap is part of the htc one.
I'm not exactly sure how to enable that, I prefer the straight unlock and just use the power button to check my lock screen.
Click to expand...
Click to collapse
Too bad.
AOSP lockscreen + double tap to wake and fingerprint to wake would be awesome.
It's really convenient if the phone is lying on a table.
Sent from my HTC 10 using XDA Labs
Maik268 said:
Too bad.
AOSP lockscreen + double tap to wake and fingerprint to wake would be awesome.
It's really convenient if the phone is lying on a table.
Sent from my HTC 10 using XDA Labs
Click to expand...
Click to collapse
Did you enable "Double tap to wake & sleep" in Gesture option?
limcc said:
Did you enable "Double tap to wake & sleep" in Gesture option?
Click to expand...
Click to collapse
Of course
It's working with HTC lockscreen, but not with AOSP. If I double tap to wake it's just vibrating, but nothing else happens.
Sent from my HTC 10 using XDA Labs
Maik268 said:
Of course
It's working with HTC lockscreen, but not with AOSP. If I double tap to wake it's just vibrating, but nothing else happens.
Click to expand...
Click to collapse
Gravity box has an option to do just wake instead of unlock for asop. I think you can get custom kernel for double tap to wake. (I did that for my nexus 7)
Sivat said:
Gravity box has an option to do just wake instead of unlock for asop. I think you can get custom kernel for double tap to wake. (I did that for my nexus 7)
Click to expand...
Click to collapse
There are no custom kernel with double tap to wake, because HTC has it already built in
I think what I want is not possible (atm), but thanks anyway for your help
Maik268 said:
There are no custom kernel with double tap to wake, because HTC has it already built in
I think what I want is not possible (atm), but thanks anyway for your help
Click to expand...
Click to collapse
So i've done some digging around and judging by how HTC set up the wake gesture senors it's entirely possible to have an exposed module to intercept those calls and create fully custom launch settings.... which I'm gonna try to do, but I have zero experience doing this so I'll leave any information I've found for anyone else.
Inside EasyAccessService.apk is this method which controls the wake gestures on the OS Level vs Kernel Level.
Code:
private void onHtcGestureMotion(int i, int i2, int i3) {
EASYLog.m1133d("EasySensorAction81", " > onHtcGestureMotion(T:" + i + ", A:" + i2 + ", I:" + i3 + ")");
if (i2 != 1) {
if (i2 == 99) {
EASYLog.m1133d("EasySensorAction81", "onHtcGestureMotion():MCU exception happens, start to dump buffer and call stack");
new Thread(new C05661(new SimpleDateFormat("yyyyMMddhhmmss.SSS", Locale.US).format(new Date()))).start();
}
switch (i2) {
case HtcGestureMotion.SLIDE_UP /*2*/:
case HtcGestureMotion.GT_WAKE_TP_UP_VIBRATE /*24*/:
doMotionLaunchAction(1);
break;
case TAG_TYPE_BITS:
case HtcMatrixGestureHidi.GT_WAKEUP_TP_DOWN_VIBRATE /*25*/:
doMotionLaunchAction(6);
break;
case FIXED_32_SIZE:
case HtcGestureMotion.GT_WAKE_TP_LEFT_VIBRATE /*26*/:
doMotionLaunchAction(3);
break;
case HtcGestureMotion.SLIDE_RIGHT /*5*/:
case HtcGestureMotion.GT_WAKE_TP_RIGHT_VIBRATE /*27*/:
doMotionLaunchAction(2);
break;
case HtcGestureMotion.CAMERA_IN_LANDSCAPE /*6*/:
doMotionLaunchAction(4);
break;
case HtcGestureMotion.TWO_FINGER_SLIDE_DOWN /*7*/:
case FIXED_64_SIZE:
EASYLog.m1133d("EasySensorAction81", "onHtcGestureMotion():tp_twofinger_down gesture, matched id = " + i3);
triggerMotionAction(7);
C0597a.m1149a(this.mContext, "swipe_count", "gesture", C0597a.m1146a(7));
C0597a.m1153b(this.mContext);
break;
case HtcMatrixGesture.DOUBLE_TOUCH /*15*/:
doMotionLaunchAction(5);
break;
case HtcGestureMotion.EXCEPTION /*99*/:
EASYLog.m1133d("EasySensorAction81", "onHtcGestureMotion():MCU exception happens, start to dump buffer and call stack");
break;
default:
EASYLog.m1133d("EasySensorAction81", "onHtcGestureMotion():nothing gesture, eventAction = " + i2 + " matched id = " + i3);
break;
}
EASYLog.m1133d("EasySensorAction81", " < onHtcGestureMotion(T:" + i + ", A:" + i2 + ", I:" + i3 + ")");
}
}
Sivat said:
So i've done some digging around and judging by how HTC set up the wake gesture senors it's entirely possible to have an exposed module to intercept those calls and create fully custom launch settings.... which I'm gonna try to do, but I have zero experience doing this so I'll leave any information I've found for anyone else.
Inside EasyAccessService.apk is this method which controls the wake gestures on the OS Level vs Kernel Level.
Click to expand...
Click to collapse
Unfortunately I can't help you with that.
I think for the moment I have to stay with HTCs lockscreen.
Sent from my HTC 10 using XDA Labs
Maik268 said:
Unfortunately I can't help you with that.
I think for the moment I have to stay with HTCs lockscreen.
Sent from my HTC 10 using XDA Labs
Click to expand...
Click to collapse
Welp, it's been almost a month but I finally figured out what I needed and got an xposed module going to replace all of the gestures.
I have it set so that swipe right does the next song, swipe left is previous song, swipe up is play/pause, swipe down is wake, double tap is wake. (I'm gonna change these later i'm just glad I got double tap to fully work)
https://drive.google.com/open?id=0ByRPtdp5OYAXTDZHOWxOSm40UHc
Source code:
Code:
package com.example.sivat.htc_gesture;
import java.lang.Object;
import android.content.Context;
import android.os.PowerManager;
import android.content.Intent;
import android.view.KeyEvent;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
import de.robv.android.xposed.XC_MethodReplacement;
public class XposedMod implements IXposedHookLoadPackage {
Context context;
@Override
public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
if (!lpparam.packageName.equals("com.htc.sense.easyaccessservice"))
return;
Class<?> EasyAction =
XposedHelpers.findClass("com.htc.sense.easyaccessservice.easy.sense81.EasySensorAction81", lpparam.classLoader);
XposedHelpers.findAndHookMethod(EasyAction, "triggerMotionAction", int.class, new XC_MethodReplacement() {
@Override
protected Object replaceHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log("BEFORE EXECUTE!");
context = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext");
int gesture = (Integer) param.args[0];
XposedBridge.log(String.format("%1$d",gesture));
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP
| PowerManager.ON_AFTER_RELEASE, "MyWakeLock");
wakeLock.acquire();
wakeLock.release();
performAction(gesture, context);
param.setResult(null);
return null;
}
});
}
private void performAction(int action, Context context) {
switch(action){
case GestureType.SWIPE_LEFT:
sendMediaButton(context, KeyEvent.KEYCODE_MEDIA_PREVIOUS);
wakeUpDevice();
case GestureType.SWIPE_RIGHT:
sendMediaButton(context, KeyEvent.KEYCODE_MEDIA_NEXT);
wakeUpDevice();
case GestureType.CAMERA_ACTION:
wakeUpDevice();
case GestureType.SWIPE_UP;
wakeUpDevice();
case GestureType.DOUBLE_TAP_ACTION:
wakeUpDevice();
}
}
private void wakeUpDevice() {
XposedBridge.log("WTFISGOINGON");
}
private void sendMediaButton(Context context, int keyCode) {
KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode);
Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON);
intent.putExtra(Intent.EXTRA_KEY_EVENT, keyEvent);
context.sendOrderedBroadcast(intent, null);
keyEvent = new KeyEvent(KeyEvent.ACTION_UP, keyCode);
intent = new Intent(Intent.ACTION_MEDIA_BUTTON);
intent.putExtra(Intent.EXTRA_KEY_EVENT, keyEvent);
context.sendOrderedBroadcast(intent, null);
}
public class GestureType {
public static final int SWIPE_LEFT = 3;
public static final int SWIPE_RIGHT = 2;
public static final int SWIPE_UP = 1;
public static final int CAMERA_ACTION = 6;
public static final int DOUBLE_TAP_ACTION = 5;
}
}
Sivat said:
Welp, it's been almost a month but I finally figured out what I needed and got an xposed module going to replace all of the gestures.
I have it set so that swipe right does the next song, swipe left is previous song, swipe up is play/pause, swipe down is wake, double tap is wake. (I'm gonna change these later i'm just glad I got double tap to fully work)
https://drive.google.com/open?id=0ByRPtdp5OYAXTDZHOWxOSm40UHc
Source code:
Code:
package com.example.sivat.htc_gesture;
import java.lang.Object;
import android.content.Context;
import android.os.PowerManager;
import android.content.Intent;
import android.view.KeyEvent;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
import de.robv.android.xposed.XC_MethodReplacement;
public class XposedMod implements IXposedHookLoadPackage {
Context context;
@Override
public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
if (!lpparam.packageName.equals("com.htc.sense.easyaccessservice"))
return;
Class<?> EasyAction =
XposedHelpers.findClass("com.htc.sense.easyaccessservice.easy.sense81.EasySensorAction81", lpparam.classLoader);
XposedHelpers.findAndHookMethod(EasyAction, "triggerMotionAction", int.class, new XC_MethodReplacement() {
@Override
protected Object replaceHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log("BEFORE EXECUTE!");
context = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext");
int gesture = (Integer) param.args[0];
XposedBridge.log(String.format("%1$d",gesture));
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP
| PowerManager.ON_AFTER_RELEASE, "MyWakeLock");
wakeLock.acquire();
wakeLock.release();
performAction(gesture, context);
param.setResult(null);
return null;
}
});
}
private void performAction(int action, Context context) {
switch(action){
case GestureType.SWIPE_LEFT:
sendMediaButton(context, KeyEvent.KEYCODE_MEDIA_PREVIOUS);
wakeUpDevice();
case GestureType.SWIPE_RIGHT:
sendMediaButton(context, KeyEvent.KEYCODE_MEDIA_NEXT);
wakeUpDevice();
case GestureType.CAMERA_ACTION:
wakeUpDevice();
case GestureType.SWIPE_UP;
wakeUpDevice();
case GestureType.DOUBLE_TAP_ACTION:
wakeUpDevice();
}
}
private void wakeUpDevice() {
XposedBridge.log("WTFISGOINGON");
}
private void sendMediaButton(Context context, int keyCode) {
KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode);
Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON);
intent.putExtra(Intent.EXTRA_KEY_EVENT, keyEvent);
context.sendOrderedBroadcast(intent, null);
keyEvent = new KeyEvent(KeyEvent.ACTION_UP, keyCode);
intent = new Intent(Intent.ACTION_MEDIA_BUTTON);
intent.putExtra(Intent.EXTRA_KEY_EVENT, keyEvent);
context.sendOrderedBroadcast(intent, null);
}
public class GestureType {
public static final int SWIPE_LEFT = 3;
public static final int SWIPE_RIGHT = 2;
public static final int SWIPE_UP = 1;
public static final int CAMERA_ACTION = 6;
public static final int DOUBLE_TAP_ACTION = 5;
}
}
Click to expand...
Click to collapse
Wow, you are awesome!
I tested your module and double tap to wake is working perfectly (other gestures are not working for me, but I would like to see these functions -> swipe left/right next track/ swipe up pause/play).
Thank you very much!
Maik268 said:
Wow, you are awesome!
I tested your module and double tap to wake is working perfectly (other gestures are not working for me, but I would like to see these functions -> swipe left/right next track/ swipe up pause/play).
Thank you very much!
Click to expand...
Click to collapse
Try having a music player up and running and trying the swipe commands... I've noticed if there isn't anything running it'll take a second to launch the default one. Also the phone doesn't like to register my swipes unless they start at the edge and go the entire length of the screen for left/right and maybe 2/3rds of the way going up/down. If it doesn't vibrate when you're doing the swipe, then it's not registering the swipe. Also make sure that every gesture is enabled in your phone settings (Settings -> Display, Gestures, & Buttons -> Motion Launch Gestures and then check off all the boxes)
EDIT: There seems to be a slight issue where the music pauses everytime I swipe left/right instead of continuing to play. I'll figure it out and try and fix it later.
Sivat said:
Also make sure that every gesture is enabled in your phone settings (Settings -> Display, Gestures, & Buttons -> Motion Launch Gestures and then check off all the boxes)
Click to expand...
Click to collapse
This was the problem, thanks.
Sivat said:
EDIT: There seems to be a slight issue where the music pauses everytime I swipe left/right instead of continuing to play. I'll figure it out and try and fix it later.
Click to expand...
Click to collapse
If I swipe left/right my display turns on with an error (Music playback error. The requested title could not be played).
Maik268 said:
This was the problem, thanks.
If I swipe left/right my display turns on with an error (Music playback error. The requested title could not be played).
Click to expand...
Click to collapse
What music player are you using? Google Play Music just jumps and pauses.
I'm using Google Play Music.
Hey guys, need some help to use special character "~" ... it's very used in brazilian language.
There letters should loks like "ã" "õ".
I find the simbol over "Esc" key but when i press just look like "Esc" and if i "press shift and press esc", only appear the character ' , but not "~". Did you guys know how to use this special character?
By the way, is there any way to use the special char "ç"?
Thank you guys
If i remember you need to press Ctrl + Shift + ~
RagaSubekti said:
If i remember you need to press Ctrl + Shift + ~
Click to expand...
Click to collapse
Does't work here. Unfortunately nothing happens with this combination
But thank you
gustavopinheiro said:
Hey guys, need some help to use special character "~" ... it's very used in brazilian language.
There letters should loks like "ã" "õ".
I find the simbol over "Esc" key but when i press just look like "Esc" and if i "press shift and press esc", only appear the character ' , but not "~". Did you guys know how to use this special character?
By the way, is there any way to use the special char "ç"?
Thank you guys
Click to expand...
Click to collapse
Have you been able to figure out this problem? I'm having the same issue and the only mention of it online is this thread. Apparently, there is no easy way to change the language of the keyboard without changing the layout as well.
I have to press SHIFT + ESC to have ~, to have `just press ESC
To work ã, õ, ç, á, à, ê .....
- First, configure the layout to US International, then you'll be able to use ãáàâõóòôê....
- Second, ç (cedilla) has a detail. Continue with US INTERNATIONAL layout.
In Windows, '+c = ç, but in Android, '+c = ć.
' is apostrophe
So you have to press:
right alt + , = ç
shift + right alt + , = Ç
If even using US INTERNATIONAL Layout, you can't type what you want, it's an android issue. So install another US INTERNATIONAL layout.
github.com/dashea/us-intl-android