HenriDellal / emerald-dialer

Lightweight dialer with T9 search
GNU General Public License v3.0
91 stars 21 forks source link

support for keyboard phones #20

Open Flexmaen opened 5 years ago

Flexmaen commented 5 years ago

I've been using phones with hardware keyboard (currently Blackberry Keyone), and wonder if it'll be an justifiable effort to support these kind of phones (which no 3rd party dialer does at the moment).

This will include two features:

Keyboard support: The current situation is that they keyboard will go into "alt-lock" mode automatically, that means I cannot use the regular keys for typing a name.

minimized Dialpad: If you collapse the dialpad, you can't type. For a phone with keyboard it will make sense if you can set a collapsed dialpad as default, since you have your keys anyway.

I can understand if you think that might be a rare usecase. However, having at least one 3rd-party-dialer that will support a keyboard phone would be great, since all Android keyboard phones I had didn't even fix their dialer for smart dial with a keyboard.

HenriDellal commented 5 years ago

Hello. Nice idea, that should be implemented. It was very strange to learn that there are no third-party dialers for keyboard phones. I'll think how to solve it the best way, but it needs to be tested. Please could you help me with the tests?

Flexmaen commented 5 years ago

Sure I'll help you with tests! Since I can't help with programming that's the least I could do!

I'm thinking what might be useful... Maybe a Keyboard-Option in the settings that will collapse the dialpad to what is absolutely necessary (in this case just the caller button and the textfield), and that will adapt the smart dial function to the keyboard (where 1=W, 2=E, 3=R).

I wonder if keyboards will be detected automatically. But why not? They work in other apps. But what happens if you have an other keyboard layout, like the French AZERTY? In this case 1=Z instead of W. If the app doesn't get this automatically, maybe userdefined settings for numbers and "+" might help. Then people will have to set it up once to make smart dial work properly, but at least it works then.

HenriDellal commented 5 years ago

@Flexmaen, please could you try this build? If you've installed the app from F-Droid, you have to uninstall it. dialer.zip

Flexmaen commented 5 years ago

Great! Well, the good news:

Things that don't work yet:

Thank you for trying, that looks promising.

HenriDellal commented 5 years ago

Thank you for the tests. This information is very helpful.

App disappears when I hit any key, except using the shift or alt key. So capital letters and numbers work. However, search is case sensitive, should be insensitive then.

Probably it has something with the system, since the dialer doesn't have any keybinds for the letters. I'll make the search case insensitive then.

I succeeded in pasting some letters, some will cash the app, some won't. (It'll mostly crash when I have only a single letter left in the text field).

I think it's related to the dialer itself, not to the update. If I had logs, I could tell.

Smart Dial does not work yet: When I type "ER" there should be "23" in the Textfield automatically, while the contacts will be searched for Names matching "ER". That's the way it works on keyboard phones where it is done perfectly. The way it is now, is that I had to use the Alt+Key to type the numbers (like it is in ordinary textfields).

I don't know how to do it now. There is a problem with other keyboarded phones (like Gemini PDA) that have separate number keys. Probably this kind of dialing can be done as an option. It may become harder to handle multiple locales as well.

Flexmaen commented 5 years ago

Hi!

I think it's related to the dialer itself, not to the update. If I had logs, I could tell.

Is there an option to create logs? I now tested the version you have on F-Droid and noticed that this one will also crash the same way (e.g. if I hit ")" on the keyboard).

I don't know how to do it now. There is a problem with other keyboarded phones (like Gemini PDA) that have separate number keys. Probably this kind of dialing can be done as an option. It may become harder to handle multiple locales as well.

I think it would be a good solution to offer just a manual setting for the dialpad keys, where you can fill in the letters that match certein numbers (and the +). Like: 1 = 2 = 3 = _ This can come with a preset for US-keyboards (like 1=W, 2=E, 3=R) and if you have another keyboard you can just change the values or disable it in the case of the Gemini PDA.

For example on your F-Droid versions onscreen-dialpad If you enter "374" the textbox will display "374" while contacts with names like "Erich" and "Fritz" will show up since 3=DEF, 7=PQRS and 4=GHI. But on a keyboard phone you usually have only one letter that matches a number.

Plus it would be great to offer an option for the enter key. (Like dialing the number, or selected contact).

HenriDellal commented 5 years ago

There is no option to capture logs in the application. I know that it's possible to use adb Android Debug Bridge to get logs. Something like adb logcat *:W -f log.txt in command line/terminal should get the logs from the connected phone and save them in a file. Sorry, can't tell a lot on this subject, since I'm not able to run adb to check. Also, the crash you've mentioned happened because the filtering algorithm uses regex and bracket is a special character.

Plus it would be great to offer an option for the enter key. (Like dialing the number, or selected contact).

I'll try to implement it.

Flexmaen commented 5 years ago

Just asking because I'm not sure now: So you know what is causing the problem, or do you need any info from the adb logs from me now?

HenriDellal commented 5 years ago

Logs could help, but they're not required. I may try to fix it without them. Anyway, if you're going to record them, apply filters to logcat and check the logs before sending to exclude any sensitive data.

Flexmaen commented 5 years ago

I tested 1.0.5 now.

There are some issues:

Since I have more time these days, I could check how to get a logfile if that is any help for you. Maybe that helps with the crashes which unfortunately make this dialer unusable for now. The other issue is an enhancement, but it would be great if you keep it in mind. ;)

HenriDellal commented 5 years ago

Update: I've got a phone with numeric keyboard recently and spotted some additional issues. I hope to find some time to look into these ones.

WallK commented 8 months ago

On my Cat S22 Flip it almost works Number input works with keyboard hidden, but I can't backspace until I open it back