@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    activity = this;
    context = this;

    setContentView(R.layout.main);

    UpdateGui.run();

    startService(new Intent(this, RunServer.class));

    /*
        int icon = R.drawable.ic_launcher;
        long when = System.currentTimeMillis ();
        notificationId = System.currentTimeMillis ();
        String appname = context.getResources().getString(R.string.app_name);
        NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
        Intent intent = new Intent(context, MainActivity.class);
        PendingIntent contentIntent = PendingIntent.getActivity (context, 0, intent, 0);
        String message = "Bibledit service running";
        Notification notification = new Notification(icon, message, when);
        notification.setLatestEventInfo (context, appname, message, contentIntent);
        notification.flags = Notification.FLAG_FOREGROUND_SERVICE;
        notificationManager.notify((int) notificationId, notification);
    */
  }
  @Override
  protected void onStart() {
    super.onStart();

    UpdateGui.run();
  }
  @Override
  public void onResume() {
    super.onResume();

    UpdateGui.run();
  }