User Tag List

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 32

Thread: How to use array files for Android Saving?

  1. #21
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    marcorios7's Avatar
    Join Date
    Feb 2014
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  2. #22
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,051
    Mentioned
    131 Post(s)
    Tagged
    3 Thread(s)
    Yes sure!

    1.- i think you forgot to add the INTERNET permission

    2.- you are using AppDir$, this is not correct in android you need to use "android object" and save using ExternalStorage("")+"/"+"yourfilename.txt", in this case don┤t forget to set "write external storage" in the permissions, or use datastorage("")+"/"+"yourfilename.txt" in this case no need to set the permission.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  3. #23
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    marcorios7's Avatar
    Join Date
    Feb 2014
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi FVivolo,

    Thank You Very Much!

    Your answer fixed my problem!

  4. #24
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Accessing Array File On Android Device

    I've read through these posts and I'm still struggling with how it works. Probably since I just started to play with the Android exporter and I have little experience with Android devices.

    I have an app that I have been able to load onto my Android tablet. It utilizes an array file called savedata.arr. I've installed the app from MMF 2.5 into a directory Android/data/atomicnumbergame and double clicked on the file to install it.

    Now, the app does not seem to find the file. What do I do with the savedata.arr file or where do I put it on the Android tablet.

    I've written code in the app to load the savedata.arr file: DataStorageDirectory$( "Android object" ) + "/savedata.arr"

    So where is this DataStorageDirectory located?

    Any help appreciated.

    Steve

  5. #25
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey friend, are you sure that app it's not loading the file? Don't know if its your case, but after load the file, you need to get the data from array using events.

    - For example, if I have the global value A called "Money" that I wrote in 0,0 and saved before. When I load the app, I need to get this value and put to "Money" again after load the array.
    Sorry if its not your case.

    - Another case it's that you maybe arent saving the data using the condition expression: Save array to the file: DataStorageDirectory$( "Android object" ) + "/savedata.arr"


    To finish I attach my very simple system of LOAD/SAVE array data on android. Everytime you start loop load_array, you will load array. Everytime you start loop save_array you will save the array.
    Of course you can split my 2 conditions of load in just one if you want.
    And, of couse you can get values directly from array instead of put it on global value.

    LoadSaveArray.mfa

    hope it helps. Best regards

  6. #26
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the suggestions. I have the array file created and I have the code to load it into my app. This works fine. But after I port the app to the Android tablet, the array file does not go with it. Where do I put the array file on the Android tablet? That is my problem.

  7. #27
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well....you dont have to bring the array file together....when you save the first time using array on runtime, it will create the file...

    but if you want to bring a array file together, I think you can put it on Binary Files and load from it.

    best regards

  8. #28
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, I figured it out. Did not know about the button to insert binary data - have not used it before. Now, I have run up against another problem. When it extracts the data from an INI file, it includes the " " along with the other letters / numbers.
    Steve

  9. #29
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    StrudelCaboodle's Avatar
    Join Date
    Dec 2012
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fernando View Post
    Hello Fernando, is there any possible way you, (or anyone else who has downloaded this file), can re-upload this example for download?

    I would really appreciate it, as I am having some trouble wrapping my head around getting the Array object to properly save and load data for Android as well as iOS. I've got it working great on PC, but it's the mobile devices that I'm getting the last bits of trouble with. My game is just about finished, but this save/load issue on mobile is the final thing holding me back from uploading it to the app store.

  10. #30
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,051
    Mentioned
    131 Post(s)
    Tagged
    3 Thread(s)
    Regards,


    Fernando Vivolo

    ... new things are coming ...

Page 3 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. Saving Array files
    By MTCMusic in forum HTML5 Export Module 2.5
    Replies: 2
    Last Post: 27th July 2013, 06:39 PM
  2. [RC5] Saving and/or loading array files
    By colej_uk in forum Android Export Module Version 2.0
    Replies: 9
    Last Post: 11th March 2013, 12:49 AM
  3. Saving to array from a sub app
    By Windybeard in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th June 2012, 01:44 PM
  4. Saving an array?
    By Tsun in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 7th April 2012, 04:08 PM
  5. Array Saving
    By B5E in forum The Games Factory 2 - Technical Support
    Replies: 10
    Last Post: 28th July 2010, 03:51 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
  •