make no crashout
This commit is contained in:
commit
56a8d17403
@ -1,14 +1,12 @@
|
||||
package com.example.scoutingapp;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import org.json.JSONException;
|
||||
|
||||
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
@ -61,13 +59,12 @@ public class EndActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
Button Delete = (Button) findViewById(R.id.deleteButton);
|
||||
Delete.setOnClickListener(new View.OnClickListener() {
|
||||
Button Sheet = (Button) findViewById(R.id.Sheet);
|
||||
Sheet.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
public void onClick(View view) {
|
||||
Submit submit = new Submit();
|
||||
//Deletes the CSV file (Currently for testing but feature might stay but with some features to make it harder to do it on accident)
|
||||
submit.deleteCSVFile(EndActivity.this);
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://docs.google.com/spreadsheets/d/1ky5LBTpnEeBEEaaF7z6UWdh-E7YmOSeij4dYdR2PU4A/edit?gid=0#gid=0"));
|
||||
startActivity(browserIntent);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -58,6 +58,7 @@ public class Submit {
|
||||
.execute();
|
||||
|
||||
Log.d("GoogleSheets", "Data uploaded to Google Sheets successfully.");
|
||||
deleteCSVFile(context);
|
||||
} catch (Exception e) {
|
||||
Log.d("GoogleSheets", "Error uploading data", e);
|
||||
renameFile(context, csvFileString);
|
||||
|
@ -18,10 +18,10 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/deleteButton"
|
||||
android:id="@+id/Sheet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Delete old data"
|
||||
android:text="The Google Sheet"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
Loading…
Reference in New Issue
Block a user