User Tag List

Page 1 of 9 1 2 3 ... LastLast
Results 1 to 10 of 83

Thread: Android copy/Load image using file object

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2020
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Android copy/Load image using file object

    I am able to successfully copy and load a image using the file object in windows using:

    FileSelReturn$( "File" ) Apppath$ + "PictureCopy.jpg"

    I want to place a copy of a file in a folder easily accessible to the user on android. I would like to keep my existing code using the file object, it says the file object is compatible with android.


    FileSelReturn$( "File" ) ExternalStorageDirectory$( "Android object" ) + "M/PictureCopy.jpg"

    does not work.

    I don't see the folder "m" in external storage?

    How do I create a folder? or is there something else I am missing?

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2020
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using the file object
    create directory
    ExternalStorageDirectory$( "Android object" ) + "m"
    does not work.

  3. #3
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    7,058
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    is not working because your path is incorrect

    ExternalStorageDirectory$( "Android object" ) + "/" + "M/PictureCopy.jpg"

    but for these you need write external storage , something that you can't use above 10,
    and read external storage
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2020
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using:

    Build:31
    Minimum:5.1
    Target: 10

    To understand, are you saying that when implementing this and compatibility:

    Running Android 11, I will be unable to write to external storage, but a device running 10 and down can?

    or

    Running Android 11, but using target android 10 that this will be backwards compatible with android 11 devices and still work?

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2020
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also to verify:

    data storage directory: hidden and inaccessible to user, though allows copy, delete, read and write to it

    temp directory: not permanent storage

    external storage directory: make a local folder found on device storage (not sd card) /storage/emulated/0 that allows read,write, copy, delete - also accessible to user, not hidden

    Public storage: I am unsure how this works or is located? Can I make a folder here that allows read,write,copy,delete, and is accessible to user?

    secondary storage: requires a sd card, folder that can use read,write,copy, delete, accessible to user, not hidden

  6. #6
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    7,058
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    yes please read about scopestorage https://developer.android.com/about/...rivacy/storage

    and here https://developer.android.com/training/data-storage

    data storage directory: hidden and inaccessible to user, though allows copy, delete, read and write to it --- YES

    temp directory: not permanent storage --- YES & NO, in some cases could stay until device user requires more space

    external storage directory: make a local folder found on device storage (not sd card) /storage/emulated/0 that allows read,write, copy, delete - also accessible to user, not hidden --- NOT ANYMORE only to version 9

    Public storage: I am unsure how this works or is located? Can I make a folder here that allows read,write,copy,delete, and is accessible to user? NO, WHAT ARE PUBLIC IS PUBLICSCOPESTORAGE

    secondary storage: requires a sd card, folder that can use read,write,copy, delete, accessible to user, not hidden REQUIRES STORAGE MANAGE PERMISSION https://developer.android.com/training/data-storage/manage-all-files
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2020
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your response. I read the links you sent.
    I am confused about clickteams implementation of reading and writing to device storage.

    ------------------------------------------------------------------------------------------------------
    In my use case:
    CREATE user accessible folder
    data storage/file.jpg COPY TO user accessible folder/file.jpg
    user accessible folder/file.jpg COPY TO data storage/file.jpg
    DELETE user accessible folder/file.jpg
    WRITE .txt to user accessible folder/file.txt

    As seen, read,write,copy,delete need to be ALLOWED between (data storage) and (user accessible folder)
    ------------------------------------------------------------------------------------------------------

    Where do I create User accessible folder?

    What permissions do I select in the .mfa android properties to allow:
    read,write,copy,delete data storage
    read, write, copy, delete user accessible folder

    I do not see "manage storage permission" in the android mfa properties.

  8. #8
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    7,058
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    publicscopestorage create the same external public folder but for application use, whihc btw doesn't need any permission only set read_external_storage
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  9. #9
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2020
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To confirm using location publicscopestorage
    I can:
    copy user files elsewhere to publicscopestorage, and in public scope storage Write folder,copy-delete-file, AND this folder is accessible in file manager by the user?

    What do I put in this context to create a folder, with m being the folder?

    PublicStorageDirectory$( "Android object", >Type Name (Pictures, Movies, Documents, DCIM, Downloads, Music, etc.)< ) + "/" + "m"


    What do I put in this context to access a file?

    PublicStorageDirectory$( "Android object", >Type Name (Pictures, Movies, Documents, DCIM, Downloads, Music, etc.)< ) + "/" + "m/file.jpg"

  10. #10
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2020
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am having difficulty understanding, thank you for your patience and time.


    To make a new folder, I use the file object, directory actions, create a directory?

    Where is publicscopestorage folder located on android storage?

    Where is datastorage located on android storage?

    When making a folder and manipulating files with publicscopestorage, will this do the same actions with locations in android 11 as on a device running android 10?
    In effect, implementing publicscopestorage will be backwards compatible for file locations in 10 and down?

    I have spent time looking for these answers in clickteam forum/online and testing how to do it myself before asking you and can't seem to figure it out.

    THANK YOU

Page 1 of 9 1 2 3 ... LastLast

Similar Threads

  1. WebView2 cannot load image in android
    By pradeep in forum Android Export Module 2.5
    Replies: 3
    Last Post: 5th July 2019, 03:36 PM
  2. Replies: 0
    Last Post: 25th April 2015, 06:01 PM
  3. How to load An Animated Image from file?
    By path in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 28th August 2012, 07:40 PM
  4. file object won't copy? or create new directory?
    By Skeets in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 23rd June 2010, 11:37 PM
  5. file object ... Does the copy action...
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 22nd April 2008, 10:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •