An 1/2 hour app turned into 46 minutes - I was bored...

Discussion in 'Chit Chat' started by Peter Simpson, Apr 24, 2015.

  1. Peter Simpson

    Peter Simpson Expert Licensed User

    Hiya all,
    I've had some time to think about this test app (just for fun, not for the Play Store, I don't think)

    Updated apk, there were 3 regions that are not countries.

    Is B4A really an RAD program or not, well yes it is :)
    I've let myself down though, but only by 16 minutes.

    I wanted to create an app to show country flags. I know there's probably a million apps and websites out there that already does this, but this was something that I timed myself to do. In my mind I thought that I could create the SQLite database and import the country names with flag images names and create the app in its basic form in less than 30 minutes, but that didn't happen. After about 15 minutes I actually though that this app was going to take over an hour to create :mad:

    As I mentioned previously, I've had a long time to think about this particular test app so most of the coding process was already in my mind, I just had to put it into B4A. Please note that I already had the country list and flags, I downloaded them months ago (like last year).

    The apk file is not small as it holds over 230 flags.
    Download link to test app is here: https://www.dropbox.com/s/4kzl2p7b41r3gnr/WorldFlags.apk?dl=0

    Designed for my phone, it will probably look terrible on a tablet. What do you expect for only 46 minutes, miracles ;)

    Screen Shot:

    Screenshot_2015-04-25-10-22-44.png

    Please note that because I mapped the countries and flags file names into the database by code, there maybe a couple of countries where the flags do not display. But then again they might all work perfect :D

    Enjoy...
     
    Last edited: Apr 25, 2015
  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Nice.
    0000 Coding Start
    0015 Re-estimated coding to take an hour
    0030 Passed initial estimate time, motivation level drops to -273C
    0046 Coding completed and debugged, feeling redeemed, motivation level up to 0C
    0058 Uploaded to forum

    So did you store the flag image as a blob in sqlite?
     
    Peter Simpson and lemonisdead like this.
  3. Peter Simpson

    Peter Simpson Expert Licensed User

    Hiya @thedesolatesoul,
    It did cross my mind to do that but as I was on a timer (that I completely missed anyway), I didn't write the code to read the entire image folder (one image at a time) into the database. I will admit it though, if I had not been timing myself I would have inserted all the images into the database as wither a BLOB or an BASE64 string, probably the latter knowing me.

    Currently all the images are stored in the assets folder. As all the images are just the country names with an underscore in place of spaces and .pne added to the end, it's just a quick and dirty ways to create an app in B4A as fast as possible.

    I was just showing my sister the app and realised that Europe was in the database, so I've updated the apk file and screen shot.
     
    thedesolatesoul likes this.
  4. thedesolatesoul

    thedesolatesoul Expert Licensed User

    one day, one day...
     
    Peter Simpson likes this.
  5. Peter Simpson

    Peter Simpson Expert Licensed User

    That's probably why Europe was classed as a country in the list that I downloaded @thedesolatesoul. Somebody out there is seriously hoping.

    Poor Nigel Farage will die of an heart attack if that ever happens lol :D
     
    Last edited: Apr 24, 2015
    thedesolatesoul likes this.
  6. lemonisdead

    lemonisdead Well-Known Member Licensed User

    Ouiiiiinnnnnn, I was working on such app since 30 days (or more)...... :)
     
    DonManfred and Peter Simpson like this.
  7. Peter Simpson

    Peter Simpson Expert Licensed User

    @lemonisdead I was originally thinking about making some sort of quiz out this app and naming the app 'Fun with flags' (taken from the TV series The Big Bang Theory). I've actually thought about a few different learning games with flags that I though might be interesting for younger app users if they wanted to learn different country flags.

    Myself and flags do not mix too well though :p
     
    Last edited: Apr 25, 2015
    DonManfred and lemonisdead like this.
  8. swamisantosh

    swamisantosh Member Licensed User

    I
    I'm new basic4android programming i would thankful if you can provide me the download link for the above code.
     
  9. andymc

    andymc Well-Known Member Licensed User

    Well done! This sort of thing would be awesome as a youtube tutorial video to show off the true power of B4A. I wonder how long it would have taken to write using Android Studio or Eclipse?
     
Loading...
  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