Android Virtual Keyboard

Previous topic - Next topic

fivesprites

Hi All,

I've managed to get a dialog window to appear above GLBasic applications to allow text entry.  If you click on the text entry field then the Android Virtual Keyboard will appear :)

I'm currently cleaning up the code and trying to test on a variety of devices.  I'd be grateful if you guys could try out the attached APK and let me know what you think.   Just tap anywhere on screen to start text entry.



Note: The attached APK is also the demo app for the Android GPS stuff I put in the Code Snippets forum last night - so you'll be trying two things at once :)

Any suggestions for improvements, or if you have found a bug, then please let me know.   

Cheers,

//Andy    :bed:



Darmakwolf

Maybe I need more coffee, but I don't see an attachment...  :noggin:

erico

Make that coffee two...I can't see it either.
I can test on a note 2

fivesprites

Sorry chaps - didn't notice it hadn't been accepted!

I've zipped the APK up this time :)

Think I need to go get more coffee!

//Andy

erico

Works perfectly on note2.
It is landscape only right?

Excellent work! :good:
I remember lots of people wanted this.

fivesprites

Thanks for testing erico!

It's only landscape as I forced the app into landscape mode.  It should work in portrait if that's what you use.

Will clean the project up and place it in Code Snippets this weekend.

//Andy

r0ber7

Bookmarked. Will come back to this once I get my hands on an Android device.

spacefractal

manye people have asked for that. Im will implement that into the code snippet thread, if you give me the sld java file.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Jonás Perusquía

this is great! nice work on there :D
<HTML><BASIC><EC>
Be free and do good things

Kitty Hello

Awesome. Theres this for ios, too somewhere. Maybe we should make a x platform lib?

fivesprites

I think that would be a great idea.

It would also be VERY helpful to have some sort of "callback" function into GLB that can be used by external functions.  This would work in a similar way to GLB_ON_PAUSE/RESUME.

For example, with the Virtual Keyboard, once the data has been entered then the callback could be fired and the user application can then collect the data.  Or, for GPS, the callback would inform that data was available to read.

Maybe something like:

GLB_ON_GEN_CALLBACK: callbackId%, callbackData$

This can be used in a fairly generic manner.  The application would look at the callbackId and then do a simple IF to determine what the callback is used for (keyboard/GPS etc).  The data returned would be in the callbackData$ - the application having to strip the data out as necessary.

//Andy

r0ber7

In The meantime, do java callbacks work?

bigsofty

Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

spacefractal

#13
Java callbacks directly as glbasic function will not work due that what communication work and will breaks combatible with other platforms me thinks, but instead java call backs can send to a internal java variable, so the variable can been read by the javacall function.

I'm did that with google license check.



Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/