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

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:

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

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.
 

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:

swamisantosh

Member
Licensed User
I
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:

View attachment 33671

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...
I'm new basic4android programming i would thankful if you can provide me the download link for the above code.
 
Top