Tasks – 28/02/2018 – Nauris Eidulis

With most of the application now nearing its completion we are now making our final pushes and polishing the application before deadline.

The current set tasks are:

*Mark O’Shea: Is working on implemening a comment section associated with each event that would allow user to communicate to each other or event managment.

*Ahmed Habib: Is working on a button tab at the button screen that is somewhat similar to the instagram app.  This is just to further allow for user personalization and access.

*Nauris Eidulis: Currently fixing up and polishing google map dialog fragment, add event and menu tabs.

Arron Robinson: Working on the group report.

All of this is to be finished before next wednesday : 7th of March.

Quick Update – 25/02/2018 – Nauris Eidulis

The previous GitHub issue was resolved using shell commands but unfortunately this was just a temporary solution as the error would persists if you tried pushing or pulling through Team Explorer in VS. After a bit more browsing through the internet, I found a better solution at “https://www.danielcrabtree.com/blog/176/how-to-fix-fatal-error-with-git-in-visual-studio-2017”.

This completely resolved the issue and should hopefully prevent it from happening in the future.

Map Dialog Fragment & Contact Placeholder – Nauris Eidulis – 24/02/2018

After I had completed the admin check Mark contacted me and informed me of his progress with the google map API he had been working on. He had managed to implement it into the app but was looking to have it display in a dialog fragment. That’s where I come in. As I have worked with dialog fragments before, Mark left the task with me and after about 6 painful hours of work and browsing through google I had managed to find a way. The biggest issue I had run into while working on this was the a lot of the answers to the issues on google were in Java. Although similar I had to find an equivalent way of translating that into C#.  At first the I was able to get the map to display on the dialog fragment, but was not able to display the coordinates set in the options and was running into a null reference issue.

By commenting out the set up for the map I was able to get rid of the null reference issue but the map would then just display the entire world.28417583_370348533440538_854384726_o.png

So I had to find what was giving me the issue, why and how to fix it. This later became apparent that I had to call a SupportFragment class rather than a fragment class if I am calling a fragment from another fragment. I also required to change the android:name  to fit this change. After implementing the required changes I was able to un-comment the setup for the map and was greeted by this glorious screen.28499857_370370506771674_1227653424_o.png

Although at the moment it’s displaying unrelated coordinated, later it will display the locations of the related events.

The other thing I worked was creating a placeholder contact fragment. Before now clicking on the contact tab would be bring you back to the home screen. So I created a temporary placeholder which will later be a fragment that will allow the user to get in touch with Admin.Screenshot_2018-02-24-14-32-03.png

Maps: Mark O Shea

After our recent meeting with our supervisor we discussed how we might enhance the app for the user. The addition of a map that would display the location of an event would make it easier for the user to find its location. To accomplish this I needed to enable the google maps API on the google console and input the androids name and SHA1 hash code. Next i installed Google services maps in the project. I try’d to do it first through the component but it kept showing as incomplete. Nuget package manager worked first time. I inserted the necessary code and deployed the app.

28312122_10215847429245230_1792156373_o

Github Errors: Mark O Shea

We have our project set-up on Github for some time now and it has proven very useful for working in the group. However, recently when I tried to push my latest change, I encountered an error which I have never seen before.

28449921_10215856120102496_817793019_n

I thought at first it must be a file conflict or I had inadvertently deleted a line of code. But Nauris reported he was after getting the same error. After some searching on stack overflow, the simplest solution was to navigate to the project solution folder and run power shell. And use the command line to push and pull to Github. This is a quick fix until we resolve the issue on Visual Studio

Admin Check – Nauris Eidulis – 23/02/2018

My task for this week continues on from last weeks event task. I was tasked to find a method of checking whether the current user was an admit or not. The reason for this check was to ensure that only a user with admin privileges  may add or remove events from the list.adminCheck.PNG

Currently in the menu the option to add an event is visible to both admin and non-admin users, but I will later try to change this so that the option is only available to admins. For now  when ever the user clicks on the “Add Event” option,  a method is called that checks the current user ( the current users info is stored into variables) and if they are in the admin table. adminCheck2.PNG

If they are in the admin table, the method returns an integer value of 1 and if they are not, the method returns a 0 instead. Currently I feel that this a very basic and not very secure way of implementing the check as the method is exposed. Later I hope to improve this method and make it more secure to malicious intent.

Another topic on this agenda is that I ran into a wall this evening when I tried to push the new updates to github. Unfortunately when I tried to push I received an error I had no seen before.Capture.PNG

Apparently I was also not the only one who ran into this issue as Mark had also ran into the same issue. We are now currently working on resolving this and will update with further information.

Add Event – Nauris Eidulis – 19/02/2018

Last week my task was to work on and complete the design and functionality for adding an event to the database from the app. This has been completed but over the next few weeks as we finalize the app I may clean up the code, design and may add some robustness.

Currently if the user wants to add an event to the database, they do so through the drop down menu and selecting “Add Event” option. This will open up a dialog fragment that will contain the required input fields to add the event to the database.Screenshot_2018-02-19-10-18-44.png

The inputs are stored in variables using getters and setters in a custom event arguments class containing a method that takes in the variables.addEventCode1.PNG

the method then stores these parameters into SQL external variables and inserts the data into the events table.addEventCode2.PNG

addEventCode3.PNG

addEventCode4.PNG

Tasks left to complete: Mark O Shea

Following on from our group meeting on Wednesday the 14 of February, we have compiled a list of tasks needed to be completed to finish the website and the app, and who plans to do each task.

Things left to complete for the Clubs and Societies project

Nauris Eidulis

Write to database

  • Add an event
  • Add a student

Add a drop down menu to enable user to have the option to add an event, if the user is the club chairperson (users email must match the clubs chairpersons email)

============================================================================

Mark O Shea

Implement calendar

  • Fix calendar (crashes when date selected)
  • Populate with events from the events table

============================================================================

Arron Robinson

Website

  • Display the club members for each club when selected
  • Fix CSS when in mobile view

Work on the project report

============================================================================

Ahmed Habib

Enable user to subscription to a club

Fix search button (currently you cant see what you are inputting)

==================================================================================

Other work to complete on the app

  • Only populate calendar with events related to clubs the user has subscribed to
  • Tab to show user information
  • Style pages
  • Add a footer
  • Add a settings tab to allow user to change background colour
  • Logout button
  • Contact page to be finished

Menu Update – 15/02/2018 – Nauris Eidulis

After group meeting with supervisor, we planned out a more detailed list of tasks to be completed. I began to work more on the event page functionality. The first step I took was to remove the large button at the top of the event screen and replace it a sleeker drop down menu.Screenshot_2018-02-14-15-16-07.png

To test that it functional I tried subscribing to notifications which would allow me to receive news from the app and displays a confirmation message upon clicking it.

Screenshot_2018-02-14-15-16-40.png

Searching for a wait to implement a drop down menu I ran across a simple implementation in the Xamarin documentation. It involved creating a Spinner widget that allows to implement a drop down list for selecting items.

 

spinnerMenu.PNG

First method call uses an if statement to check which option has been selected. This will later implement a switch in order to clean up the code.

spinnerMethods.PNG

The second method “SubscribeToEvent()” subscribes to firebase notifications and displays a message confirming the subscription.