Job offer: files for Android and iOS

About Monkey 2 Forums Monkey 2 Programming Help Job offer: files for Android and iOS

This topic contains 4 replies, has 2 voices, and was last updated by  SekaiChi 4 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #15211

    SekaiChi
    Participant

    I need to save and load png and txt to some “external” memory to both ios and android.
    Ios has no card but istead visble folders that few apps opt to use. Sharing is actually the better option as iy worls the same for both platforms.

    I offer 50 pounds to buy a working simple code to load/save/share a png on Android and iOS.

    #15245

    nerobot
    Participant

    I created example for android (not familiar with ios dev yet).

    What inside:

    1. Saving image from assets into external app folder /storage/emulated/0/Android/data/… I spent some time to force it saving into /0/Pictures/ etc – but it can’t. Looks like such folders isn’t accessible for NDK apps – I don’t know exactly.
    2. Saving text into Android/data/….
    3. Sharing – open Share… dialog for just saved file – via native java code
    4. Closing app by hardware Back button
    5. Little example of building UI based on mojox.

    Sources: https://yadi.sk/d/XWa6bRoj3ZuEce

    Sources + prebuilt project ( 69 mb): https://yadi.sk/d/EvAP-qEl3ZuEe7

    Not exactly what you want but useful anyway (I hope).

    #15250

    SekaiChi
    Participant

    Thanks. Will check into this as soon as I can. Great stuff, I sent you 2o pounds via paypal hope you find that’s fair also I will also support more regularly when can afford as  you do amazing work for the Monkey2 community.

    #15252

    nerobot
    Participant

    Thanks! 🙂

    I found my mistake for that:

    I spent some time to force it saving into /0/Pictures/ etc – but it can’t. Looks like such folders isn’t accessible for NDK apps – I don’t know exactly.

    To use any folder under /storage/emulated/0/ we must request permissions for android api 23+, or set api less level.

    There is the topic about permissions: http://monkeycoder.co.nz/forums/topic/android-permissions/

    But I can’t make permissin requester work on my galaxy s7, api 26, need more research why.

    I choose the second way – set less api level: open \android-save-file.products\Android\app\build.gradle and set targetSdkVersion 21, that’s all.

    Now we can use common monkey2’s file operations like `CreateDir( “/storage/emulated/0/MX2/” ).

    New sources with FileBrowser are here: https://yadi.sk/d/dsyMDk3p3Zuhuf

    Tap on image in files tree to open it. Tap on Share button to share latest opened image.

    #15261

    SekaiChi
    Participant

    I don’t understand permission requester yet I have to check into that ! I read through the thread but the commands they use there seem to no longer work? Was that only a developing branch expriment that never made it into the final version?

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

You must be logged in to reply to this topic.