content: package net.alexbarry.alexgames;
  
  import android.app.NotificationChannel;
  import android.app.NotificationManager;
  import android.content.Context;
  import android.content.Intent;
  import android.os.Build;
  import android.os.Bundle;
  
  import com.google.android.material.floatingactionbutton.FloatingActionButton;
  import com.google.android.material.snackbar.Snackbar;
  
  import androidx.appcompat.app.AppCompatActivity;
  import androidx.appcompat.widget.Toolbar;
  import androidx.lifecycle.ViewModelProvider;
  
  import android.util.Log;
  import android.view.View;
  import android.view.Menu;
  import android.view.MenuItem;
  
  import net.alexbarry.alexgames.server.GameServerService;
  
  public class MainActivity extends AppCompatActivity {
  
      private static final String TAG = "MainActivity";
      private AlexGamesViewModel viewModel;
      private GameServerService gameServerService;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          Toolbar toolbar = findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
          // TODO need to make this actually send "back" to the navigation controller / back stack
          // TODO only show this when the navigation stack has entries
          getSupportActionBar().setDisplayHomeAsUpEnabled(true);
          //getActionBar().setDisplayHomeAsUpEnabled(true);
  
  
          this.viewModel = new ViewModelProvider(this).get(AlexGamesViewModel.class);
  
          if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
              NotificationChannel channel = new NotificationChannel(AlexConstants.HOST_SERVER_SERVICE_NOTIFICATION_CHANNEL_ID,
                      getString(R.string.service_notification_channel_name),
                      NotificationManager.IMPORTANCE_MIN);
              NotificationManager notificationManager = getSystemService(NotificationManager.class);
              notificationManager.createNotificationChannel(channel);
          }
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.menu_main, menu);
          return true;
      }
  
      @Override
      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 == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  }
  