diff --git a/README.md b/README.md index fab4661..80f8869 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ This app is for scouting for the FRC team 2648, this APK is like a exe for windows, it is a installer #how to install from phone -You will go to the releases section on github, there are 4 options, releases, debug, and 2 to download the source code, as a user you would want the release option, tap on it and it will download, from there you can go to the files app on your phone, the downloads folder should be on the homepage of the app, tap on that then you should see older downloads and app-release.apk, tap on that and press install (Or update if already installed) you might have to enable a permission for the file app to install apps on your phone but it talks you threw that part, then it is now on your phone like youtube or any other app +You will go to the releases section on github, there are 3 options, releases, and 2 to download the source code, as a user you would want the release option, tap on it and it will download, from there you can go to the files app on your phone, the downloads folder should be on the homepage of the app, tap on that then you should see older downloads and app-release.apk, tap on that and press install (Or update if already installed) you might have to enable a permission for the file app to install apps on your phone but it talks you threw that part, then it is now on your phone like youtube or any other app #how to install from windows, MacOS, Linux You will go to the releases section on github, there are 4 options, releases, debug, and 2 to download the source code, as a user you would want the release option, Click on it and it will download plug in a data USB cable into your phones charger port and on the other end into your computer USB port, open File explorer, finder, or the file manger of your own choosing, on the side there should be pinned folders but at the bottom if on windows and in the middle on mac there should be devices, if the phone is not recognized make sure its unlocked and if it still doesn't show up there should be a notification about being plugged into a computer, tap on that and there should be some options, tap on file transfer, after that then windows explorer/finder will see it, click on it, you will see the phones internal storage, click on that, then you will see folders, DON'T DELETE THEM THEY ARE THERE FOR A REASON, click on downloads, open a new window of explorer/finder, go to your computers downloads folder and click and drag the app-release.apk into the other window from there you can go to the files app on your phone, the downloads folder should be on the homepage of the app, tap on that then you should see older downloads and app-release.apk, tap on that and press install (Or update if already installed) you might have to enable a permission for the file app to install apps on your phone but it talks you threw that part, then it is now on your phone like youtube or any other app diff --git a/ScoutingApp/app/src/main/java/com/example/scoutingapp/MainActivity.java b/ScoutingApp/app/src/main/java/com/example/scoutingapp/MainActivity.java index 0e90e71..1740f56 100644 --- a/ScoutingApp/app/src/main/java/com/example/scoutingapp/MainActivity.java +++ b/ScoutingApp/app/src/main/java/com/example/scoutingapp/MainActivity.java @@ -38,7 +38,6 @@ public class MainActivity extends AppCompatActivity { private String Match_numberString; private String EventString; private String TeamString; - private String startingPostionString; public static final String Postion_key = "POSTIONKEY"; public static final String Event_Key = "EVENTCONFIRM"; public static final String Match_key = "MATCHCONFIRM"; @@ -70,8 +69,7 @@ public class MainActivity extends AppCompatActivity { TeamString = Team.getText().toString(); if ((Match_numberString == null || Match_numberString.isEmpty()) || (EventString == null || EventString.isEmpty()) || - (TeamString == null || TeamString.isEmpty()) || - (startingPostionString == null || startingPostionString.isEmpty())){ + (TeamString == null || TeamString.isEmpty())){ Toast.makeText(getApplicationContext(), "Fill in EVERYTHING", Toast.LENGTH_SHORT).show(); }else { makeIntent(); @@ -88,41 +86,6 @@ public class MainActivity extends AppCompatActivity { } }); - RadioButton Rbutton1 = findViewById(R.id.Rbutton1); - Rbutton1.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - startingPostionString = "1"; - } - }); - RadioButton Rbutton2 = findViewById(R.id.Rbutton2); - Rbutton2.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - startingPostionString = "2"; - } - }); - RadioButton Rbutton3 = findViewById(R.id.Rbutton3); - Rbutton3.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - startingPostionString = "3"; - } - }); - RadioButton Rbutton4 = findViewById(R.id.Rbutton4); - Rbutton4.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - startingPostionString = "4"; - } - }); - RadioButton Rbutton5 = findViewById(R.id.Rbutton5); - Rbutton5.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - startingPostionString = "5"; - } - }); TextView TBAView = (TextView)findViewById(R.id.TBATest); @@ -206,11 +169,10 @@ public class MainActivity extends AppCompatActivity { private void makeIntent() { - Intent intent = new Intent(this, AutoActivity.class); + Intent intent = new Intent(this, startingActivity.class); intent.putExtra(Event_Key, EventString); intent.putExtra(Match_key, Match_numberString); intent.putExtra(Team_key, TeamString); - intent.putExtra(Postion_key, startingPostionString); startActivity(intent); } } \ No newline at end of file diff --git a/ScoutingApp/app/src/main/java/com/example/scoutingapp/startingActivity.java b/ScoutingApp/app/src/main/java/com/example/scoutingapp/startingActivity.java new file mode 100644 index 0000000..ad950a6 --- /dev/null +++ b/ScoutingApp/app/src/main/java/com/example/scoutingapp/startingActivity.java @@ -0,0 +1,95 @@ +package com.example.scoutingapp; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.RadioButton; +import android.widget.Toast; + +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +public class startingActivity extends AppCompatActivity { + private String eventString, matchString, TeamString, startingPostionString; + public static final String Event_Key = "EVENTCONFIRM"; + public static final String Match_key = "MATCHCONFIRM"; + public static final String Team_key = "TEAMCONFIRM"; + public static final String Postion_key = "POSTIONKEY"; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + EdgeToEdge.enable(this); + setContentView(R.layout.activity_starting); + ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> { + Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); + v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); + return insets; + }); + Intent intentinput = getIntent(); + eventString = intentinput.getStringExtra(MainActivity.Event_Key); + matchString = intentinput.getStringExtra(MainActivity.Match_key); + TeamString = intentinput.getStringExtra(MainActivity.Team_key); + + Button nextButton = (Button) findViewById(R.id.nextButton); + nextButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + if ((startingPostionString == null || startingPostionString.isEmpty())){ + Toast.makeText(getApplicationContext(), "Press a button", Toast.LENGTH_SHORT).show(); + }else { + makeIntent(); + } + } + }); + + RadioButton Rbutton1 = findViewById(R.id.Rbutton1); + Rbutton1.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startingPostionString = "1"; + } + }); + RadioButton Rbutton2 = findViewById(R.id.Rbutton2); + Rbutton2.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startingPostionString = "2"; + } + }); + RadioButton Rbutton3 = findViewById(R.id.Rbutton3); + Rbutton3.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startingPostionString = "3"; + } + }); + RadioButton Rbutton4 = findViewById(R.id.Rbutton4); + Rbutton4.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startingPostionString = "4"; + } + }); + RadioButton Rbutton5 = findViewById(R.id.Rbutton5); + Rbutton5.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startingPostionString = "5"; + } + }); + + } + private void makeIntent() + { + Intent intent = new Intent(this, AutoActivity.class); + intent.putExtra(Event_Key, eventString); + intent.putExtra(Match_key, matchString); + intent.putExtra(Team_key, TeamString); + intent.putExtra(Postion_key, startingPostionString); + startActivity(intent); + } +} \ No newline at end of file diff --git a/ScoutingApp/app/src/main/res/activity_main.xml b/ScoutingApp/app/src/main/res/activity_main.xml new file mode 100644 index 0000000..1f34323 --- /dev/null +++ b/ScoutingApp/app/src/main/res/activity_main.xml @@ -0,0 +1,120 @@ + + + + + +