Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Keyboard Input on Android

edited March 2014 in OpenSesame

Hi there,

I recently started using OpenSesame to program a visual search task for Android. I have a problem with text inputs (for session #, difficulty, etc.) It runs fine on my Mac, but when it runs on Android (Nexus 10) the keyboard buttons never show up. This is strange because the keyboard shows up to get subject number when the experiment loads.

Attached is an image of my form_text_input, as well as the actual code. Any help would be much appreciated (we're on a deadline and this is a huge project!). OpenSesame has been a lifesaver for us so far. Looking forward to implementing it. Thanks!

set rows "1;1;6"
set description "A simple text input form"
set cols "1"
set form_question "Enter starting Difficulty:"
set form_title "Visual Search"
set form_var "response1"
widget 0 0 1 1 label text="[form_title]"
widget 0 1 1 1 label center="no" text="[form_question]"
widget 0 2 1 1 text_input focus="yes" return_accepts="yes" var="[form_var]"

image

Comments

  • edited 9:45AM

    Hi,

    Your script is fine and should pop up the virtual keyboard.

    What exactly happens? Can you see the form on the screen, or does the experiment hang before showing anything? In the latter case, there's probably some problem in the prepare phase of one of the items in the experiment sequence. If the former, then something weird is going on.

    To test whether your device is able to show the virtual keyboard, you can use the following script, which should cause the keyboard to pop up ...

    try:
        import android
        android.show_keyboard()
    except:
        pass
    

    ... and the following script, which should cause the keyboard to pop down ...

    try:
        import android
        android.hide_keyboard()
    except:
        pass
    

    See also:

    But since you mention that the keyboard is visible during the selection of the subject number (which is also simply an OpenSesame form), this is unlikely to be the problem.

    OpenSesame has been a lifesaver for us so far.

    Glad to hear we're saving lives!

    Cheers!
    Sebastiaan

  • edited 9:45AM

    Thanks for the quick response, Sebastian.

    Your script was able to make the keyboard pop up, so no problems there.

    What happens is the "Enter Starting Difficulty" form pops up, flashes "Type here..." very briefly in the box, and then shows a static _ in the box. On my Mac I'm able to enter in numbers with the keyboard and run the rest of the experiment just fine.

    I'm using the legacy back-end. Maybe that's the problem? The droid back-end gives me an ImportError: No module named droid.

    Aldi

  • edited 9:45AM

    I'm using the legacy back-end. Maybe that's the problem? The droid back-end gives me an ImportError: No module named droid.

    Yes, that's definitely (and obviously, I might add!) the problem. If you want to run your experiment on Android, you have to use the droid back-end. If this doesn't work, could you provide the full error message, including what you see in the debug window?

  • edited March 2014

    Ah, of course I should have been using droid! I got confused by the documentation for the Droid back-end, which says "The droid back-end is in most ways identical to the legacy back-end".

    Here is the full error message:

    An unexpected error occurred, which was not caught by OpenSesame. This should not happen! Message:
    <b>No module named droid</b>
    

    Here is what shows up in the debug window

    >>> 
    Traceback (most recent call last):
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/libqtopensesame/qtopensesame.py", line 1404, in run_experiment
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/libopensesame/experiment.py", line 319, in end
      File "openexp/canvas.pyc", line 55, in close_display
    ImportError: No module named droid
    >>> 
    
  • edited 9:45AM

    It seems like the droid back-end is simply not included with your package of OpenSesame. This maybe because your version of OpenSesame is too old, or because something went wrong during packaging. What package and operating system are you using exactly? If you are not running the latest package, does updating solve the issue?

  • edited 9:45AM

    That did it! I'm unable to test builds with the droid back-end when I'm programming them on my Mac, but as long as I switch to Droid before saving and exporting to my Nexus, it pulls up the keyboard and runs just fine on there.

    Thank you so much for helping me with this, in hindsight, obviously incorrect thing I was doing. Now it's just ironing out a few details with stimulus presentation and we're good to go.

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games