Made a way to open google sheet and fixed the upload
This commit is contained in:
parent
62a97001ac
commit
f3297756eb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user