Posts

Sunday March 7th 2021

Image
 This weekend I finished up with the tutorial I was watching and made a new project that will actually become my app. I made a bottom navigation bar that is able to flip between fragments all from within the same activity. I then spent my time working on the search fragment and made it look like this Definitely not my favorite design, but I can always work on that later. I just created this so that I could go to work on the back end to make sure it would work.  I reused some of the code I used before to make my singleton and API connection classes, but I had to make a few modifications to make them work in the new setup. I got it working, though not quite the full functionality I want. I just limited it to the city name as the only parameter that actually does anything for the request. Next time I work on this I want to add the other functionality for the other inputs. Overall I learned a lot about fragments, activities, context, XML, and using the resource file to make values...

Wednesday March 3rd Update

Image
 Today I kept going along in the tutorial I am watching and made some modifications to my code. The idea was to make a singleton request queue class in order to limit the amount of network traffic that app used and just put everything through the one queue. This was done by making the following singleton class I also made a few changes to simplify the code in the button listeners by creating a class specifically for interacting with the API and then the listeners just instantiate an object and call methods on it. Doing this required me to use an async function which wasn't too difficult to make actually. I made a listener interface and then implemented it to return a value whenever a response is given back from the API. This makes it work much smoother.  Not sure if I actually ever put the link to the tutorial. So  here it is .  I didn't really use any more links today. Mostly just followed along and did my own thing.

Sunday 28th of February Update

Image
This weekend I worked more to modify the project tutorial to fit my needs with the API. One of the challenges I faced was that the API requires a new token every hour in order to get the data. To get around this a I created a function using an HTTP POST request to get my new token and store it in a variable. This function is called at the launch of the app and also whenever the GET requests return error code 401 for unauthorized request.  Here is what the emulator app looks like I changed the three buttons to relate more to my project and they do exactly as they say and just show the data in a notification.  This is a little screenshot of the source code I wrote this weekend. This doesn't show it all, but is just shy of 300 lines and just does some pretty basic stuff to get me familiar with some new libraries and working with Android Studio. I used these and a few other websites to help me figure out how to make my code work GET and POST requests Request Queues

Wednesday February 24th Update

Image
 Today I began looking for more resources and tutorials I can use to learn how to make an application. I started watching and following along with this tutorial  which shows you how to use REST api's in android studio and display it. It will also help me just get more familiar with working with android studio as it has been a while since I used it last.  Currently this is what my following along project looks like Not much yet obviously, but I didn't spend too long working on it. Most of my time today was spent looking for more resources.  One other resource I found that I think will be useful is this  Github Repository  which implements a view that I think will be good for my app. 

Test post

 This is the test post.