Earlier this year, I embarked on making much needed improvements and addition of new features to my 4th year project. After obtaining approval from University, I resolved to rename my project to Koeks.NET – Koeks, because that is my online nickname, and .NET because I am building a social networking system for Android devices. This post briefly touches on enhancements added to the project thus far. It is also important to note that I have written all my code from scratch – I am not reusing any code from my BTech IT (Software Development) project. I do have plans of publishing this project towards the end of 2019. 

Managing Files using Google Cloud Storage

This is probably the most exciting addition to my project. Last year, all files uploaded by users were stored on the VPS server hosting my Web API and database. This year, I have resolved to store all user files on the cloud, using Google’s Cloud Storage API. All files are stored as objects in buckets. Prior to storing the file on my Google Cloud Storage Bucket, an image gallery must be created on the database server, together with an image gallery item record, which stores a reference to the file on Google Cloud Storage. This record also contains additional information about the file such as the size, type, and any tags. 

Retrieving an image from a google cloud storage bucket is simple – to do this, you create a signed URL which has a set expiration time. My signed URL’s are to remain valid for 2 hours. Loading images into ImageView controls are simple, through using an Android Library called Glide

A Google Cloud Storage bucket containing some image files uploaded from the Android app

To generate the signed URL, the server needs to provide details about the object (this is stored in the database), as well as expiration details and server credentials. If everything is valid, a signed URL is generated and returned to the Android App. Only then can an image be retrieved and loaded into ImageView controls.  

The underlined link indicated the signed URL link for an image. This is generated on the Web API after everything checks out

Image Labeling

Where would we be if API’s did not exist? When user’s create new houses (their own social circles), they need to provide basic details to their house, together with a house display picture and some image tags. To provide some level of intelligence to my mobile application, I resolved to using Google’s Cloud Vision API which uses powerful machine learning models in returning labels for an image sent for processing. The logic I used here was to first compress the image on the client side (android app), then send this image to my Web API which then sends the image to Google’s Cloud Vision API using my server credentials (this is a json file, obtainable from Google’s Cloud Platform Console). Communicating to Google’s Cloud Services are a breeze, thanks to their .NET Client Libraries. Users can add tags to their house, or use the ones returned from Google Cloud Vision analysis. 

 

Voice Guided Help, using Google’s Text-To-Speech API

I figured it would be nice to get voice-guided help for users trying to create houses on Android tablets. After digging a bit on the web, I found this is possible, using Google’s Text-To-Speech API. Again, this was easy to implement thanks to Google’s .NET client libraries. The process is similar to image tagging – I send text to my Web API which sends this data to Google’s Text To Speech API for synthesizing (after server credentials are validated). I then store the result (mp3 file) on the server, return it to the mobile phone, and delete the mp3 file from the server. Implementing a media player on Android was simple, thanks to Google’s EXO Player library. I do have plans of using this player when I get to creating my news feed. 

 

Enhanced House Manager on Tablet

The goal here is to build an Android App that looks and feels great for mobile and tablet users. I have started work on building a House Manager, which is a sub-system that allows house administrators to control various aspects to their house. They can add or remove house members/admins, modify details to their house, and view advanced high-level reports of their house. When a house administrator wishes to view details about house(s) they manage, they are shown a menu, together with basic statistics to the selected house they manage. 

 

Enhanced Help and Support Functionality

To make my Help and Support Functionality as lively as possible, I make use Firebase Cloud Messaging to push updates to any help topic a user might be viewing on their phone. When a user provides their rating for a specific help item, this data is saved to the database and updated on user’s mobile devices only if they are currently viewing help and support. A user’s Firebase token is saved to Koeks.NET database and updated each time a user logs into their account (to ensure their token stays up to date). The video below illustrates how ratings are updated live as a user from another mobile device provides their rating. 

 

Enhanced About Application

This is just a little extra I thought I should throw in. When users want to view details about the application, they can view the approval letter from the university, together with social media links and credits. Nothing to much to write about this part of the application (it is self explanatory).

 

ReCaptcha – Preventing Spam Logins

Another extra I thought would be worth implementing. Adding ReCaptcha is easy if you follow documentation provided by Google. My logic here is, for every 6 failed requests, ReCaptcha should kick in, to verify whether the user is real or is a robot (I am not even sure if you can get robots on Android devices – I know with web, spam bots are all over the show). I use my Realm database to keep track of the number of failed attempts. After a user succeeds in logging in, this count is reset to zero. 

 

This is just the start of a great project. It is a little hard balancing my studies, that fragment of a social life, caffeine addiction and providing help to other students at the computer labs. I have a lot more planned for this project. I still remain confident this project will see its completion towards the end of 2019. At the end of the day, talk is cheap. What does the real talking are your actions.