Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Req use OS keyboard like on iOS
#1
Can we use/show the OS keyboard instead of our custom OSD keyboard just like we do on iOS IIRC?
Reply
#2
AFAIK it depends on how it has to be done. I don't have any iOS device so not a clue how it's done there but IIRC Memphiz design the underlying API to not be iOS specific.
I looked into this once and opening the keyboard isn't very difficult but it doesn't seem to be easy (or maybe not even possible at all) to then intercept/catch the pressed keys/buttons unless we could somehow overlay an (android) input box, let the user type whatever he wants and then on pressing "OK" (or Enter or whatever) take that input and pass it on to the focused text/input box in xbmc. Either way it would probably require Java code and not some JNI magic.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
Indeed, in Qt, they force the keyboard on/off, then intercept the key and send it to native, all in the java wrapper.

Unfortunately, our use of a pure NativeActivity do not make matter easier in those instance where we have to interact with the OS.
Reply
#4
(2013-01-16, 17:28)Koying Wrote: Unfortunately, our use of a pure NativeActivity do not make matter easier in those instance where we have to interact with the OS.
I discovered the following while working on the hide action bar item davilla created. The below seems like a way to get the android keyboard to pop open, maybe it'll blindly type and "just" work with a standard XBMC text input item.

From ndk/platforms/android-14/arch-arm/usr/include/android/native_activity.h
Code:
/**
* Show the IME while in the given activity.  Calls InputMethodManager.showSoftInput()
* for the given activity.  Note that this method can be called from
* *any* thread; it will send a message to the main thread of the process
* where the Java finish call will take place.
*/
void ANativeActivity_showSoftInput(ANativeActivity* activity, uint32_t flags);

/**
* Flags for ANativeActivity_hideSoftInput; see the Java InputMethodManager
* API for documentation.
*/
enum {
    ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY = 0x0001,
    ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS = 0x0002,
};

/**
* Hide the IME while in the given activity.  Calls InputMethodManager.hideSoftInput()
* for the given activity.  Note that this method can be called from
* *any* thread; it will send a message to the main thread of the process
* where the Java finish call will take place.
*/
void ANativeActivity_hideSoftInput(ANativeActivity* activity, uint32_t flags);
Reply
#5
(2013-01-16, 21:47)kemonine96 Wrote: maybe it'll blindly type and "just" work with a standard XBMC text input item.
That's a nice dream Wink
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#6
Its easy - just implement a derived class from:

https://github.com/xbmc/xbmc/blob/master...Keyboard.h

and hook it into the factory like here:

https://github.com/xbmc/xbmc/blob/master...ry.cpp#L88

see here how i did it for ios:

https://github.com/xbmc/xbmc/blob/master...Keyboard.h
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#7
@Memphiz: Yeah but how do you actually use the native keyboard? Do you get every single key press and hand it over to XBMC or do you let the user type in a native input box and then pass on the whole text to xbmc?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#8
Both. I have a native inputbox so the user sees what he types and i get a callback on each press. On that callback i adapt the currently visible text in the nativetextbox and also fire the char_callback_t with the current string the user typed (so xbmc can adapt filters in realtime).

You also can do your 2nd approach. Let the user type the complete string and when he is ready fire the callback with the complete string. This will of course prevent any live filtering - but it would work.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#9
I'd love for this to work. Right now I'm having trouble with XBMC if I try to use an external keyboard, which makes entering source paths much easier. The shift button cause the cursor to move backwards, which, in turn, prevent a lot of special characters needed for paths e.g. the colon symbol.
Reply
#10
As a reminder, this is part of the development forum so please only post in these threads if you have some related work/hints/solutions to show. We are not looking for +1's.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#11
Just posting this question here as it is - sorta - relevant.

Using a touch interface - the abcd keyboard is a pain to use - there is a mod DialogKeyboard.xml that is modified for qwerty layout but I can't for the life of me find the skin location in my android file system.

Can someone point me at it?

tnx

EDIT - found it

/data/data/org.xbmc.xbmc/cache/apk/assets/addons

I tried this qwerty mod - http://forum.xbmc.org/showthread.php?tid=98958

but its pretty old and doesn't work.

Anyone else know of a qwerty confluence mod before I crack on and do it myself?
XBMC Running on:
- Intel i5 & GTX 980
- Intel NUC i3 Thunderbolt Edition
- Sony Xperia Z3 & Z3 Tablet
- Pivos XIOS DS M1
- Raspberry Pi 3

If my post was helpful please click the +Reputation button.
Reply

Logout Mark Read Team Forum Stats Members Help
use OS keyboard like on iOS0
This forum uses Lukasz Tkacz MyBB addons.