Skip to content

Commit 00882ea

Browse files
committed
Initial commit
0 parents  commit 00882ea

File tree

68 files changed

+2538
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2538
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
*.aab
5+
6+
# Files for the ART/Dalvik VM
7+
*.dex
8+
9+
# Java class files
10+
*.class
11+
12+
# Generated files
13+
bin/
14+
gen/
15+
out/
16+
17+
# Gradle files
18+
.gradle/
19+
build/
20+
21+
# Local configuration file (sdk path, etc)
22+
local.properties
23+
24+
# Proguard folder generated by Eclipse
25+
proguard/
26+
27+
# Log Files
28+
*.log
29+
30+
# Android Studio Navigation editor temp files
31+
.navigation/
32+
33+
# Android Studio captures folder
34+
captures/
35+
36+
# IntelliJ
37+
*.iml
38+
.idea/workspace.xml
39+
.idea/tasks.xml
40+
.idea/gradle.xml
41+
.idea/assetWizardSettings.xml
42+
.idea/dictionaries
43+
.idea/libraries
44+
.idea/caches
45+
46+
# Keystore files
47+
# Uncomment the following lines if you do not want to check your keystore files in.
48+
#*.jks
49+
#*.keystore
50+
51+
# External native build folder generated in Android Studio 2.2 and later
52+
.externalNativeBuild
53+
54+
# Google Services (e.g. APIs or Firebase)
55+
google-services.json
56+
57+
# Freeline
58+
freeline.py
59+
freeline/
60+
freeline_project_description.json
61+
62+
# fastlane
63+
fastlane/report.xml
64+
fastlane/Preview.html
65+
fastlane/screenshots
66+
fastlane/test_output
67+
fastlane/readme.md

.idea/codeStyles/Project.xml

+29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Sanjit
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileOptions {
5+
sourceCompatibility JavaVersion.VERSION_1_8
6+
targetCompatibility JavaVersion.VERSION_1_8
7+
}
8+
compileSdkVersion 28
9+
defaultConfig {
10+
applicationId "io.github.sanjit1.frcscouter"
11+
minSdkVersion 21
12+
targetSdkVersion 28
13+
versionCode 1
14+
versionName "1.0"
15+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16+
}
17+
buildTypes {
18+
release {
19+
minifyEnabled false
20+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
21+
}
22+
}
23+
}
24+
25+
dependencies {
26+
implementation 'com.github.clans:fab:1.6.4'
27+
implementation fileTree(include: ['*.jar'], dir: 'libs')
28+
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
29+
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
30+
implementation 'com.android.support:design:28.0.0-rc02'
31+
testImplementation 'junit:junit:4.12'
32+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
33+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
34+
implementation 'com.android.support:cardview-v7:28.0.0-rc02'
35+
implementation files('libs/poi-4.0.1.jar')
36+
implementation files('libs/poi-ooxml-4.0.1.jar')
37+
implementation files('libs/poi-ooxml-schemas-4.0.1.jar')
38+
implementation files('libs/poi-scratchpad-4.0.1.jar')
39+
}

app/libs/poi-4.0.1.jar

2.59 MB
Binary file not shown.

app/libs/poi-ooxml-4.0.1.jar

1.68 MB
Binary file not shown.

app/libs/poi-ooxml-schemas-4.0.1.jar

7.41 MB
Binary file not shown.

app/libs/poi-scratchpad-4.0.1.jar

1.32 MB
Binary file not shown.

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package io.github.sanjit1.frcscouter;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumented test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("io.github.sanjit1.frcscouter", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="io.github.sanjit1.frcscouter">
4+
5+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
6+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
7+
8+
<application
9+
android:allowBackup="true"
10+
android:icon="@mipmap/ic_launcher"
11+
android:label="@string/app_name"
12+
android:roundIcon="@mipmap/ic_launcher_round"
13+
android:supportsRtl="true"
14+
android:theme="@style/AppTheme">
15+
<activity
16+
android:name=".viewActivity"
17+
android:label="@string/title_activity_view"
18+
android:theme="@style/AppTheme.NoActionBar"></activity>
19+
<activity
20+
android:name=".addTemplates"
21+
android:label="@string/title_activity_add_templates"
22+
android:theme="@style/AppTheme.NoActionBar" />
23+
<activity
24+
android:name=".templates"
25+
android:label="@string/title_activity_templates"
26+
android:theme="@style/AppTheme.NoActionBar" />
27+
<activity
28+
android:name=".MainActivity"
29+
android:label="@string/app_name"
30+
android:theme="@style/AppTheme.NoActionBar">
31+
<intent-filter>
32+
<action android:name="android.intent.action.MAIN" />
33+
34+
<category android:name="android.intent.category.LAUNCHER" />
35+
</intent-filter>
36+
</activity>
37+
</application>
38+
39+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
package io.github.sanjit1.frcscouter;
2+
3+
import android.Manifest;
4+
import android.content.Intent;
5+
import android.content.pm.PackageManager;
6+
import android.os.Bundle;
7+
import android.os.Environment;
8+
import android.support.v4.app.ActivityCompat;
9+
import android.support.v4.content.ContextCompat;
10+
import android.support.v7.app.AppCompatActivity;
11+
import android.support.v7.widget.Toolbar;
12+
import android.util.Log;
13+
import android.view.View;
14+
15+
import java.io.File;
16+
import java.io.FileWriter;
17+
import java.io.IOException;
18+
19+
public class MainActivity extends AppCompatActivity {
20+
21+
@Override
22+
protected void onCreate(Bundle savedInstanceState) {
23+
super.onCreate(savedInstanceState);
24+
setContentView(R.layout.activity_main);
25+
Toolbar toolbar = findViewById(R.id.toolbar);
26+
setSupportActionBar(toolbar);
27+
// request permission, for internet access, read and write storage if it has not been already given
28+
if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED)
29+
ActivityCompat.requestPermissions(this, new String[]{
30+
Manifest.permission.READ_EXTERNAL_STORAGE
31+
}, 1);
32+
33+
34+
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED)
35+
ActivityCompat.requestPermissions(this, new String[]{
36+
Manifest.permission.WRITE_EXTERNAL_STORAGE
37+
}, 1);
38+
39+
File scout = new File((Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)) + "/ScouterAppData");
40+
createDir(scout);
41+
scout = new File((Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)) + "/ScouterAppData/ActivityData");
42+
createDir(scout);
43+
44+
}
45+
46+
47+
public void onClick(View button){
48+
if (button==findViewById(R.id.templates)){
49+
Intent myIntent = new Intent(MainActivity.this,
50+
templates.class);
51+
startActivity(myIntent);
52+
}
53+
}
54+
55+
public void createDir(File scout){
56+
if (!scout.exists() && !scout.isDirectory()) {
57+
// create empty directory
58+
if (scout.mkdirs()) {
59+
Log.i("CreateDir", "App dir created");
60+
}
61+
} else {
62+
Log.i("CreateDir", "App dir already exists");
63+
}
64+
}
65+
66+
67+
68+
}

0 commit comments

Comments
 (0)