File banana

This topic contains 9 replies, has 2 voices, and was last updated by  SekaiChi 1 month, 3 weeks ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #15089

    SekaiChi
    Participant

    I could really use some help I’m trying to load the first line of text in Level/Scores.txt sdcard into a one-dimensional array of character, is there no Banana for that?  I don’ want to use internal files a tthis point because I need it to be  a separate file right now.

    #15122

    nerobot
    Participant

    Please paste your code here and describe where do you have problems.

    #15150

    SekaiChi
    Participant

    I am learning Monkey2 going from desktop now to tablets i reliase I need to understand how save textfile on Androids sdcard. Is it possible? I just need the smallest banana how to do such a thing and i can learn from that i think.

    #15151

    nerobot
    Participant

    Try to do that:

    I have no installed android environment.

    #15196

    SekaiChi
    Participant

    it didn’t work in Android in Dekstop it saved a file in Monkeys own folder (not app folder but the main monkey folder) when you take away the /

    Nnothing happens in either platform with the /

    Do i have to give Android permissions to write somehow?

    #15209

    SekaiChi
    Participant

    The path given on my Samsung Android phones is

    /storage/emulated/0/Android/data/com.monkey2.monkey2game/files/

    One had sdcard inserted one has not still both gives the same path from the External command.

    I don’t know where to go from here to be able to load and save onto the card, have I missed something?

    #15210

    nerobot
    Participant

    Permissins are required, but as far as I see they already added into manifest by default:

    #15224

    SekaiChi
    Participant

    Thank you sooo much it did work i was just not looking at the right place !

    I was looking at the root of the sd card but what happened was that external points to android/data/com.monkey2.monkey2game/files on the internal memory. (very much like ios does with some apps)

    Also I checked that on the phones with a sdcard installed the same path is created but always empty. So external means the inbuilt memory/drive, with some special path added to match the name of the app.

    This is what you get when you are new to these kind of things 🙂☺👌

    #15225

    SekaiChi
    Participant

    The next issue would be to place it correclty becuase that place was a thousand clicks away. I seriosly didn’t even knew there was such a place inside my phone called Android/data/blalbbala. But it is a great start

    #15226

    SekaiChi
    Participant

    I made a list for anyone who might want to load and save files on the Android.

    On the left is the name,on the right you see the path to put in your Monkeycode.

     

    My files /All files = /storage/emulated/0/ (path here continues with Downloads, Playlists, Pictures etc)

    Images = /storage/emulated/0/DCIM/Camera

    Videos = same as above

    Music = /storage/emulated/0/Music

    Documents = /storage/emulated/0/Documents

    Default Monkey2 (Externaldir command) = /storage/emulated/0/Android/data/com.monkey2.monkey2game

     

     

    So,

    device storage = /storage/emulated/0

    SD memory card = /storage/extSdCard

    This  probably changes from models and versions but its good facts to begin an understanding how it works.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.