nerobot

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 805 total)
  • Author
    Posts
  • in reply to: Drag and drop? #15268

    nerobot
    Participant

    It’s easy. Write in your widow constructor

    Works fine on Windows, don’t know about osx.

    in reply to: Job offer: files for Android and iOS #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.

    in reply to: Where does music files go? #15248

    nerobot
    Participant

    There is the PlayMusic() function in monkey2 that streaming music file, so it can easily playing super-big files, I think.

    in reply to: Docs requests #15247

    nerobot
    Participant

    3. Could in-IDE docs allow text selection and copying?

    Improving of htmlview class is required. It’s not easy task but profit is great.

    in reply to: Job offer: files for 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).

    in reply to: Monkey as your website. #15237

    nerobot
    Participant

    Not for mobile devices.

    in reply to: Apks wont install anymore! #15234

    nerobot
    Participant

    you have to pick build apk and not just rip the apk after pressing the green play button.

    Yes, green button creates kind of patch to run as quickly as possible. Size of patch is smaller.

    in reply to: File banana #15210

    nerobot
    Participant

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

    in reply to: Reading the string with databuffer #15160

    nerobot
    Participant

    Java also use STR_LENGTH+STRING (afaik).

    ReadPascalString name is not good.

    Maybe

    • ReadString – for len+string
    • ReadZeroTerminatedString – for string+0

    Would be easy to read and understand.

    in reply to: Reading the string with databuffer #15154

    nerobot
    Participant
    1. Maybe \0 is needed for strings? fprintf(f, "%s", "HELLO\0");
    2. Why don’t you write such generator in mokey2?
    in reply to: File banana #15151

    nerobot
    Participant

    Try to do that:

    I have no installed android environment.

    in reply to: Reading the string with databuffer #15147

    nerobot
    Participant

    I tried as well PeekCString to see if it works but it gives the same number (which is 7 ).

    It is true for latin locale, not for whole utf.

    Look at this example with russian text:

    It prints: 11, 11, 10, 19.

    in reply to: Phoenix USC #15139

    nerobot
    Participant

    Wow! Need to have 6 monitors! 🙂


    nerobot
    Participant

    Useful function!

    I made this func a bit universal – by using generic for any number types. 🙂

    Note 1: I replaced Assert (from_delta <> 0.0,... with Assert (from_delta <> Null,... to have comparison with _0_ for int-based and 0.0 for float-based types.

    Note 2: Seems that comparison floats with any concrete number is a bad idea, because 0.0 is about 0.0000000001 or so. But it works!

    Note 3: Bad idea to use it for integers because of division operation… so maybe better where-clause would be Where T=Float Or T=Double.

    in reply to: Reading the string with databuffer #15137

    nerobot
    Participant
    1. You poke string but peek cstring. Is it correct?
    2. There is a CStringLength property of String type. Can be useful to set proper offset.
Viewing 15 posts - 31 through 45 (of 805 total)