Blog Moving

Blog is moving from WordPress to GitHub pages.

Link :



Apologies for the inconvenience caused.



Bachelor’s project demo

So after completing my diploma, and it becoming redundant in the working industry. I had to set my eyes on a Bachelor’s degree.
Trust me it was not easy, in the sense of being a part-time student, full-time employee, a father, a fiance and being stuck on some island for 15 months then when you come back you’re residing in Cape Town and the university in Pretoria.
I think I can write a book with my life’s story.

Long story short, I managed to complete my degree within 3.5 years instead of 2 – which was a bonus, And now I have set my eyes on a Master’s degree just to challenge myself one thing for sure, one doesn’t need to be stagnant in life.
I believe in continuous improvement of oneself.

Let me stop yapping and show you a demo of my Bachelor’s project

If you like give thumbs up.

Android WebView App (to Apache server)


Just successfully created my first Android App.

So I have been playing around recently with modifications, improvements and configurations on my current project – “Smart Home using Raspberry Pi & Android with Voice Recognition.”

I have been thinking of implementing a simple Android application which directly opens up URL, rather than going to my browser each and every time I need to access the web control server(Apache2).

So one might be wondering what is exactly this WebView ‘nonsense’ a simple Google search gave me this definition, A “webview” is a browser bundled inside of a mobile application producing what is called a hybrid app. Using a webview allows mobile apps to be built using Web technologies (HTML, JavaScript, CSS, etc.) but still package it as a native app and put it in the app store.

Now coming back to the App, i’m using the latest Android Studio, source code below.


//__author__ = "Mpho Mphego"
//__description__ = "Android WebView App controlling Raspberry Pi running Apache2"
//__version__ = "Revision: 1.0 "
//__date__ = "Date: 2015/01/17 22:23 "
//__url__ = ""
//__copyright__ = "Copyright (c) 2015 Mpho Mphego"
//__license__ = "Java"

package com.wordpress.mpho112.mobilehomectrl;

import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebSettings;
import android.webkit.WebView;

public class MainActivity extends ActionBarActivity {
    private WebView mWebView;

    protected void onCreate(Bundle savedInstanceState) {
        mWebView = (WebView) findViewById(;
        // Enable Javascript
        WebSettings webSettings = mWebView.getSettings();

    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(, menu);
        return true;

    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == {
            return true;

        return super.onOptionsItemSelected(item);


<FrameLayout xmlns:android=""

        android:layout_height="match_parent" />