How can I switch to the Android keyboard "SMS" mode - android

The default Messaging app in Android (tested against version 2.1) appears to put the soft keyboard in a special mode, where the return key is replaced with an "emoticon key". When you press it you get a selection of emoticons to insert into your message.
(source: futurenet.com)
How do I instruct the soft keyboard to appear in this mode in my app?

This is definitely an imeOption being set immediately on EditText. I don't know exactly which one it is, it doesn't seem to match any of the ones described here. You might be able to use Hierarchy Viewer to help you pin down what the exact options are.

Related

Android keyboard input weird behaviour

I notice Android devices' default keyboard behave in a different ways, but I have 1 particular behaviour that I am unsure what it is and how to configure the keyboards settings. See the info below.
When Click in any edittext to get focus, the Keyboard shows up
When I type "Hello", the edittext don't get filled with the text immediately. I need to click the suggested "Hello" and then the text shows up in the edittext
Questions:
What are the settings to make the keyboard behave this way?
Is this behaviour the same on all Android keyboards? (I think no but, I
don't find any supporting references)
Do you guys know any 3rd party keyboard app that has this feature?
How to know if the user is using this type of keyboard?
To detect user interaction I use a combination of (1)onUserInteraction() and a (2)custom TextWatcher implementation. Both are tested and working so I didn't add the source codes. I mentioned the 2 above because those kind of keyboards with that behavior textchanges cannot be detected.
From the screenshots above "Hello" will only show when you click the green "Hello" in the left screenshot.

How can I use startLockTask() method for versions of Android Lower than L

I was using startLockTask() in a program but found out it could only be used for Android L. However I want my application to function in versions lower then 5.
Is there any way I can gain similar functionality?
Functionally, no. The point of screen pinning is to prevent the user from leaving your app. The user can't see or click on notifications, or use the home button to leave.
Visually, you can set the app to full screen,, and/or hide notification bar. You can also hide the soft keys on devices that don't have hardware buttons. However, people can always bring it back up.
EDIT: You can also disable the back button.

Simulate the winKey press event in android

I'm using a bluetooth keyboard with an android tablet and i've found that there's some shortcut avaible from a qwerty keyboard. I want to generate some of them from the code. I'm able to trigger the majority of all the key combination but I'm not able to trigger a winKey (The windows logo key on a qwerty). I've basically try every KEY CODE from android and non of them want to work.
If any one as a little hint on that subject that would be appreciated.

Android: Navigation using Tab key doesn't work properly on input boxes

For large size screens, the default android keyboard automatically displays Tab keys. I have a phonegap application which contains several input boxes on one page. When I try to navigate between input boxes using tab key on soft-keyboard, nothing happens.
I also tried to open gmail login page on browser and Tab key didn't shift focus there as well. However, I noticed that only in case of input boxes, I had to use shift+tab key to navigate to next input box. For navigating between other elements, just pressing tab key was sufficient. Is this the specific behavior implemented by android & is there any particular reason for it? I am using nexus 10 but found same behavior on emulator too.
I think this is a problem with Nexus 10 in particular, as I observe the same thing and here is another user that reports the same (https://stackoverflow.com/questions/16651669/nexus-10-keyboard-tab-key-not-working).
Tab key does work on native Android apps as it is supposed to, but not on hybrid apps which are basically wrapped in WebView. I think this is an oversight from the Android team. You can always install a Swipe or Hackers keyboard from the Play Store where the Tab key does the job.
This seems to be an issue specific to Android Tablet devices. A workaround I found was to change the keyboard mode to either split or floating. Also I noticed flipping the device around to landscape view allows the input elements to behave correctly.
The original issue is related to the viewport size change that happens when any input receives focus which is caused by this so-called soft keyboard. Android seems to handle the rendering of a soft keyboard differently from other manufacturers.

Android: How to intercept keydown globally (on hardware keyboard)

Is there a possibility for an android app to run as a service in the background, intercept keydown events from the hardware keyboard and change behavior (i.e. the resulting character) in some special cases?
The idea in mind is to have sort of a keyboard layout fix, mainly making important special characters available using an alternative keymap instead of having to select from a huge grid on the touch screen. Sometimes, the default keymap of a mobile devices do not represent all important characters, even more when it comes to non-english languages.
Thanks for inspiration :)
Peter
EDIT: additionally emphasized hardware
What you are describing is in fact not a service in background but replacing the keyboard app itself..take a look at the SWype app.
You do not have to create a service to do this as you want just the your own keyboard layout coming up when entering text, etc.
The sample of replacing a default app in the sdk is the homescreen but the keyboard app can be replaced as well..

Categories

Resources