diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fd45b12
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches/build_file_checksums.ser
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml
new file mode 100644
index 0000000..bf74c20
--- /dev/null
+++ b/.idea/assetWizardSettings.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..7ac24c7
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..e0d5b93
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Procfile b/Procfile
deleted file mode 100644
index 9df3bff..0000000
--- a/Procfile
+++ /dev/null
@@ -1,3 +0,0 @@
-web: gunicorn cat_or_not
-heroku ps:scale web=1
-export GOOGLE_APPLICATION_CREDENTIALS="authentication.json"
diff --git a/README.md b/README.md
index dbce2c3..feacf6d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# Cat or Not - artifact repository
-# First prototype
+# Version 0.9 (UI not completed)
### Monday 15:30 group
## How to use this repository?
@@ -14,5 +14,5 @@ Application prototype is located in the **app** branch.
## Version Control Document
It is located in a [repository's wiki](https://git.wmi.amu.edu.pl/s434650/CatOrNot/wiki/Version+History+Document). It will be updated with each accepted artifact.
-## Heroku application
-https://lit-wildwood-10245.herokuapp.com/
+## APK for System Administrator
+APK is located in path /app/release/app-release.apk
diff --git a/Software-Requirements-Specification.docx b/Software-Requirements-Specification.docx
deleted file mode 100644
index 9cb3dda..0000000
Binary files a/Software-Requirements-Specification.docx and /dev/null differ
diff --git a/Test Plan(1).pdf b/Test Plan(1).pdf
deleted file mode 100644
index 60311e2..0000000
Binary files a/Test Plan(1).pdf and /dev/null differ
diff --git a/__pycache__/cat_or_not.cpython-36.pyc b/__pycache__/cat_or_not.cpython-36.pyc
deleted file mode 100644
index 63f3e4d..0000000
Binary files a/__pycache__/cat_or_not.cpython-36.pyc and /dev/null differ
diff --git a/__pycache__/cat_recognition.cpython-36.pyc b/__pycache__/cat_recognition.cpython-36.pyc
deleted file mode 100644
index 5f0382d..0000000
Binary files a/__pycache__/cat_recognition.cpython-36.pyc and /dev/null differ
diff --git a/__pycache__/config.cpython-36.pyc b/__pycache__/config.cpython-36.pyc
deleted file mode 100644
index 442ed48..0000000
Binary files a/__pycache__/config.cpython-36.pyc and /dev/null differ
diff --git a/__pycache__/forms.cpython-36.pyc b/__pycache__/forms.cpython-36.pyc
deleted file mode 100644
index 18070b2..0000000
Binary files a/__pycache__/forms.cpython-36.pyc and /dev/null differ
diff --git a/__pycache__/hello.cpython-36.pyc b/__pycache__/hello.cpython-36.pyc
deleted file mode 100644
index 47f8c9f..0000000
Binary files a/__pycache__/hello.cpython-36.pyc and /dev/null differ
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/app/__init__.py b/app/__init__.py
deleted file mode 100644
index f5b34f4..0000000
--- a/app/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from flask import Flask
-from config import Config
-
-app = Flask(__name__)
-app.config.from_object(Config)
-
-from app import routes
diff --git a/app/__pycache__/__init__.cpython-36.pyc b/app/__pycache__/__init__.cpython-36.pyc
deleted file mode 100644
index 10c727a..0000000
Binary files a/app/__pycache__/__init__.cpython-36.pyc and /dev/null differ
diff --git a/app/__pycache__/cat_recognition.cpython-36.pyc b/app/__pycache__/cat_recognition.cpython-36.pyc
deleted file mode 100644
index 9289b2a..0000000
Binary files a/app/__pycache__/cat_recognition.cpython-36.pyc and /dev/null differ
diff --git a/app/__pycache__/forms.cpython-36.pyc b/app/__pycache__/forms.cpython-36.pyc
deleted file mode 100644
index 8e14a92..0000000
Binary files a/app/__pycache__/forms.cpython-36.pyc and /dev/null differ
diff --git a/app/__pycache__/picture_downloader.cpython-36.pyc b/app/__pycache__/picture_downloader.cpython-36.pyc
deleted file mode 100644
index 1fd1e52..0000000
Binary files a/app/__pycache__/picture_downloader.cpython-36.pyc and /dev/null differ
diff --git a/app/__pycache__/routes.cpython-36.pyc b/app/__pycache__/routes.cpython-36.pyc
deleted file mode 100644
index 32d5883..0000000
Binary files a/app/__pycache__/routes.cpython-36.pyc and /dev/null differ
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 0000000..9701fa0
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,28 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 28
+ defaultConfig {
+ applicationId "com.example.se.catornot"
+ minSdkVersion 15
+ targetSdkVersion 28
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'com.android.support:appcompat-v7:28.0.0'
+ implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+ testImplementation 'junit:junit:4.12'
+ androidTestImplementation 'com.android.support.test:runner:1.0.2'
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+}
diff --git a/app/cat_recognition.py b/app/cat_recognition.py
deleted file mode 100644
index b65d418..0000000
--- a/app/cat_recognition.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# Imports the Google Cloud client library
-from google.cloud import vision
-from google.cloud.vision import types
-
-def is_cat(content):
- labels = fetch_data(content)
- if labels[0].description == "cat":
- return True
- else:
- return False
-
-def fetch_data(content):
- # Instantiates a client
- client = vision.ImageAnnotatorClient()
- # Tell Google Vision that our content is of type Image
- image = types.Image(content=content)
- # Performs label detection on the image file
- response = client.label_detection(image=image)
- # Return array of labels
- return response.label_annotations
diff --git a/app/forms.py b/app/forms.py
deleted file mode 100644
index ab65d4c..0000000
--- a/app/forms.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from flask_wtf import FlaskForm
-from wtforms import StringField, PasswordField, BooleanField, SubmitField
-from wtforms.validators import DataRequired
-
-class UploadForm(FlaskForm):
- url = StringField('Link', validators=[DataRequired()])
- submit = SubmitField('Cat or not?')
diff --git a/app/picture_downloader.py b/app/picture_downloader.py
deleted file mode 100644
index 3304f35..0000000
--- a/app/picture_downloader.py
+++ /dev/null
@@ -1,10 +0,0 @@
-import requests
-
-def get_image_from_url(url):
- f = open('pic.jpg','wb')
- f.write(requests.get(url).content)
- f.close()
- f = open('pic.jpg','rb')
- file = f.read()
- f.close()
- return file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..f1b4245
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/app/release/app-release.apk b/app/release/app-release.apk
new file mode 100644
index 0000000..220762c
Binary files /dev/null and b/app/release/app-release.apk differ
diff --git a/app/release/output.json b/app/release/output.json
new file mode 100644
index 0000000..9f0c959
--- /dev/null
+++ b/app/release/output.json
@@ -0,0 +1 @@
+[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
diff --git a/app/routes.py b/app/routes.py
deleted file mode 100644
index feedcbd..0000000
--- a/app/routes.py
+++ /dev/null
@@ -1,18 +0,0 @@
-from flask import Flask
-from flask import render_template
-from app.forms import UploadForm
-from app import app
-from app import cat_recognition as cat
-from app import picture_downloader as downloader
-
-@app.route('/', methods=['GET', 'POST'])
-def index():
- form = UploadForm()
- if form.validate_on_submit():
- content = downloader.get_image_from_url(form.url.data)
- if cat.is_cat(content):
- return "Cat!"
- else:
- return "Not!"
-
- return render_template('index.html', form=form)
diff --git a/app/src/androidTest/java/com/example/se/catornot/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/example/se/catornot/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..bbe7715
--- /dev/null
+++ b/app/src/androidTest/java/com/example/se/catornot/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.example.se.catornot;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("com.example.se.catornot", appContext.getPackageName());
+ }
+}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..0be7c2a
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/se/catornot/MainActivity.java b/app/src/main/java/com/example/se/catornot/MainActivity.java
new file mode 100644
index 0000000..78fda01
--- /dev/null
+++ b/app/src/main/java/com/example/se/catornot/MainActivity.java
@@ -0,0 +1,120 @@
+package com.example.se.catornot;
+
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.net.Uri;
+import android.os.Environment;
+import android.provider.MediaStore;
+import android.support.v4.content.FileProvider;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Random;
+
+import static android.graphics.Color.GREEN;
+import static android.graphics.Color.RED;
+
+public class MainActivity extends AppCompatActivity {
+
+ static final int REQUEST_IMAGE_CAPTURE = 1;
+ ImageView mImageView;
+ Button mButton;
+ TextView mTextView;
+ String mCurrentPhotoPath;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+ mImageView = this.findViewById(R.id.img1);
+ mTextView = this.findViewById(R.id.textView);
+ mButton = this.findViewById(R.id.button);
+ }
+
+ public void takePicture(View view) {
+ Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
+ // Ensure that there's a camera activity to handle the intent
+ if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
+ // Create the File where the photo should go
+ File photoFile = null;
+ try {
+ photoFile = createImageFile();
+ } catch (IOException ex) {
+ // Error occured while creating the File
+ }
+ // Continue only if the File was successfully created
+ if (photoFile != null) {
+ Uri photoUri = FileProvider.getUriForFile(this,
+ "com.example.android.fileprovider",
+ photoFile);
+ takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri);
+ startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);
+ }
+ }
+ }
+
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) {
+ File file = new File(mCurrentPhotoPath);
+ Bitmap imageBitmap = null;
+ try {
+ imageBitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), Uri.fromFile(file));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ mImageView.setImageBitmap(imageBitmap);
+
+ String decision = makeDecision();
+ mTextView.setText(decision);
+ mTextView.setVisibility(View.VISIBLE);
+ if (decision == "Cat!") {
+ mTextView.setTextColor(GREEN);
+ }
+ else {
+ mTextView.setTextColor(RED);
+ }
+
+ mButton.setText("Take another picture!");
+
+ // Delete the cached image
+ file.delete();
+ }
+ }
+
+ // Create temporary image file to provide picture in high quality
+ private File createImageFile() throws IOException {
+ // Create an image file name
+ String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
+ String imageFileName = "JPEG_" + timeStamp + "_";
+ File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
+ File image = File.createTempFile(
+ imageFileName, /* prefix */
+ ".jpg", /* suffix */
+ storageDir /* directory */
+ );
+
+ // Save a file: path for use with ACTION_VIEW intents
+ mCurrentPhotoPath = image.getAbsolutePath();
+ return image;
+ }
+
+ // Randomly choose if cat or not
+ private String makeDecision() {
+ Random r = new Random();
+ int flip = r.nextInt(2);
+ if (flip == 0)
+ return "Cat!";
+ else
+ return "Not!";
+ }
+}
diff --git a/app/src/main/res/drawable-hdpi/cat.png b/app/src/main/res/drawable-hdpi/cat.png
new file mode 100644
index 0000000..bd32e2a
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/cat.png differ
diff --git a/app/src/main/res/drawable-mdpi/cat.png b/app/src/main/res/drawable-mdpi/cat.png
new file mode 100644
index 0000000..bd32e2a
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/cat.png differ
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..1f6bb29
--- /dev/null
+++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable-xhdpi/cat.png b/app/src/main/res/drawable-xhdpi/cat.png
new file mode 100644
index 0000000..bd32e2a
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/cat.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/cat.png b/app/src/main/res/drawable-xxhdpi/cat.png
new file mode 100644
index 0000000..bd32e2a
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/cat.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/cat.png b/app/src/main/res/drawable-xxxhdpi/cat.png
new file mode 100644
index 0000000..bd32e2a
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/cat.png differ
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..0d025f9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..efc1382
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.502"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="1.0"
+ />
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..898f3ed
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..dffca36
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..64ba76f
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..dae5e08
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..e5ed465
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..14ed0af
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..b0907ca
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..d8ae031
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..2c18de9
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..beed3cd
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..0b88f84
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #008577
+ #570056
+ #28d81b
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..a16bc8d
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ Cat or Not
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..5e404d9
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/xml/file_paths.xml b/app/src/main/res/xml/file_paths.xml
new file mode 100644
index 0000000..31413fd
--- /dev/null
+++ b/app/src/main/res/xml/file_paths.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/test/java/com/example/se/catornot/ExampleUnitTest.java b/app/src/test/java/com/example/se/catornot/ExampleUnitTest.java
new file mode 100644
index 0000000..0a1a120
--- /dev/null
+++ b/app/src/test/java/com/example/se/catornot/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.example.se.catornot;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/app/templates/base.html b/app/templates/base.html
deleted file mode 100644
index 519c49c..0000000
--- a/app/templates/base.html
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- {% if title %}
- {{ title }} | Cat or Not
- {% else %}
- Cat or Not
- {% endif %}
-
-
-
- {% with messages = get_flashed_messages() %}
- {% if messages %}
-
-
-{% endblock %}
diff --git a/authentication.json b/authentication.json
deleted file mode 100644
index c2beba1..0000000
--- a/authentication.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "type": "service_account",
- "project_id": "quiet-odyssey-225116",
- "private_key_id": "f2553a958e511debcf46d10957e3c7fbdb906aa1",
- "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDfmChqO8VSfmEi\nSNeGhgq3jCe5iCk67yoaatQ9kYd10pmVST6OjJ3nmxd1iYAAYCB59wV4V19C67oj\n5x0bxhhKITilS94bNhZJFB4FjwMIGrDXe9SGcZwSwrB+ggFhvZGNQjYWDe7rrJ/V\nXemA8kO/wfVYUgHsjWXm3VKEeP4G0j8mndA+PP2T/aJNIWok5IA/emqr305YNMvd\n+C8TB6htf4Pqe1ZDHNyrGzYKUy1KbMAdtBXgmpVCKeo4XdlV1s0y7tVnCN+4MUM5\nVAP1fD9985fh84Zw+nMt6//pxGORwnvTNDjPjPwqEwQbV02YcfYMKPjXWSDFxv+v\nOqDUwAsjAgMBAAECggEAaQNRl/NSjZgFjtCfSPMTfXk5/w1QL/m70IR0AiajdFbh\nAxhPZSvtzaUts2pMz+BV4HKAAzEl8Iw99DbLmQvExKwtqpSjUCxq8w+bugic5+WB\nQPNLsYkSQE1oD0KH25vpDGsYc+s/VzjQKKnezUz7PMifrkd119/hCDjSVJ1u0Ux0\nit7ZsoLFzWWorC1CVUPHMqUtlgF8L85w4Yfma7X64yoPNvomI4MFV8E9UfUoZBY0\n02x8mBNX9fjIHzNXkyF6OD8O1IMkrADaJbdmcfgMwBWtarIEsNIiUQsFnFeaN69b\nf26NTQQux9jgMJnMu9V1TNdG6K6TshIw8a/uB4lmYQKBgQD8AUg0Qu9tS8Y4AQfq\nd/0frLIitmnzVs0Lt3TFIw1OjUrfki5gStAEVGhIN2SXLF6lWjqrtk43xQFjzuKr\nL9kuN76MbYDnITuew+9VJPnmA2EiTspcVPNph44FqPSNOar9GCCY7QB6ue+fm5bq\nFyPaHfoKuRmwbvHqVgI2L2HJbQKBgQDjI5OEWYxfJLC6StpEmmOY8W19ZQPTXBKt\nfLSEsDuAjrC2kT6ladXezYuYy/VSAbjdCYbJ1yDABNILDZky0ZSD2midtnqe3z0v\nTKBudkxEDYgRKvgQxMY89N6JpSOedY3v63cOvRwPbVi4sF+REbRu4e+OVsIlpXaK\n/IcINZdczwKBgQCNl87RBnbuqy+xkeq3tDl2DZt9Y47+WdwV5Dto9LvqUfsqyUDj\ne8WLWT3Krc0IH7cCI0Np7aHfNgME6F51nwnhLRMUZgaSVxrfpumXppH+yhFOrISJ\nAnZN6gtDZN4bZ7aKRH80TZ4CVuyrekl+OAg96q/uTHiBqKSmbTMK7O59tQKBgCMD\n3f7eKySTrGbbmTBQOKBgP4fAJcnUfNCf09hMrq+Pz7AlTeoEGcNCHo4MiyH8P/pb\nOJsu/c58L8EidIaABowZBF2jvt10/qKnBmhg9jrbdylmXV2AaCsHeLLxcT9BUgM1\nYmI0Rvod2jqGfgUIHK+nRt3DhCR3kIG2kj5yvIXDAoGAVNd8sw08+U4JMg0TPK71\nhWNeXyNc9aLpehqdIVQPs6KdhlVcoFHKLCDASzMUxNtU27b3Nqgh5dBS4YbNKXoa\n5UZUvxa2Khw1/rT9wTcaIap0kfh1SOZseSfpNUy5mrSKnnVkIn1NKmI0a+mN0gcT\nD706pAo2V7oFEQFocuua1yY=\n-----END PRIVATE KEY-----\n",
- "client_email": "c00lerxo@quiet-odyssey-225116.iam.gserviceaccount.com",
- "client_id": "106421721962581253770",
- "auth_uri": "https://accounts.google.com/o/oauth2/auth",
- "token_uri": "https://oauth2.googleapis.com/token",
- "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
- "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/c00lerxo%40quiet-odyssey-225116.iam.gserviceaccount.com"
-}
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..8d3ef8e
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,27 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+
+ repositories {
+ google()
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.2.1'
+
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/cat_or_not.py b/cat_or_not.py
deleted file mode 100644
index e13c02e..0000000
--- a/cat_or_not.py
+++ /dev/null
@@ -1 +0,0 @@
-from app import app as application
diff --git a/catornot.jks b/catornot.jks
new file mode 100644
index 0000000..f4bb7a9
Binary files /dev/null and b/catornot.jks differ
diff --git a/config.py b/config.py
deleted file mode 100644
index 5bf854f..0000000
--- a/config.py
+++ /dev/null
@@ -1,4 +0,0 @@
-import os
-
-class Config(object):
- SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..82618ce
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,15 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+
+
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..f6b961f
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..9a4163a
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..cccdd3d
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/pic.jpg b/pic.jpg
deleted file mode 100644
index 773ae83..0000000
Binary files a/pic.jpg and /dev/null differ
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index c6c1951..0000000
--- a/requirements.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-cachetools==3.0.0
-certifi==2018.11.29
-chardet==3.0.4
-Click==7.0
-Flask==1.0.2
-Flask-WTF==0.14.2
-google-api-core==1.6.0
-google-auth==1.6.1
-google-cloud-vision==0.35.1
-googleapis-common-protos==1.5.5
-grpcio==1.17.0
-gunicorn==19.9.0
-idna==2.8
-itsdangerous==1.1.0
-Jinja2==2.10
-MarkupSafe==1.1.0
-protobuf==3.6.1
-pyasn1==0.4.4
-pyasn1-modules==0.2.2
-pytz==2018.7
-requests==2.21.0
-rsa==4.0
-six==1.12.0
-urllib3==1.24.1
-Werkzeug==0.14.1
-WTForms==2.2.1
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':app'