User Tag List

Results 1 to 4 of 4

Thread: Help with .TXT file Saving on Android

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Rickyvb's Avatar
    Join Date
    Oct 2015
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with .TXT file Saving on Android

    Can anyone help with proper file saving for Android 29 api target ver 9?

    Currently, I am trying to save the EDIT BOX object text to a .txt file on Android.

    This is what I tried when you click the save button.

    1) DataStorageDirectory$( "Android object" ) + "/" + "Paratoolz2019/SpiritTypewriter/" + "Test.txt"

    2) ExternalStorageDirectory$( "Android object" ) + "/" + "Paratoolz2019/SpiritTypewriter/" + "Test.txt"

    3) "/Paratoolz2019/SpiritTypewriter/" + "Test.txt"

    4) "Paratoolz2019/SpiritTypewriter/" + "Test.txt"

    No directory is created and no file shows up.
    Do I need to create a START OF FRAME line of code to create the Folder first?

    I also tried using the FILE object to create a Directory using the codes above, to no avail.

    Thanks for any help...

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Rickyvb's Avatar
    Join Date
    Oct 2015
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tons of info about saving with .INI on this forum but nothing for .txt?

    Help please!

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Rickyvb's Avatar
    Join Date
    Oct 2015
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind, I figured it out on my own! Thanks anyway!

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Rickyvb's Avatar
    Join Date
    Oct 2015
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For those who need help creating file structures in Android / Saving Text Files / Saving Audio Files. Here is how I did it on Android api 29 target ver 9

    Building on Windows 7 running MMF2.5 DEV 292.11

    File Structure (
    Requires FILE Object and ANDROID OBJECT ) ****Remember to check the appropriate permissions!***

    ExternalStorageDirectory$( "Android object" ) + "/" + "FOLDER1"
    ExternalStorageDirectory$( "Android object" ) + "/" + "FOLDER1/FOLDER2a"
    ExternalStorageDirectory$( "Android object" ) + "/" + "FOLDER1/FOLDER2b"

    This will create the files as such FOLDER1/ ( FOLDER2a and FOLDER2b will be in FOLDER1)

    You have to create the structure in order. For some reason the FILE OBJECT, can not create multiple folders at once. Which is odd, considering the ANDROID MICROPHONE OBJECT can create as many folders as you like with one line of code. Not only that. You don't even need to use the Android Object.

    What I mean by this is, you can record to a path like this ( "FOLDER1/FOLDER2a/AUDIOFILE.wav") and the Microphone Object does all the work creating all the folders, you think the FILE OBJECT would do.

    Nevertheless, moving on...

    Saving a Text File using the EDIT BOX Object.

    First you must have your structure created with the FILE OBJECT, as shown above.

    Now we can use the Save Function in the EDIT BOX OBJECT, with a structure like this( ExternalStorageDirectory$( "Android object" ) + "/" + "FOLDER1/FOLDER2b/TypedFile" +".txt"

    This will save a file in TEXT form in FOLDER2b.

    We now have FOLDER2b with a Text File.

    Next...

    ANDROID MICROPHONE OBJECT, saving an audio file

    Like Stated above. You simply make your save file have the structure you need.

    "FOLDER1/FOLDER2a/AUDIOFILE.wav"

    Yup, no need to put anything else. Which is odd, because I read numerous forum posts stating you need to type this instead.

    DataStorageDirectory$( "Android object" ) + "/" +"FOLDER1/FOLDER2a/AUDIOFILE.wav"

    Which did not work at all for me. In Fact DataStorageDirectory$( "Android object" ) + anything, does not work!

    Hopefully this saves you the hours of searching, testing different codes you think should work in forums and waiting on help, like I did.
    Again, this is the codes I came up with that worked on my app / phone and my girl's phone.

Similar Threads

  1. Saving with an Ini File Example
    By Janette5 in forum Guides, Tutorials, Examples, Widgets
    Replies: 0
    Last Post: 22nd March 2018, 11:03 AM
  2. array file saving on both android and ios
    By Chokito in forum Android Export Module 2.5
    Replies: 0
    Last Post: 27th December 2014, 01:38 AM
  3. Saving to File
    By Guitaristinmakin in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th December 2007, 09:18 PM
  4. File Options not saving
    By mdrd in forum Install Creator and Patch Maker
    Replies: 3
    Last Post: 28th December 2006, 05:06 PM
  5. File object - file selector saving issues
    By Gary_Molton in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th November 2006, 08:25 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
  •