diff --git a/ReceiptPad/.gitignore b/ReceiptPad/.gitignore
new file mode 100644
index 0000000..39fb081
--- /dev/null
+++ b/ReceiptPad/.gitignore
@@ -0,0 +1,9 @@
+*.iml
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/ReceiptPad/.idea/compiler.xml b/ReceiptPad/.idea/compiler.xml
new file mode 100644
index 0000000..96cc43e
--- /dev/null
+++ b/ReceiptPad/.idea/compiler.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReceiptPad/.idea/copyright/profiles_settings.xml b/ReceiptPad/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..e7bedf3
--- /dev/null
+++ b/ReceiptPad/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/ReceiptPad/.idea/gradle.xml b/ReceiptPad/.idea/gradle.xml
new file mode 100644
index 0000000..7ac24c7
--- /dev/null
+++ b/ReceiptPad/.idea/gradle.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReceiptPad/.idea/misc.xml b/ReceiptPad/.idea/misc.xml
new file mode 100644
index 0000000..5d19981
--- /dev/null
+++ b/ReceiptPad/.idea/misc.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReceiptPad/.idea/modules.xml b/ReceiptPad/.idea/modules.xml
new file mode 100644
index 0000000..f0ea9ab
--- /dev/null
+++ b/ReceiptPad/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReceiptPad/.idea/runConfigurations.xml b/ReceiptPad/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/ReceiptPad/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReceiptPad/app/.gitignore b/ReceiptPad/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/ReceiptPad/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/ReceiptPad/app/build.gradle b/ReceiptPad/app/build.gradle
new file mode 100644
index 0000000..63a0ecb
--- /dev/null
+++ b/ReceiptPad/app/build.gradle
@@ -0,0 +1,46 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 25
+ buildToolsVersion "25.0.3"
+ defaultConfig {
+ applicationId "com.example.ram2.myreceipts"
+ minSdkVersion 16
+ targetSdkVersion 25
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ vectorDrawables.useSupportLibrary = true
+ multiDexEnabled true
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+ androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
+ exclude group: 'com.android.support', module: 'support-annotations'
+ })
+
+ testCompile 'junit:junit:4.12'
+ compile 'com.android.support:appcompat-v7:25.3.1'
+ compile 'com.android.support:support-v4:25.3.1'
+ compile 'com.android.support:design:25.3.1'
+ compile 'com.android.support:support-vector-drawable:25.3.1'
+
+ compile 'com.firebaseui:firebase-ui-storage:0.6.0'
+ compile 'com.android.support:multidex:1.0.1'
+ compile 'com.google.firebase:firebase-storage:10.2.1'
+ compile 'com.google.firebase:firebase-auth:10.2.1'
+ compile 'com.google.android.gms:play-services-auth:10.2.1'
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+ compile 'com.google.android.gms:play-services-vision:10.2.1'
+
+}
+apply plugin: 'com.google.gms.google-services'
+
diff --git a/ReceiptPad/app/google-services.json b/ReceiptPad/app/google-services.json
new file mode 100644
index 0000000..1c7a14d
--- /dev/null
+++ b/ReceiptPad/app/google-services.json
@@ -0,0 +1,55 @@
+{
+ "project_info": {
+ "project_number": "337559407579",
+ "firebase_url": "https://neatreceipts-5bccc.firebaseio.com",
+ "project_id": "neatreceipts-5bccc",
+ "storage_bucket": "neatreceipts-5bccc.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:337559407579:android:be54a440b659d36d",
+ "android_client_info": {
+ "package_name": "com.example.ram2.myreceipts"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "337559407579-463ut2lbftvnpki1gbt78rp6phihse1b.apps.googleusercontent.com",
+ "client_type": 1,
+ "android_info": {
+ "package_name": "com.example.ram2.myreceipts",
+ "certificate_hash": "be5d0120fb65aecf99235c500c02a3ca9ee9f87b"
+ }
+ },
+ {
+ "client_id": "337559407579-gdvrcnq62mh0lfkefm16fq5dqa2gpj1n.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyAj7IkwjUgbC2tOoq7SyG4qyhSBsI52RHM"
+ }
+ ],
+ "services": {
+ "analytics_service": {
+ "status": 1
+ },
+ "appinvite_service": {
+ "status": 2,
+ "other_platform_oauth_client": [
+ {
+ "client_id": "337559407579-gdvrcnq62mh0lfkefm16fq5dqa2gpj1n.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
+ },
+ "ads_service": {
+ "status": 2
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/ReceiptPad/app/proguard-rules.pro b/ReceiptPad/app/proguard-rules.pro
new file mode 100644
index 0000000..f55f223
--- /dev/null
+++ b/ReceiptPad/app/proguard-rules.pro
@@ -0,0 +1,25 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in C:\Users\RAM2\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# 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/ReceiptPad/app/src/androidTest/java/com/example/ram2/myreceipts/ExampleInstrumentedTest.java b/ReceiptPad/app/src/androidTest/java/com/example/ram2/myreceipts/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..1503210
--- /dev/null
+++ b/ReceiptPad/app/src/androidTest/java/com/example/ram2/myreceipts/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.example.ram2.myreceipts;
+
+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.*;
+
+/**
+ * Instrumentation test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() throws Exception {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("com.example.ram2.myreceipts", appContext.getPackageName());
+ }
+}
diff --git a/ReceiptPad/app/src/main/AndroidManifest.xml b/ReceiptPad/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..5a6f1aa
--- /dev/null
+++ b/ReceiptPad/app/src/main/AndroidManifest.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/GoogleSign.java b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/GoogleSign.java
new file mode 100644
index 0000000..c29aa8b
--- /dev/null
+++ b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/GoogleSign.java
@@ -0,0 +1,12 @@
+package com.example.ram2.myreceipts;
+
+import android.support.v7.app.AppCompatActivity;
+
+
+/**
+ * Created by Dhananjaya on 5/31/2017.
+ */
+
+public class GoogleSign extends AppCompatActivity {
+
+} // end class
diff --git a/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/Pop.java b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/Pop.java
new file mode 100644
index 0000000..b9a5210
--- /dev/null
+++ b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/Pop.java
@@ -0,0 +1,67 @@
+package com.example.ram2.myreceipts;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.util.DisplayMetrics;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+/**
+ * Created by Dhananjaya on 5/22/2017.
+ */
+
+public class Pop extends Activity {
+
+ EditText inputCode;
+ Button retreiveR;
+ String inputString = "";
+ Toast noInput;
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_popup);
+
+ inputCode = (EditText) findViewById(R.id.inputCode);
+ retreiveR = (Button) findViewById(R.id.retreiveR);
+
+ DisplayMetrics dm = new DisplayMetrics();
+ getWindowManager().getDefaultDisplay().getMetrics(dm);
+
+ int width = dm.widthPixels;
+ int height = dm.heightPixels;
+
+ getWindow().setLayout((int)(width*.7), (int)(height*.6));
+
+ noInput = Toast.makeText(getApplicationContext(), "Please input a code", Toast.LENGTH_LONG);
+
+ } // end onCreate
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+
+ retreiveR.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ inputString = inputCode.getText().toString();
+ if ( inputString.equals("") )
+ noInput.show();
+ else {
+ Intent intent = new Intent(Pop.this, homeJava.class);
+ intent.putExtra("code", inputString);
+ setResult(RESULT_OK, intent);
+ finish();
+ }// end else
+ }
+ }); // end listener
+
+ } // end onStart
+
+
+}
+
diff --git a/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/Server.java b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/Server.java
new file mode 100644
index 0000000..07ca03e
--- /dev/null
+++ b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/Server.java
@@ -0,0 +1,90 @@
+package com.example.ram2.myreceipts;
+
+/**
+ * Created by RAM2 on 5/17/2017.
+ */
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+import android.app.Activity;
+import android.content.Context;
+import android.os.Bundle;
+import android.os.Environment;
+import android.os.StrictMode;
+import android.util.Log;
+
+ public class Server extends Activity {
+
+ private static ServerSocket serverSocket;
+ private static Socket clientSocket;
+ private static InputStream inputStream;
+ private static FileOutputStream fileOutputStream;
+ private static BufferedOutputStream bufferedOutputStream;
+ private static int bufferSize = 3000; // bufferSize temporary hardcoded
+ private static int bytesRead;
+ private static int totalbytesRead = 0;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
+ StrictMode.setThreadPolicy(policy);
+
+ try {
+ init();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ private void init() throws IOException {
+ // TODO Auto-generated method stub
+ serverSocket = new ServerSocket(5000); // Server socket
+
+ System.out.println("Server started. Listening to the port 5000");
+
+ clientSocket = serverSocket.accept();
+
+ byte[] data = new byte[bufferSize]; // create byte array to buffer the
+ // file
+
+ inputStream = clientSocket.getInputStream();
+
+ String filePath = "C:\\Users\\RAM2\\AndroidStudioProjects\\MyReceipts\\app\\src\\main\\res\\drawable\\bg_home.jpg" ;
+
+ fileOutputStream = new FileOutputStream(filePath);
+ // fileOutputStream = new FileOutputStream(file);
+ bufferedOutputStream = new BufferedOutputStream(fileOutputStream);
+
+ System.out.println("Receiving...");
+
+ // following lines read the input slide file byte by byte
+
+ bytesRead = inputStream.read(data,0,data.length);
+ totalbytesRead = bytesRead;
+
+
+
+ do {
+ bytesRead =
+ inputStream.read(data, totalbytesRead, (data.length-totalbytesRead));
+ if(bytesRead >= 0) totalbytesRead += bytesRead;
+ } while(bytesRead > -1);
+
+ bufferedOutputStream.write(data, 0 , totalbytesRead);
+ bufferedOutputStream.flush();
+ long end = System.currentTimeMillis();
+ System.out.println(end);
+ bufferedOutputStream.close();
+ System.out.println("Sever received the file");
+
+ }
+ }
+
diff --git a/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/WelcomePage.java b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/WelcomePage.java
new file mode 100644
index 0000000..b0f7605
--- /dev/null
+++ b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/WelcomePage.java
@@ -0,0 +1,144 @@
+package com.example.ram2.myreceipts;
+
+import android.content.Intent;
+import android.support.annotation.NonNull;
+
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.Toast;
+
+import com.google.android.gms.auth.api.Auth;
+import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
+import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
+import com.google.android.gms.auth.api.signin.GoogleSignInResult;
+import com.google.android.gms.common.ConnectionResult;
+import com.google.android.gms.common.SignInButton;
+import com.google.android.gms.common.api.GoogleApiClient;
+import com.google.android.gms.common.api.ResultCallback;
+import com.google.android.gms.common.api.Status;
+import com.google.android.gms.tasks.OnCompleteListener;
+import com.google.android.gms.tasks.Task;
+import com.google.firebase.auth.AuthCredential;
+import com.google.firebase.auth.AuthResult;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.auth.FirebaseUser;
+import com.google.firebase.auth.GoogleAuthProvider;
+
+
+/**
+ * An example full-screen activity that shows and hides the system UI (i.e.
+ * status bar and navigation/system bar) with user interaction.
+ */
+public class WelcomePage extends AppCompatActivity {
+
+ private SignInButton mGoogleBtn;
+
+ private static final int RC_SIGN_IN = 1;
+ private static final String TAG = "Main_Activity";
+
+ private GoogleApiClient mGoogleApiClient;
+
+ private FirebaseAuth mAuth;
+ private FirebaseAuth.AuthStateListener mAuthListener;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_welcome_page);
+
+ mGoogleBtn = (SignInButton) findViewById(R.id.sign_in_button);
+
+ mAuth = FirebaseAuth.getInstance();
+ mAuthListener = new FirebaseAuth.AuthStateListener() {
+ @Override
+ public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
+ if(firebaseAuth.getCurrentUser() != null) {
+ startActivity( new Intent(WelcomePage.this, homeJava.class) );
+ }
+ }
+ };
+
+ // Configure Google Sign In
+ GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
+ .requestIdToken(getString(R.string.default_web_client_id))
+ .requestEmail()
+ .build();
+
+ mGoogleApiClient = new GoogleApiClient.Builder(getApplicationContext())
+ .enableAutoManage(this, new GoogleApiClient.OnConnectionFailedListener() {
+ @Override
+ public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
+ Toast.makeText(WelcomePage.this, "Authorization Denied", Toast.LENGTH_LONG).show();
+ }
+ })
+ .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
+ .build();
+
+ mGoogleBtn.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ signIn();
+ }
+ });
+
+ } // end onCreate
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+
+ mAuth.addAuthStateListener(mAuthListener);
+ }
+
+ private void signIn() {
+ Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
+ startActivityForResult(signInIntent, RC_SIGN_IN);
+ }
+
+ @Override
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+
+ // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);
+ if (requestCode == RC_SIGN_IN) {
+ GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
+ if (result.isSuccess()) {
+ // Google Sign In was successful, authenticate with Firebase
+ GoogleSignInAccount account = result.getSignInAccount();
+ firebaseAuthWithGoogle(account);
+ } else {
+ // Google Sign In failed, update UI appropriately
+ // ...
+ }
+ }
+ } // end onActivityResult
+
+
+ private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {
+
+ AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);
+ mAuth.signInWithCredential(credential)
+ .addOnCompleteListener(this, new OnCompleteListener() {
+ @Override
+ public void onComplete(@NonNull Task task) {
+ if (task.isSuccessful()) {
+ // Sign in success, update UI with the signed-in user's information
+ Log.d(TAG, "signInWithCredential:success");
+ FirebaseUser user = mAuth.getCurrentUser();
+ } else {
+ // If sign in fails, display a message to the user.
+ Log.w(TAG, "signInWithCredential:failure", task.getException());
+ Toast.makeText(WelcomePage.this, "Authentication failed.",
+ Toast.LENGTH_SHORT).show();
+ }
+
+ // ...
+ }
+ });
+ } // end method
+
+}// end class
+
diff --git a/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/drawerJava.java b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/drawerJava.java
new file mode 100644
index 0000000..08b1c45
--- /dev/null
+++ b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/drawerJava.java
@@ -0,0 +1,146 @@
+package com.example.ram2.myreceipts;
+
+import android.net.Uri;
+import android.support.annotation.NonNull;
+import android.support.v7.app.AppCompatActivity;
+
+/**
+ * Created by RAM2 on 5/17/2017.
+ */
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.bumptech.glide.Glide;
+import com.firebase.ui.storage.images.FirebaseImageLoader;
+import com.google.android.gms.auth.api.Auth;
+import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
+import com.google.android.gms.common.ConnectionResult;
+import com.google.android.gms.common.api.GoogleApiClient;
+import com.google.android.gms.common.api.ResultCallback;
+import com.google.android.gms.common.api.Status;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.auth.FirebaseUser;
+
+import java.io.File;
+import java.net.URI;
+
+
+public class drawerJava extends AppCompatActivity {
+
+ private FirebaseAuth mAuth;
+ private FirebaseAuth.AuthStateListener mAuthListener;
+
+ private GoogleApiClient mGoogleApiClient;
+
+ TextView currentUserName;
+ ImageView profPic;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_drawer);
+
+ currentUserName = (TextView) findViewById(R.id.currentUserName);
+ profPic = (ImageView) findViewById(R.id.profPic);
+
+ GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
+ .requestIdToken(getString(R.string.default_web_client_id))
+ .requestEmail()
+ .build();
+
+ mGoogleApiClient = new GoogleApiClient.Builder(this)
+ .enableAutoManage(this /* FragmentActivity */,new GoogleApiClient.OnConnectionFailedListener() {
+ @Override
+ public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
+ Toast.makeText(drawerJava.this, "Authorization Denied", Toast.LENGTH_LONG).show();
+ }
+ })
+ .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
+ .build();
+
+
+ mAuth = FirebaseAuth.getInstance();
+ mAuthListener = new FirebaseAuth.AuthStateListener() {
+ @Override
+ public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
+ if(firebaseAuth.getCurrentUser() == null) {
+ Intent ontoWelcome = new Intent(drawerJava.this, WelcomePage.class);
+ startActivity(ontoWelcome);
+ }
+ }
+ };
+
+
+ Button logOut = (Button) findViewById(R.id.logOut);
+ logOut.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ // completely logout user
+ mAuth.signOut();
+ Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(
+ new ResultCallback() {
+ @Override
+ public void onResult(@NonNull Status status) {
+ }
+ });
+ }
+ });
+
+
+ Button exit = (Button) findViewById(R.id.exit);
+ exit.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick ( View view ) {
+ Intent intent = new Intent(Intent.ACTION_MAIN);
+ intent.addCategory(Intent.CATEGORY_HOME);
+ startActivity(intent);
+
+ }
+ });
+
+ Button back = (Button) findViewById(R.id.back);
+ back.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent back = new Intent(drawerJava.this, homeJava.class);
+ startActivity(back);
+ overridePendingTransition(R.anim.slide_in_right, R.anim.exit_left);
+ }
+ });
+ } // end onCreate
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+
+ mAuth.addAuthStateListener(mAuthListener);
+
+ FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
+
+ String name = user.getDisplayName();
+ currentUserName.setText(name);
+
+ Uri photoUrl = user.getPhotoUrl();
+ Glide.with(drawerJava.this)
+ .load(photoUrl)
+ .into(profPic);
+ } // end onStart
+
+ @Override
+ public void onBackPressed() {
+ Intent back = new Intent(drawerJava.this, homeJava.class);
+ startActivity(back);
+ overridePendingTransition(R.anim.slide_in_right, R.anim.exit_left);
+ return;
+ }
+
+}// end class
diff --git a/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/homeJava.java b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/homeJava.java
new file mode 100644
index 0000000..3801de7
--- /dev/null
+++ b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/homeJava.java
@@ -0,0 +1,246 @@
+
+package com.example.ram2.myreceipts;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.support.v4.app.ActivityCompat;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.SurfaceHolder;
+import android.view.SurfaceView;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+import com.bumptech.glide.Glide;
+import com.firebase.ui.storage.images.FirebaseImageLoader;
+import com.google.android.gms.vision.CameraSource;
+import com.google.android.gms.vision.text.TextRecognizer;
+import com.google.firebase.storage.FirebaseStorage;
+import com.google.firebase.storage.StorageReference;
+
+import java.io.IOException;
+
+
+
+/**
+ * Created by RAM2 on 5/11/2017.
+ */
+
+public class homeJava extends AppCompatActivity {
+
+ ImageView codePopup;
+ ImageView notificon;
+ ImageView dashicon;
+ ImageView homeicon;
+
+ StorageReference mStorage;
+ StorageReference filePath;
+
+ ImageView currentReceipt;
+ ImageView entireReceipt;
+
+ String inputString;
+ Toast notValidCode;
+ private int REQUEST_CODE = 1;
+ String[] arr = new String[3];
+ int whichModuletoDisplay;
+
+ TextView begin;
+
+ /*TextView textView;
+ SurfaceView cameraView;
+ CameraSource cameraSource;
+ final int RequestCameraPermissionID = 1001;
+ StringBuilder stringBuilder;
+ TextRecognizer textRecognizer;
+
+ @Override
+ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
+ switch (requestCode) {
+ case RequestCameraPermissionID: {
+ if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+ if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
+ return;
+ }
+ try {
+ cameraSource.start(cameraView.getHolder());
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+ }
+ break;
+ }
+ } // end onRequestPermissionsResult */
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_home);
+
+ codePopup = (ImageView) findViewById(R.id.enterCode);
+ notificon = (ImageView) findViewById(R.id.notificon);
+ dashicon = (ImageView) findViewById(R.id.dashicon);
+ homeicon = (ImageView) findViewById(R.id.homeicon);
+
+ begin = (TextView) findViewById(R.id.begin);
+
+
+ entireReceipt = (ImageView) findViewById(R.id.entireReceipt);
+ notValidCode = Toast.makeText(getApplicationContext(), "Not a Valid Code", Toast.LENGTH_LONG);
+
+ arr[0] = "F123";
+ arr[1] = "F456";
+ arr[2] = "F789";
+
+ whichModuletoDisplay = 1;
+
+ /*cameraView = (SurfaceView) findViewById(R.id.surfaceView);
+ textView = (TextView) findViewById(R.id.txtView);
+
+
+ cameraView.setVisibility(View.VISIBLE);
+ textRecognizer = new TextRecognizer.Builder(getApplicationContext()).build();
+ if (!textRecognizer.isOperational()) {
+ Log.w("MainActivity", "Detector Dependencies are not yet available.");
+ } else {
+ cameraSource = new CameraSource.Builder(getApplicationContext(), textRecognizer)
+ .setFacing(CameraSource.CAMERA_FACING_BACK)
+ .setRequestedPreviewSize(1280, 1024)
+ .setRequestedFps(2.0f)
+ .setAutoFocusEnabled(true)
+ .build();
+ }
+
+
+ cameraView.getHolder().addCallback(new SurfaceHolder.Callback() {
+ @Override
+ public void surfaceCreated(SurfaceHolder surfaceHolder) {
+
+ try {
+ if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
+
+ ActivityCompat.requestPermissions(homeJava.this,
+ new String[]{Manifest.permission.CAMERA},
+ RequestCameraPermissionID);
+ return;
+ }
+ cameraSource.start(cameraView.getHolder());
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {
+
+ }
+
+ @Override
+ public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
+ cameraSource.stop();
+ }
+ }); */
+
+ }// end onCreate method
+
+
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+
+ mStorage = FirebaseStorage.getInstance().getReference();
+
+
+ dashicon.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ Intent ontoDrawer = new Intent(homeJava.this, drawerJava.class);
+ startActivity(ontoDrawer);
+ overridePendingTransition(R.anim.slide_in_left, R.anim.exit_right);
+ }
+ });
+
+ codePopup.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ Intent toPopup = new Intent(homeJava.this, Pop.class);
+ startActivityForResult(toPopup, REQUEST_CODE);
+ }
+ }); // end clickListener for refresh button
+
+
+ homeicon.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ entireReceipt.setVisibility(View.INVISIBLE);
+ codePopup.setVisibility(View.VISIBLE);
+ }
+ }); // end clickListener for refresh button
+
+ }// end onStart
+
+
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ if ( requestCode == REQUEST_CODE ) {
+ if (resultCode == RESULT_OK) {
+ inputString = data.getStringExtra("code");
+
+ int checkIfValid = 0;
+ for ( int i = 0; i < arr.length; i++ ){
+ if ( inputString.equalsIgnoreCase(arr[i]) ) {
+ checkIfValid++;
+ final String whichReceipt = Integer.toString(i+1);
+ int currR = getResources().getIdentifier("receipt" + whichModuletoDisplay, "id", getPackageName());
+ currentReceipt = (ImageView) findViewById(currR);
+ whichModuletoDisplay++;
+
+ //file path for overview image
+ filePath = mStorage.child("receipt" + whichReceipt + "/" + "bg_home11.jpg");
+ Glide.with(homeJava.this)
+ .using(new FirebaseImageLoader())
+ .load(filePath)
+ .into(currentReceipt);
+ currentReceipt.setScaleType(ImageView.ScaleType.FIT_XY);
+
+ begin.setVisibility(View.INVISIBLE);
+
+ //entire receipt image
+ currentReceipt.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ filePath = mStorage.child("receipt"+ whichReceipt +"/entirer1.jpg");
+ entireReceipt.setVisibility(View.VISIBLE);
+ entireReceipt.setScaleType(ImageView.ScaleType.FIT_XY);
+ Glide.with(homeJava.this)
+ .using(new FirebaseImageLoader())
+ .load(filePath)
+ .into(entireReceipt);
+ codePopup.setVisibility(View.INVISIBLE);
+ }
+ }); // end Listener for entireReceipt
+ } // end if
+ } // end for
+
+ if ( checkIfValid == 0 )
+ notValidCode.show();
+
+ }// end if
+ }// end if
+
+ }// end method
+
+
+
+
+
+
+} // end class
+
+
+
+
diff --git a/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/notifJava.java b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/notifJava.java
new file mode 100644
index 0000000..6f7066b
--- /dev/null
+++ b/ReceiptPad/app/src/main/java/com/example/ram2/myreceipts/notifJava.java
@@ -0,0 +1,58 @@
+package com.example.ram2.myreceipts;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import org.w3c.dom.Text;
+
+/**
+ * Created by RAM2 on 5/11/2017.
+ */
+
+public class notifJava extends AppCompatActivity {
+
+ TextView updates;
+ LinearLayout imageSection;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_notifications);
+
+ updates = (TextView) findViewById(R.id.notifModule);
+ imageSection = (LinearLayout) findViewById(R.id.imageSection);
+
+ ImageView homeicon = (ImageView) findViewById(R.id.homeicon);
+ homeicon.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ Intent ontoHome = new Intent(notifJava.this, homeJava.class);
+ startActivity(ontoHome);
+ overridePendingTransition(R.anim.slide_in_left, R.anim.exit_right);
+ }
+ });
+
+ ImageView dashicon = (ImageView) findViewById(R.id.dashicon);
+ dashicon.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick ( View view ) {
+ Intent ontoDrawer = new Intent(notifJava.this, drawerJava.class);
+ startActivity(ontoDrawer);
+ overridePendingTransition(R.anim.slide_in_left, R.anim.exit_right);
+ }
+ });
+
+ }// end oncreate
+
+ public void setTxtView () {
+ updates = (TextView) findViewById(R.id.notifModule);
+ String updateMsg = updates.getText().toString() + "/n" + "A new receipt has been added by:";
+ updates.setText(updateMsg);
+ } // end setTxtView
+
+}// end class
diff --git a/ReceiptPad/app/src/main/res/anim/exit_left.xml b/ReceiptPad/app/src/main/res/anim/exit_left.xml
new file mode 100644
index 0000000..7b2b5e4
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/anim/exit_left.xml
@@ -0,0 +1,8 @@
+
+
+
+
\ No newline at end of file
diff --git a/ReceiptPad/app/src/main/res/anim/exit_right.xml b/ReceiptPad/app/src/main/res/anim/exit_right.xml
new file mode 100644
index 0000000..ebbc4d3
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/anim/exit_right.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
diff --git a/ReceiptPad/app/src/main/res/anim/slide_in_left.xml b/ReceiptPad/app/src/main/res/anim/slide_in_left.xml
new file mode 100644
index 0000000..3c7c532
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/anim/slide_in_left.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
diff --git a/ReceiptPad/app/src/main/res/anim/slide_in_right.xml b/ReceiptPad/app/src/main/res/anim/slide_in_right.xml
new file mode 100644
index 0000000..08caa7f
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/anim/slide_in_right.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
diff --git a/ReceiptPad/app/src/main/res/drawable/bg_home.jpg b/ReceiptPad/app/src/main/res/drawable/bg_home.jpg
new file mode 100644
index 0000000..9091932
Binary files /dev/null and b/ReceiptPad/app/src/main/res/drawable/bg_home.jpg differ
diff --git a/ReceiptPad/app/src/main/res/drawable/btn_shadow.xml b/ReceiptPad/app/src/main/res/drawable/btn_shadow.xml
new file mode 100644
index 0000000..397cf28
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/drawable/btn_shadow.xml
@@ -0,0 +1,29 @@
+
+
+ -
+
+
-
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReceiptPad/app/src/main/res/drawable/codepopup.png b/ReceiptPad/app/src/main/res/drawable/codepopup.png
new file mode 100644
index 0000000..ac57d42
Binary files /dev/null and b/ReceiptPad/app/src/main/res/drawable/codepopup.png differ
diff --git a/ReceiptPad/app/src/main/res/drawable/drawer.png b/ReceiptPad/app/src/main/res/drawable/drawer.png
new file mode 100644
index 0000000..a0f9c21
Binary files /dev/null and b/ReceiptPad/app/src/main/res/drawable/drawer.png differ
diff --git a/ReceiptPad/app/src/main/res/drawable/ic_dashboard_black_24dp.xml b/ReceiptPad/app/src/main/res/drawable/ic_dashboard_black_24dp.xml
new file mode 100644
index 0000000..ae6a446
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/drawable/ic_dashboard_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/ReceiptPad/app/src/main/res/drawable/ic_home_black_24dp.xml b/ReceiptPad/app/src/main/res/drawable/ic_home_black_24dp.xml
new file mode 100644
index 0000000..0c36320
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/drawable/ic_home_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/ReceiptPad/app/src/main/res/drawable/ic_notifications_black_24dp.xml b/ReceiptPad/app/src/main/res/drawable/ic_notifications_black_24dp.xml
new file mode 100644
index 0000000..0262382
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/drawable/ic_notifications_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/ReceiptPad/app/src/main/res/drawable/logo.jpg b/ReceiptPad/app/src/main/res/drawable/logo.jpg
new file mode 100644
index 0000000..7e0ab0d
Binary files /dev/null and b/ReceiptPad/app/src/main/res/drawable/logo.jpg differ
diff --git a/ReceiptPad/app/src/main/res/drawable/notificon.png b/ReceiptPad/app/src/main/res/drawable/notificon.png
new file mode 100644
index 0000000..9019ea3
Binary files /dev/null and b/ReceiptPad/app/src/main/res/drawable/notificon.png differ
diff --git a/ReceiptPad/app/src/main/res/drawable/popbg.jpg b/ReceiptPad/app/src/main/res/drawable/popbg.jpg
new file mode 100644
index 0000000..1748ea7
Binary files /dev/null and b/ReceiptPad/app/src/main/res/drawable/popbg.jpg differ
diff --git a/ReceiptPad/app/src/main/res/drawable/popbg2.png b/ReceiptPad/app/src/main/res/drawable/popbg2.png
new file mode 100644
index 0000000..daf5025
Binary files /dev/null and b/ReceiptPad/app/src/main/res/drawable/popbg2.png differ
diff --git a/ReceiptPad/app/src/main/res/drawable/refresh.png b/ReceiptPad/app/src/main/res/drawable/refresh.png
new file mode 100644
index 0000000..1c3fd1e
Binary files /dev/null and b/ReceiptPad/app/src/main/res/drawable/refresh.png differ
diff --git a/ReceiptPad/app/src/main/res/layout/activity_drawer.xml b/ReceiptPad/app/src/main/res/layout/activity_drawer.xml
new file mode 100644
index 0000000..73746cb
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/layout/activity_drawer.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ReceiptPad/app/src/main/res/layout/activity_home.xml b/ReceiptPad/app/src/main/res/layout/activity_home.xml
new file mode 100644
index 0000000..88cf0f9
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/layout/activity_home.xml
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ReceiptPad/app/src/main/res/layout/activity_notifications.xml b/ReceiptPad/app/src/main/res/layout/activity_notifications.xml
new file mode 100644
index 0000000..d2be748
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/layout/activity_notifications.xml
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ReceiptPad/app/src/main/res/layout/activity_popup.xml b/ReceiptPad/app/src/main/res/layout/activity_popup.xml
new file mode 100644
index 0000000..9ac59d6
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/layout/activity_popup.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ReceiptPad/app/src/main/res/layout/activity_welcome_page.xml b/ReceiptPad/app/src/main/res/layout/activity_welcome_page.xml
new file mode 100644
index 0000000..be99e55
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/layout/activity_welcome_page.xml
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ReceiptPad/app/src/main/res/menu/navigation.xml b/ReceiptPad/app/src/main/res/menu/navigation.xml
new file mode 100644
index 0000000..f4de4f8
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/menu/navigation.xml
@@ -0,0 +1,19 @@
+
+
diff --git a/ReceiptPad/app/src/main/res/mipmap-hdpi/ic_launcher.png b/ReceiptPad/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..cde69bc
Binary files /dev/null and b/ReceiptPad/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/ReceiptPad/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/ReceiptPad/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..9a078e3
Binary files /dev/null and b/ReceiptPad/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/ReceiptPad/app/src/main/res/mipmap-mdpi/ic_launcher.png b/ReceiptPad/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c133a0c
Binary files /dev/null and b/ReceiptPad/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/ReceiptPad/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/ReceiptPad/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..efc028a
Binary files /dev/null and b/ReceiptPad/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/ReceiptPad/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/ReceiptPad/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..bfa42f0
Binary files /dev/null and b/ReceiptPad/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/ReceiptPad/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/ReceiptPad/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..3af2608
Binary files /dev/null and b/ReceiptPad/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/ReceiptPad/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/ReceiptPad/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..324e72c
Binary files /dev/null and b/ReceiptPad/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/ReceiptPad/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/ReceiptPad/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..9bec2e6
Binary files /dev/null and b/ReceiptPad/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/ReceiptPad/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/ReceiptPad/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..aee44e1
Binary files /dev/null and b/ReceiptPad/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/ReceiptPad/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/ReceiptPad/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..34947cd
Binary files /dev/null and b/ReceiptPad/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/ReceiptPad/app/src/main/res/values/attrs.xml b/ReceiptPad/app/src/main/res/values/attrs.xml
new file mode 100644
index 0000000..7ce840e
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/values/attrs.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
diff --git a/ReceiptPad/app/src/main/res/values/colors.xml b/ReceiptPad/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..d5b93f6
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/values/colors.xml
@@ -0,0 +1,8 @@
+
+
+ #3F51B5
+ #303f9f
+ #FF4081
+
+ #66000000
+
diff --git a/ReceiptPad/app/src/main/res/values/dimens.xml b/ReceiptPad/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..47c8224
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/values/dimens.xml
@@ -0,0 +1,5 @@
+
+
+ 16dp
+ 16dp
+
diff --git a/ReceiptPad/app/src/main/res/values/strings.xml b/ReceiptPad/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..5e0a71d
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/values/strings.xml
@@ -0,0 +1,8 @@
+
+ Neat Receipt
+
+ Dashboard
+ Home
+ Dashboard
+ Notifications
+
diff --git a/ReceiptPad/app/src/main/res/values/styles.xml b/ReceiptPad/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..2785aab
--- /dev/null
+++ b/ReceiptPad/app/src/main/res/values/styles.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/ReceiptPad/app/src/test/java/com/example/ram2/myreceipts/ExampleUnitTest.java b/ReceiptPad/app/src/test/java/com/example/ram2/myreceipts/ExampleUnitTest.java
new file mode 100644
index 0000000..71ec9b2
--- /dev/null
+++ b/ReceiptPad/app/src/test/java/com/example/ram2/myreceipts/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.example.ram2.myreceipts;
+
+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() throws Exception {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/ReceiptPad/build.gradle b/ReceiptPad/build.gradle
new file mode 100644
index 0000000..1c11dd8
--- /dev/null
+++ b/ReceiptPad/build.gradle
@@ -0,0 +1,24 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:2.3.2'
+ classpath 'com.google.gms:google-services:3.1.0'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/ReceiptPad/gradle.properties b/ReceiptPad/gradle.properties
new file mode 100644
index 0000000..aac7c9b
--- /dev/null
+++ b/ReceiptPad/gradle.properties
@@ -0,0 +1,17 @@
+# 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/ReceiptPad/gradle/wrapper/gradle-wrapper.jar b/ReceiptPad/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
Binary files /dev/null and b/ReceiptPad/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/ReceiptPad/gradle/wrapper/gradle-wrapper.properties b/ReceiptPad/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..06a0cfb
--- /dev/null
+++ b/ReceiptPad/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Tue May 09 15:56:11 PDT 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/ReceiptPad/gradlew b/ReceiptPad/gradlew
new file mode 100644
index 0000000..9d82f78
--- /dev/null
+++ b/ReceiptPad/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# 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
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# 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
+
+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" ] ; 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
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/ReceiptPad/gradlew.bat b/ReceiptPad/gradlew.bat
new file mode 100644
index 0000000..8a0b282
--- /dev/null
+++ b/ReceiptPad/gradlew.bat
@@ -0,0 +1,90 @@
+@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
+
+@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=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@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 Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_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=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+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/ReceiptPad/settings.gradle b/ReceiptPad/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/ReceiptPad/settings.gradle
@@ -0,0 +1 @@
+include ':app'