Custom Intents - Onscreen Keyboard

Put your problem here if it does not fit any of the other categories.

Custom Intents - Onscreen Keyboard

Postby zanky » Mon Jul 14, 2008 10:51 pm

I'm looking to write an onscreen keyboard. I've got most of the keyboard code done, but what I'm missing is the actual hooking onto all EditTexts. Basically, when a user gives focus to an EditText (be it the browser, or maps app...) I want the keyboard to pop up.

I've posted to google's Dev groups, got mostly satisfying answers, but no cigar.


For Reference:
http://groups.google.com/group/android- ... 9034cc24fc
http://groups.google.com/group/android- ... dcc0b11041

It appears that what I want to do is impossible, but I don't believe in impossibilities :)

Any ideas?

--Z
zanky
Junior Developer
Junior Developer
 
Posts: 11
Joined: Thu Jul 10, 2008 4:45 pm

Top

30+ views and no replies?

Postby zanky » Wed Jul 16, 2008 6:06 pm

No ideas? I thought that this was the de facto forum for Android development? Can someone at least point me somewhere else?

Any reply at all would be welcome...

--Z
zanky
Junior Developer
Junior Developer
 
Posts: 11
Joined: Thu Jul 10, 2008 4:45 pm

Postby cadlg » Wed Jul 16, 2008 6:27 pm

Hello zanky.
I think you could do that only if you had the source code of the applications/classes that you want to broadcast the intent.

Best regards,

cadlg
cadlg
Experienced Developer
Experienced Developer
 
Posts: 84
Joined: Wed Feb 20, 2008 12:33 am
Location: Guatemala

Postby plusminus » Wed Jul 16, 2008 6:52 pm

Hello zanky,

as Justin said in the Google Groups, you would:
a.) have to hack into the EditText-Source, which is probably impossile as you would need to get that into the official android version, or hack something "I never thought of which/what"-library on the device your software-keyboard is installed.
b.) Make every developer send out an Intent for a Software-Keyboard.

Both methods seem pretty hard to accomplish.

Is somehow crazy, that we there is not yet a single sign of a Software-Keyboard :?

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Thanks!

Postby zanky » Wed Jul 16, 2008 6:59 pm

Thanks cadlg and plusminus for your quick replies!

It is just as I feared. I had an interesting project in mind that is a bit over half coded (most of the GUI, and portions of the backend), but without the EditText hooking.... no cigar.

I know that eventually the full SDK will be released.... eventually.... but until then I guess (if that).

I'll stick around here though if you guys don't mind. Looks like anddev is a nice small community, I like it :)

--Z
zanky
Junior Developer
Junior Developer
 
Posts: 11
Joined: Thu Jul 10, 2008 4:45 pm

Postby plusminus » Wed Jul 16, 2008 7:05 pm

Maybe Google will make an Interface, where SW-Keyboard can be "plugged in". That would be nice.

I did a "optimized keyboard-layout" some weeks ago which I'd love to test in reality :)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Postby zanky » Wed Jul 16, 2008 7:31 pm

That's a good idea. I wouldn't want to have to rewrite portions of the OS just to get my software keyboard working... would be impractical to require a special revision of the OS jsut to get my app working.

I think this experience highlights two things:

1) The Intents system works, but has much room for improvement
2) We need the source code of everything!

I'd love to see your optimized keyboard-layout (eventually lol)

--Z
zanky
Junior Developer
Junior Developer
 
Posts: 11
Joined: Thu Jul 10, 2008 4:45 pm

Postby plusminus » Wed Jul 16, 2008 7:45 pm

This is what it looked like, just for letters...

Note: "_" is meant to be the "Space"
[font=Lucida Console]....g n d s v p q j
.x w i a _ e r u b y
..k c l t h m o f z[/font]

Every key is a hexagon (got 6 neighbors), so you can write the following things with just one stroke: "ing", "and", "the", "more", "of", "by", ...

You see that the "Space" is pretty centered and close to the letters that words like to end with.

The Algorithm was like this: "Find the constellation, where the sum of every key-fitness is maximum".
Where key-fitness is: "Probability that this key is followed by one of his current neighbors in the current layout".
Thats a simple Hill-Climbing-Optimization.

Regards,
plusminus

Btw: I chose bible.txt as the input for the algorithm.
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

nice

Postby zanky » Wed Jul 16, 2008 7:59 pm

I'm not gonna lie, that looks like a great idea. It might take a bit to get used to at first, but I think it definitely shows promise!

--Z
zanky
Junior Developer
Junior Developer
 
Posts: 11
Joined: Thu Jul 10, 2008 4:45 pm

Re: nice

Postby plusminus » Thu Jul 17, 2008 11:15 am

zanky wrote:I'm not gonna lie, that looks like a great idea. It might take a bit to get used to at first, but I think it definitely shows promise!

--Z


To be true, the idea of a hexagonal non-standard keyboard-layout is stolen, but all coding was done on my own. I just wanted to get in touch with Optimization-Algorithms.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby buster » Thu Jul 17, 2008 4:06 pm

and i would want to have a hexagonal keyboard, that sounds really neat :)
buster
Junior Developer
Junior Developer
 
Posts: 23
Joined: Tue Apr 22, 2008 4:14 pm
Location: Berlin, Germany

hardware keys

Postby zanky » Thu Jul 17, 2008 10:21 pm

I was thinking, that perhaps instead of listening for an EditText gotFocus, we could have the onscreen keyboard listen for a hardware key or a series of hardware keys (Up + Down + Right + Right. Something like that :p).

The platform I'm trying to code for is the Internet Tablet, specifically the N800 since it has no hardware keyboard. One of the hardware keys (F6; the fullscreen key) does not appear to have been bound to anything, so it could be used as a permanent, pop-keyboard-up key. Comments?

--Z
zanky
Junior Developer
Junior Developer
 
Posts: 11
Joined: Thu Jul 10, 2008 4:45 pm

F6

Postby zanky » Sun Jul 27, 2008 10:32 pm

Like I said, I was searching for F# keys (I want to use F6), but Android (the OS/API, not the emulator) does not appear to Support F keys.... or am I missing something?

Anyone have any ideas?

I'm hoping that the newer SDK (to come) will have a solution.
zanky
Junior Developer
Junior Developer
 
Posts: 11
Joined: Thu Jul 10, 2008 4:45 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 9 guests