Howdy, Stranger!

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

Supported by

OpenSesame runtime for Android

edited March 2013 in OpenSesame

Update: The runtime is now available on Google Play.

Hi everybody,

After a bit of hacking, I managed to get the OpenSesame runtime working on Android. It was actually surprisingly easy, thanks to the PyGame subset for Android. Below you see a demonstration on the Nexus 7. The video shows two simple experiments, just for demonstration purposes: In the first you have to tap on the unique shape in a circle of distractors. In the second you have to indicate whether an object is a kitchen utensil or a garage tool.

(I posted a video of OpenSesame running on the Nexus 7 before, but that was after I had installed Ubuntu on the device, so not really an option for most users. In contrast, OpenSesame now runs natively on Android.)

[youtube:RRAFnV1TC_I]

This is all very experimental, but for those willing to experiment, please see this page:

Again, I emphasize that this is not production-ready stuff! But fun to play with nevertheless.

Cheers!
Sebastiaan

«134

Comments

  • edited 1:16PM

    Cool! :-)

    Did a quick test on the Asus Transformer TF101 running Android 4.0.3., and it works great so far.

    image

  • edited 1:16PM

    Cool, I'll add the Transformer to the list. And welcome to the forum!

  • edited 1:16PM

    Awesome!
    This opens up a whole new avenue of research for OS.

    Good work!

    Best regards,

    Jákup

  • edited 1:16PM

    It also works great on a ZTE V970 phone, running on Android 4.1.1.

  • edited 1:16PM

    As I've said before, this is fantastic.
    Is distribution on the Google Play store in the pipeline?
    It would be great to open up options like http://www.plosone.org/article/info:doi/10.1371/journal.pone.0024974#pone.0024974-Nosek1
    to projects that don't have someone versed in Java or, God forbid, XCode.

    If it isn't currently in the pipeline, I could maybe look into it.

    Eoin

  • edited 1:16PM

    The article that you are referring to is actually by my office mates (Stephane and Oilvier) and boss (Jonathan)!

    But, yes, I intend to upload the runtime to the Google Play Store. Before I do this, I want to have a bit of feedback to see how well this fares on different tablets and phones, but so far it looks good. Flawless, actually, which is a pleasant surprise, because I kind of expected the PyGame subset for Android to be buggy and slow.

    If you have any experiences, please share!

  • edited March 2013

    Very good job indeed. Well done!

    I'm looking at the possibility of remote data logging using server-side PHP, and SQL.
    Unfortunately, it doesn't look like the Pygame subset for Android supports this, and I'm not even sure SL4A does, although I can tell you it works fine from within OpenSesame desktop (not that that's of much good to anyone).
    This may be a silly question, but does anyone know if its possible to run some Java from within OpenSesame to get this done (some Java like this: http://stackoverflow.com/questions/6523761/send-data-from-android-to-server-via-json).

    Also, I've recently bought myself a Samsung Galaxy S3 Mini, and can confirm that OpenSesame works on it too.

    Eoin

    Edit: the pygame subset does include urllib and urllib2, but so far I'm getting mysterious "Temporary failure in name resolution" errors.
    I'll post more (in a separate thread) as I have it.

  • edited 1:16PM

    Also, I've recently bought myself a Samsung Galaxy S3 Mini, and can confirm that OpenSesame works on it too.

    Great! I added it to the list.

    Edit: the pygame subset does include urllib and urllib2, but so far I'm getting mysterious "Temporary failure in name resolution" errors. I'll post more (in a separate thread) as I have it.

    I think these modules are indeed your best bet, the stackoverflow approach seems a bit more complex than necessary. Regarding the name resolution error: Are you trying to connect to computers on your local network? I have noticed before that name resolution doesn't work in this case on Android (long time ago, maybe not anymore). The IP address should work, though.

  • Sebastian,

    I am trying to run a simple experiment on the Android version of OpenSesame with no success. I've downloaded the app and run the sample experiments just fine on my Nexus 7. However, when I try to run an experiment that I have put together and works perfectly well on my PC, it won't even start running the script at all when I put it on my tablet.

    At first, I thought it must be my fault. But I built my experiment using the Runtime for Android template you provide with the newest version of OpenSesame. So I tried just running your template on the tablet. And that doesn't work either. So it's not just me. The template itself fails to run on my Nexus 7, although the sample experiments that come with the Android app run just fine.

    Do you know what might be going on? I have to have this study ready to go in the very near future, so any assistance you can provide would be very greatly appreciated!

    Best,

    John

  • edited 1:16PM

    Hi John,

    Debugging output is logged to /sdcard/opensesame-debug.txt on your device, so can check there to see what went wrong. If it's not obvious, please post the debugging output here.

    See also:

    Cheers!
    Sebastiaan

  • My experiment, by the way, will show up in the menu of experiments on my tablet. So the app detects it, and even asks about subject number and log files. It's just that when you expect the experiment to actually start, the app crashes. I don't even see the "Runtime for Android" graphic... it just quite automatically when you try to start. This same thing also happens when I'm just trying to run the template itself without any changes.

  • Wow, Sebastiaan! Fast reply!
    I've been looking for the debugging output each time I try to run an experiment, but I can't locate any such file on my tablet. I believe the app crashes before any output is generated.

  • edited June 2013

    Sebastiaan,

    My apologies for my incompetence. There is a text file with debugging output, but there's not much information in it. Here it is:

    Launching resources/android/menu.opensesame
    openexp.sampler._legacy.init_sound():samping freq = 48000, buffer size = 512
    experiment.init_log():using 'defaultlog.txt' as logfile (utf-8)
    experiment.run(): experiment started at Wed Jun  5 07:45:10 2013
    experiment.run(): experiment finished at Wed Jun  5 07:45:16 2013
    

    Cheers!
    John

  • edited 1:16PM

    Hi John,

    Indeed, there is problem with loading some of the plug-ins that are used by the Android template. Therefore the experiment doesn't start at all, and even the debug file is empty.

    More specifically, the touch_response and notepad plug-ins don't work. I filed an issue for this, and it should be fixed with the next update. For now, the workaround is simply to stay clear of the touch_response and notepad plug-ins, which do not offer any crucial functionality.

    Cheers!
    Sebastiaan

  • Thanks so much for your reply, Sebastiaan. It's nice to know that it wasn't user error on my part.

    I have a quick question - if the touch response plug-in is nonfunctional, how should I collect responses from my participants? I will show them two pictures, one on the left side of the screen and one on the right, and ask them which one they prefer. Is it possible to use the mouse_response to collect their response?

    Cheers!

    -John

  • edited 1:16PM

    Is it possible to use the mouse_response to collect their response?

    Yes, the touch_response is just a convenience plug-in that automatically classifies touches / mouse-clicks according to a grid. You can use mouse_response equally well, although you may have to recode the mouse coordinates (cursor_x and cursor_y) according to your experiment.

    For example, if you want to classify all touches on the left side of the screen as 'left' and the right side of the screen as 'right', you could use a script like this:

    if self.get('cursor_x') < self.get('width')/2:
        exp.set('response', 'left')
    else:
        exp.set('response', 'right')
    

    You can see this in more detail in the affordances_orientation_android example.

    Cheers!

  • edited 1:16PM

    Hi,

    I'm trying to run an experiment on a Nexus 7, and it always crashes before it starts. The experiment is very simple, and does not make use of the touch_response or notepad plug-ins, yet is still crashes every time before the experiment can begin.

    The debug file has no information in it, except for the start and stop time of the experiment (about 5 seconds).

    Any ideas why it won't run?

    Thanks!

    Jack

    http://img.cogsci.nl/?q=51b0f6190a08a

  • edited 1:16PM

    Hi Jack,

    The problem is likely the same as John's: A plug-in fails to load, in this case fixation_dot. This applies to all plug-ins that use the new plug-in framework, which are currently:

    • joystick
    • fixation_dot
    • touch_response
    • notepad

    The debug output that you see is presumably from the menu (menu.opensesame) that is used to select the actual experiment (the menu is just a regular experiment).

    So the workaround would simply be to replace the fixation_dot by a sketchpad. Make sure to remove all fixation_dot items also from the unused item bin.

    Cheers!
    Sebastiaan

  • edited 1:16PM

    Very nice piece of software. Works great on a Sony Xperia SP - Android 4.1.2.

    Cheers!
    Alex

  • edited September 2013

    hi,
    I have Micromax A110, Android version 4.0.4. i have recently downloaded the runtime app of opensesame on my phone (i had opensesame on my laptop). Though the app works fine on my phone but it doesn't detect the experiments that I created on my laptop (under droid template)...I don't know where I am going wrong........

  • edited 1:16PM

    Though the app works fine on my phone but it doesn't detect the experiments that I created on my laptop (under droid template)

    When you start the app you have to indicate the folder where your experiments are located. By default this is the /sdcard/ or /sdcard/Experiments/ folder. Your experiment files are probably placed in the wrong folder, but this can be a little difficult to figure out under Android. One of the explorer apps may help you to move your experiments to the correct location. For example:

    Cheers!

  • edited 1:16PM

    Hi sebastiaan,
    Thanks... its working now :D

  • edited September 2013

    Hi,
    Is the touch_screen plugin working on Android run time now? and if yes how does it work?
    In general, where can I find a kind of help for each function in which are described the way to use it (input, output etc ...)
    Regards,
    Maxime

  • edited 1:16PM

    Is the touch_screen plugin working on Android run time now? and if yes how does it work?

    Yes it does. To get help for this specific item, you can click on the help icon in the top-right of the tab.

    In general, where can I find a kind of help for each function in which are described the way to use it (input, output etc ...)

    The general logic is explained here and elsewhere on the documentation site:

    However, some plug-ins, which are not part of the OpenSesame core functionality, may work slightly differently. In those cases, you can check (by search) if the plug-in is documented on the documentation site. If not, you can use the context sensitive help function in OpenSesame, by clicking on the help icon in the top-right of the tab.

  • edited 1:16PM

    Ok.. Can I develop on windows, install the runtime on Android and run the script on Android? Is that the work flow?

  • edited 1:16PM

    I should mention that I was going to try it out on a galaxy tab.. Would you consider the Android environment to be stable for simple studies (just responses to visual or audio stimuli) or should I wait?

  • edited 1:16PM

    As of now, the android runtime will not play video items. It will however play audio. Just letting you know :)

  • edited 1:16PM

    and yes, develop on windows, set backend to droid, and then drop onto your android device. make sure the screen resolution is the same as the examples provided with the Opensesame windows download. Look at the examples for adroid experiments, and use the same screen resolution. It will then automatically fit to your device.

  • edited 1:16PM

    Thanks Joshua. I'll try to figure out things as much as possible and come back here as needed.

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