We had started to create multi-page apps and now to build on that we were tasked with building a Tour Guide app. The brief was to make our own multi-screen Android app to share our knowledge about a city that we knew well. It was to include top attractions, restaurants, public places or events for the city. We were shown how to create proper data structures to store lists of information and then build layouts to display those lists of data. We were to navigate through those lists in Fragments using a ViewPager or Navigation Drawer; creating out own custom classes to do so and properly handling images and/or audio if applicable.
I chose to base my Tour App on the City of Nottingham and I included places to stay – mostly hotels, places to eat – restaurants and takeaways, places to explore like Theatres and castles, and finally, a section on Museums. Each item on each of the lists when clicked takes you to the venue’s website and navigating between lists is as easy as a swipe left or right.
Creation of this app introduced me to allowing permissions in the manifest (Internet) and making those Arrays of the data and image assets. It was also the first time that I had come across Fragments usefully. I had read about them in Stack Overflow posts but until this time they had remained some mystical far off land to be explored sometime in the future. We were also encouraged to up our game in terms of styling and polish of our app. I was very pleased with this app and I may well go back and add extra venues and categories to make it more complete and useful – once the Covid-19 pandemic is over and people can get out to visit these sorts of places.
When most people think of Nottingham they probably think “Robin Hood” who was probably not a real person but a couple of fun facts; D.H. Lawrence lived and wrote just outside of Nottingham in Eastwood and William Booth founded the Salvation Army in Nottingham and there is a museum to him and the Salvation Army in Nottingham centre. It is in my app just a bit lower on the museums page.
I had been accepted onto the Android Basics Nanodegree full scholarship and after wondering would I make the grade, I was finally relieved and excited.
The course continued with us going through the creation of “The Miwok App” – an app that was written to educate people about the language of the Miwok people – a group of native American people. The next project was to design an app to achieve a certain goal or purpose. We were going to create new activities, use explicit intents to link between activities in the app, use onClickListeners – written in Java this time – to add behaviour to to buttons, create our own custom class, looping through an ArrayList and populating a ListView or GridView with an ArrayAdapter.
The Miwok app “held our hand” through production of such an app and gave us the basis to create our own “masterpiece”. In addition to what was required with our project, the Miwok app also played .wav files of pronunciation of the Miwok words but that wasn’t required for our project.
I decided to create a Music Player App with a front page with a picture and several buttons leading to other activities – each was a genre of music – Rock, Pop, Classical, Disco and Country. Each activity had lists of music from that genre which was created from a list using ListView. Each other activity had buttons to move within the app to each other activity and to the home plus another button which displayed a “Playing Now” page. The purpose of the app was to practice Intents, ListView, Arrays(which made up the lists) and ArrayAdapter. The app didn’t actually play any music; that would be for another lesson some time in the future.
I was really quite pleased with the way that it turned out but to be honest, I look forward to a time when I can style an app to be a bit more visually appealing. I may well add some functionality to it at a later date too – such as actually linking the buttons to real music and actually getting my list/array form an API which is constantly updated. Maybe, some day….
The next project after the score app was to build a quiz app. Given my medical/healthcare background, I decided to produce a Medical Quiz.
The app preparation and creation included plans with drawings, spider grams, lists, pseudocode and a variety of other planning tools before writing any code. Taking those drawings and creating an xml layout (single page) by creating, positioning and styling views then creating interactivity through button clicks and Java code – commenting and documenting the code as you went.
My six question quiz incorporated questions with radio buttons (one choice from four or five possible only), check boxes (as many possible choices as there are questions) which were used when multiple right answers were required and one EditText where the person completing the quiz would type in the correct answer – hopefully. After each question had been answered the submit answers would be pressed. When the “Submit Answers” button was pressed a pop-up message would tell how many points had been achieved with two points awarded for each correct answer, even if there were two or three correct answers per question. If all of the answers were answered correctly, a different pop-up would be seen saying “You have scored a maximum of fourteen points!” The pop-up messages are officially called “toast messages” because they pop-up – neat!
There was a problem; I gave it to my son to play with and he pointed out a problem very quickly – it has to be said that my son was in his late twenties and was already a software coding god! He had earned his living as a senior software developer for several years at that point. He said, “If I fill all of the check boxes, I can get full marks even if I have also checked the wrong answers”. I learned how to put the check boxes for a particular question into a group and then limit how many check boxes were allowed to be checked in that group. Sorting out the scores was largely about a whole load of if(namedButton.isChecked) flow control statements with the instruction to add two points to the variable “score” if it was true (the condition had been met – boolean). I submitted the project and that was the final project for the “Google Developer Challenge” part of my journey. There was a lot of speculation and activity surrounding who would be accepted onto the full Nanodegree scholarship. There had been 20,000 people chosen for the Android Basics Track and only 2,000 would go forward to the next part. They were looking for those who were able to progress with the work but they also stipulated that those most supportive, communicative and active on the various forums that they had provided. I mentioned in an earlier post about the Udacity based forums but there was also two Slack channels; one was a general Udacity Student support channel and the other was a channel for the track that we were on – so I was on the Android Basics channel. There was a lot of support on the various channels from other students, we were encouraged to support other students and there were a few mentors who helped out with queries too. In order to progress, we had to be seen to be active participants – there was a flurry of activity when we neared the end of the challenge.
Fortunately for me, I made the cut and I was invited to continue on to the next phase. There will be more about that next time…
I decided to base my next project on a score app for Rugby Union football using the Court app for guidance. The app has two sets of score buttons, one for Team A and one for Team B. Each set of buttons consists of:
+ 7 for a Penalty Try
+ 5 for a Try
+ 3 for a drop kick
+ 3 for a penalty
+ 2 for a conversion (successful kick between posts following a try being scored.
This was an exercise about creating buttons as “onClick” events in the xml and then creating click handlers in the Java. Everything seemed to go well until I turned my phone into landscape mode – the scores disappeared. The solution, it turned out, was to create two static variables “SCORE_TEAM_A” and “SCORE_TEAM_B” the capitals to show that they were static when the user user interface refreshed, and to write two pieces of code – one to onSaveInstanceState to save the scores in those static variables and another to onRestoreInstanceState to show the scores in the refreshed page. It seemed to go well after I had got over that little problem so I submitted to the project and moved onto learning how to add other functionality. During the course all of the learners were linked by Udacity message boards with a general chat room and a chat room for each of the projects.
I will entertain you with the next instalment very soon. ‘Bye for now.
I started my Nanodegree on the 6th of November 2017. The course was administered on-line as so many of these courses are and I was assigned a mentor.
I was first shown how to install Android Studio and then set about creating my first project – a birthday card. It was really an exercise in getting to grips with the user interface and XML. Android Studio created a Main Activity (Java) but I wasn’t expected to go anywhere near it at that stage. I was encouraged to play around and make a variety of designs of birthday cards/Christmas cards in XML using LinearLayout and Relative Layout. Very soon it was time to sent off my first project for “marking”:-
The first project was a single page “Business card” or similar using various styling instructions in .xml – margins, layouts, sizing of text, pictures and “views”. This was mine. The address is that of Udacity in Mountain View, the logo – Udacity and the photo; an appropriate one was found with a web search. Quite fetching, don’t you think? Unfortunately, it wasn’t interactive yet.
The next step was to learn how to get our designs to do something which meant getting into Java coding. I was guided through an app called Court Counter – a score keeping app and was encouraged to code “as you go”. In the end I had a score counter based on the the game of tennis to refer to before creating the next submitted project, but I’ll tell you all about that next time…
As you may well have read in my “About” section, I was once a Registered Nurse and later, a Resuscitation trainer – this little factoid will come in useful once I get to the bit where I describe what I have been working on recently. Please bear with me. I had always taken photographs and thought that it would be a jolly wheeze if I was to retire early and make a living as a photographer. I have a photography blog which gives a fuller picture of the photography adventure (link on header to each page if you are interested – please visit at least once) but suffice to say, it didn’t bring the fame and fortune that I craved. During that time I started to play with Android photo editing apps on my phone after a very talented photographer called Gerry Coe came to the local camera club that I attended. He had won numerous awards for his photography and had moved on to win awards with his iPhone photography. I was hooked. I started to play with Snapseed, Picsart, PhotoLabPro, Prisma, and a whole lot more using my photographs and posting them on my Photo Instagram page*. My next thought was to see if I could find out how to write an Android photo app for myself. I mentioned this to a friend of mine one evening at the camera club and the following morning, he sent me a link to Google Garage where they were offering scholarships to study for one of four Google Nanodegrees.
Android Basics Nanodegree
Android (advanced) Nanodegree
Android Basics Web development Nanodegree
Android (advanced) Web development Nanodegree
At the age of 56 I decided to apply for the Android Basics Nanodegree; I did not have any previous experience of writing code, just a kid with a crazy dream!
I applied and was accepted. The course was run by Udacity and the first stage was “The Google Developer Challenge”
The scholarship was for three months and there were 20,000 selected across Europe for each of the two basic strands and 10,000 for each of the more advanced strands. I did well in the first phase and was given another scholarship to study for a further six months for the full Nanodegree. There were only 2000 people on each strand invited to continue and I was one of the fortunate ones.
There will be more about my journey through my Nanodegree with Udacity in my next post.
*I have two Instagram pages; a photography page (@paulcullenphoto) for which there is a link through my photography website and a new “Developer” page (@cullendevelopment) to which this website is linked.
I have a third site “uncorked bottle” (link under header on each page) if you are interested in my wine blog.
My name is Paul Cullen and I am the developer at Cullen Development.
I hope that you will share my journey in software development and discuss with me a variety of computer coding related issues – and hopefully give me some feedback so that I might learn some stuff along the way. Perhaps there is something that I can help you with too – just ask. I will post anything that is related and interesting and informative to me in the hope that you will find it interesting and/or informative too. I would be honoured if you would follow me on Instagram, LinkedIn and Twitter and any other channels that I set up in the meantime as I endeavor to contribute to the coding community.
Please tell me if there is anything that you would like to see here, or indeed, if there is anything that I have posted that you would rather not be bothered with.
By the way, this is not my only blog – I also have a photography blog called paulcullenphotography and a wine blog called uncorkedbottle. I will put links to them on the home page.