Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Media plugin - Page 2 - Gideros Forum

Media plugin

2»

Comments

  • rrraptorrrraptor Member
    I made my own file explorer, and seems like LFS dont like utf8 :D
    Keep that in mind.


    Also, I did some test in Android player and the only 2 folders that I am allowed to see is "/mnt/" and "/mnt/user". In every other case Im gettin "permission denied" error. Is that because of the player or not?

    Likes: MoKaLux

    +1 -1 (+1 / -0 ) Share on Facebook
  • hgy29hgy29 Maintainer
    edited June 25
    rrraptor said:

    I made my own file explorer, and seems like LFS dont like utf8 :D
    Keep that in mind.

    I fixed that yesterday already :)

    EDIT: Link to an updated dll here: http://hieroglyphe.net/gideros/lfs.dll

    Likes: rrraptor

    +1 -1 (+1 / -0 ) Share on Facebook
  • hgy29hgy29 Maintainer
    keszegh said:

    It is not documented btw in the wiki.

    Yes, it is kind of a "private use" function I added to Gideros for a specific project of mine. It is implemented only for Android
  • MoKaLuxMoKaLux Member
    edited June 27
    and why not post here too :)
    http://forum.giderosmobile.com/discussion/comment/63302/#Comment_63302

    also added application permissions to the wiki:
    https://wiki.giderosmobile.com/index.php/Application

    it's quick and dirty, I'll do it later I guess, I need to check github to see all permissions available.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • keszeghkeszegh Member
    edited June 29
    hgy29 said:

    Try this:

    -- Request permission
    if not application:checkPermission("android.permission.WRITE_EXTERNAL_STORAGE") then
    application:requestPermission({"android.permission.WRITE_EXTERNAL_STORAGE"})
    end
    i got the error:
    "attempt to call method 'requestPermission' (a nil value)"

    EDIT:
    -- Request permission
    if not application:checkPermission("android.permission.WRITE_EXTERNAL_STORAGE") then
    application:requestPermissions({"android.permission.WRITE_EXTERNAL_STORAGE"})
    end
    works! (note the plural in "requestPermissions")

    Likes: MoKaLux

    +1 -1 (+1 / -0 ) Share on Facebook
  • MoKaLuxMoKaLux Member
    edited July 1
    I have been playing around with the gmedia plugin for android. I have modified 2 functions: getPicture() and savePicture().
    Now those functions can deal with any files :smile:
    For example for an image:
    	local source = Pixel.new(0xffff00, 0.75, 128, 128)
    	local rt = RenderTarget.new(source:getWidth(), source:getHeight())
    	rt:draw(source)
    	local myfilepath = "|D|mysavedpicture2.png"
    	rt:save(myfilepath)
    	local media = Media.new(myfilepath)
    	mediamanager:postPicture(myfilepath)
    And for a text file:
    	local myfilepath2 = "files/text_file01.txt"
    	local media = Media.new(myfilepath2)
    	mediamanager:postPicture(myfilepath2) -- = save picture (now save file really)
    + now you can name the file too :smiley:
    + I migrated to androidx as (at)hgy29

    (minor issue would be to rename those functions)

    TESTED ON ANDROID 10 (samsung J6)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
Sign In or Register to comment.