Q:

Firebase realtime Database

I have a Question I'm new in android app development.
Here is my MainActivity.java
package com.koridevbrowser.app;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;

public class MainActivity extends AppCompatActivity  implement ValueEventListener{

private TextView mText;
private WebView mWebView;
ProgressBar progressBar;
private Toolbar toolbar;

private DatabaseReference database = FirebaseDatabase.getInstance().getReference();
private DatabaseReference mconf = database.child("version");

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    toolbar = (Toolbar) findViewById(R.id.app_bar);
    setSupportActionBar(toolbar);

    mText = (TextView) findViewById(R.id.About);

    mWebView = (WebView) findViewById(R.id.activity_main_webview);

    progressBar = (ProgressBar) findViewById(R.id.progressBar1);

    String userAgent = mWebView.getSettings().getUserAgentString();
    mWebView.getSettings().setUserAgentString(userAgent);
    WebSettings webSettings = mWebView.getSettings();
    webSettings.setJavaScriptEnabled(true);
    mWebView.loadUrl("http://www.kori-developer.com");
    mWebView.setWebChromeClient(new WebChromeClient());
    mWebView.setWebViewClient(new HelloWebViewClient());

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.menu_main, menu);
    return super.onCreateOptionsMenu(menu);
}

@Override
public boolean onOptionsItemSelected(final MenuItem item) {
    switch (item.getItemId()) {
        case R.id.home:
            mWebView.loadUrl("http://kori-developer.com/");
            return true;
        case R.id.KoriFiles:
            mWebView.loadUrl("http://kori-developer.com/forum/11-koridev-releases/");
            return true;
        case R.id.KoriRules:
            mWebView.loadUrl("http://kori-developer.com/forum/26-foren-regeln/");
            return true;
        case R.id.KoriDonate:
            mWebView.loadUrl("http://kori-developer.com/store/");
            return true;
        case R.id.KoriContact:
            mWebView.loadUrl("http://kori-developer.com/contact/");
            return true;
        case R.id.KoriAbout:
            Toast.makeText(MainActivity.this, "Version: 0.3b", Toast.LENGTH_LONG).show();

            return true;
        default:
            return super.onOptionsItemSelected(item);

    }
}

@Override
public void onDataChange(DataSnapshot dataSnapshot) {
    if (dataSnapshot.getValue(String.class) !=null) {
        String value = dataSnapshot.getKey();
        if(value.equals("version")) {
            String text = dataSnapshot.getValue(String.class);
            mText.setText(text);
        }
    }

}

@Override
public void onCancelled(DatabaseError databaseError) {

}

private class HelloWebViewClient extends WebViewClient{

    @Override
    public void onPageStarted(WebView view, String url, Bitmap favicon) {
        // TODO Auto-generated method stub
        super.onPageStarted(view, url, favicon);
    }

    @Override
    public boolean shouldOverrideUrlLoading(WebView webView, String url)
    {
        webView.loadUrl(url);
        return true;
    }

    @Override
    public void onPageFinished(WebView view, String url) {
        // TODO Auto-generated method stub
        super.onPageFinished(view, url);

        progressBar.setVisibility(view.GONE);
    }

}

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) { //if back key is pressed
    if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
        mWebView.goBack();
        return true;

    }

    return super.onKeyDown(keyCode, event);

}

public void onBackPressed() {
    AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
            MainActivity.this);

    // set title
    alertDialogBuilder.setTitle("Exit");

    // set dialog message
    alertDialogBuilder
            .setMessage("Do you really want to exit KoriDev?")
            .setCancelable(false)
            .setPositiveButton("Yes",new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog,int id) {
                    // if this button is clicked, close
                    // current activity
                    MainActivity.this.finish();
                }
            })
            .setNegativeButton("No",new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog,int id) {
                    // if this button is clicked, just close
                    // the dialog box and do nothing
                    dialog.cancel();
                }
            });

    // create alert dialog
    AlertDialog alertDialog = alertDialogBuilder.create();

    // show it
    alertDialog.show();

}

}
I will try to read the version from the realtime database here:
case R.id.KoriAbout:
            Toast.makeText(MainActivity.this, "Version: 0.3b", Toast.LENGTH_LONG).show();

But I don't know how to setup this with the Realtime Database from Firebase.
A picture from my database :

A:

its real time by default...I believe. if you change it in firebase, it'll change it on your app. but, for what you have, you have it hard coded into your toast. 
You need to do something like this:
FirebaseDatabase database = FirebaseDatabase.getInstance();
DatabaseReference myRef = database.getReference("version");

// Read from the database
myRef.addValueEventListener(new ValueEventListener() {
    @Override
    public void onDataChange(DataSnapshot dataSnapshot) {
        // This method is called once with the initial value and again
        // whenever data at this location is updated.
        String value = dataSnapshot.getValue(String.class);
        Log.d(TAG, "Value is: " + value);
    }

    @Override
    public void onCancelled(DatabaseError error) {
        // Failed to read value
        Log.w(TAG, "Failed to read value.", error.toException());
    }
});

Checkout their doc here:
https://firebase.google.com/docs/database/android/start/

