Android Question Download settings on app start!

Discussion in 'Android Questions' started by aidymp, Apr 4, 2015.

  1. aidymp

    aidymp Active Member Licensed User

    Hi for quite a while now i have been hardcoding all my urls ect into my app, and if something changes I have to update the app!

    So the information I have to download

    A package name (there are about 7 packages)

    I currently add them to a spinner with

    Spinner2.Add ("Install Setup Number 1")
    I now download a file and read it with this

    Dim tmplist As List
    File.Readlist(File.DirDefaultExternal , "/Download/packagelist"))
    Log("added "&tmplist)
    End Sub
    The Problem I have now is that linked to the file i also have to match it with a URL and and add some other data.

    So if spinner2 is set to Install Setup Number 6

    Package number 6's URL will be ""

    I see I can do this with a map file as in "Install Setup Number 1" , ""

    but i also need to have 2 more bits of info associated with the pack!

    A location to an image file & a location to a description file! So looking at it I would have to have a text file containing, The Package names! and then 3 map files? It looks to me that I am OVER COMPLICATING this!

    Can anyone suggest a simpler way?

    Ideally a file that contained something like this

    title, url, image url, description!

    Install Package 1 , , , This is package 1 is great, but package 2 is better

    Thanks Aidy
  2. Peter Simpson

    Peter Simpson Expert Licensed User

    Why don't you use something as simple as a CSV file loaded directly from your online server on app startup and then load the file into a list, then maniplate the lost with Regex.Split.

    pack1, pack1.jpg, xxx1, yyy1
    pack2, pack2jpg, xxx12, yyy2
    pack3, pack3.jpg, xxx3, yyy3
    pack4, pack4.jpg, xxx4, yyy4
    pack5, pack5.jpg, xxx5, yyy5
    pack6, pack6.jpg, xxx6, yyy6

    This is just a start, obviously one of the genius boffins on here will come up with a better simpler solution. There are lots of ways for you to get to the end solution that you are after.
    giga and DonManfred like this.
  3. giga

    giga Well-Known Member Licensed User

    "Comma Separated Value" File should do it. Makes sense.
  4. aidymp

    aidymp Active Member Licensed User

    yeah i was looking at regex, but to be honest, its over my head. i will look into it


  5. Peter Simpson

    Peter Simpson Expert Licensed User

  6. aidymp

    aidymp Active Member Licensed User

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice