how to change the name of the app in android studio code example

Example 1: how to change the title of the console in c#

///Set console Title
Console.Title = "Insert Console title";

Example 2: check which activity in focus in android

public class MyApplication extends Application {

  public static boolean isActivityVisible() {
    return activityVisible;
  }  

  public static void activityResumed() {
    activityVisible = true;
  }

  public static void activityPaused() {
    activityVisible = false;
  }

  private static boolean activityVisible;
}