Fixede EndActivity.java
This commit is contained in:
parent
804d577d72
commit
f545996945
@ -1,5 +1,6 @@
|
|||||||
package com.example.scoutingapp;
|
package com.example.scoutingapp;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -42,16 +43,12 @@ public class EndActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
Submit submit = new Submit();
|
Submit submit = new Submit();
|
||||||
//Writes test Data to the String getTeamNumber
|
|
||||||
//submit.getTeamNumberTest();
|
|
||||||
//Makes the CSV file
|
|
||||||
//submit.CSVmake(EndActivity.this);
|
|
||||||
//Writes data to file to make google sheet read it as a list
|
//Writes data to file to make google sheet read it as a list
|
||||||
File csvFile = new File(getExternalFilesDir(null), "match_data.csv");
|
File csvFile = new File(getFilesDir(), "match_data.csv");
|
||||||
List<List<Object>> data = submit.parseCSVToList(csvFile);
|
List<List<Object>> data = submit.parseCSVToList(csvFile);
|
||||||
submit.parseCSVToList(csvFile);
|
submit.parseCSVToList(csvFile);
|
||||||
//Uploads the Data to the Google sheet
|
//Uploads the Data to the Google sheet
|
||||||
//submit.uploadCSV(EndActivity.this);
|
submit.uploadSheets(EndActivity.this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -68,4 +65,7 @@ public class EndActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ public class Submit {
|
|||||||
//adds account info
|
//adds account info
|
||||||
InputStream serviceAccountStream = context.getResources().openRawResource(R.raw.info);
|
InputStream serviceAccountStream = context.getResources().openRawResource(R.raw.info);
|
||||||
ServiceAccountCredentials credentials = ServiceAccountCredentials.fromStream(serviceAccountStream);
|
ServiceAccountCredentials credentials = ServiceAccountCredentials.fromStream(serviceAccountStream);
|
||||||
//Srts up the google sheet API and json factury for use later
|
//Sets up the google sheet API and json factory for use later
|
||||||
Sheets sheetsService = new Sheets.Builder(
|
Sheets sheetsService = new Sheets.Builder(
|
||||||
GoogleNetHttpTransport.newTrustedTransport(),
|
GoogleNetHttpTransport.newTrustedTransport(),
|
||||||
GsonFactory.getDefaultInstance(),
|
GsonFactory.getDefaultInstance(),
|
||||||
|
Loading…
Reference in New Issue
Block a user