diff --git a/FingerprintAuthentication/.gitignore b/FingerprintAuthentication/.gitignore
new file mode 100644
index 0000000..a4c7838
--- /dev/null
+++ b/FingerprintAuthentication/.gitignore
@@ -0,0 +1,9 @@
+*.iml
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/FingerprintAuthentication/.idea/compiler.xml b/FingerprintAuthentication/.idea/compiler.xml
new file mode 100644
index 0000000..96cc43e
--- /dev/null
+++ b/FingerprintAuthentication/.idea/compiler.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FingerprintAuthentication/.idea/copyright/profiles_settings.xml b/FingerprintAuthentication/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..c7d1c5a
--- /dev/null
+++ b/FingerprintAuthentication/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/FingerprintAuthentication/.idea/gradle.xml b/FingerprintAuthentication/.idea/gradle.xml
new file mode 100644
index 0000000..7ac24c7
--- /dev/null
+++ b/FingerprintAuthentication/.idea/gradle.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FingerprintAuthentication/.idea/misc.xml b/FingerprintAuthentication/.idea/misc.xml
new file mode 100644
index 0000000..5d19981
--- /dev/null
+++ b/FingerprintAuthentication/.idea/misc.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FingerprintAuthentication/.idea/modules.xml b/FingerprintAuthentication/.idea/modules.xml
new file mode 100644
index 0000000..5e30b25
--- /dev/null
+++ b/FingerprintAuthentication/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FingerprintAuthentication/app/.gitignore b/FingerprintAuthentication/app/.gitignore
new file mode 100644
index 0000000..3543521
--- /dev/null
+++ b/FingerprintAuthentication/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/FingerprintAuthentication/app/build.gradle b/FingerprintAuthentication/app/build.gradle
new file mode 100644
index 0000000..74b0670
--- /dev/null
+++ b/FingerprintAuthentication/app/build.gradle
@@ -0,0 +1,30 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 25
+ buildToolsVersion "26.0.2"
+ defaultConfig {
+ applicationId "com.example.dhruv.fingerprintauthentication"
+ minSdkVersion 23
+ targetSdkVersion 25
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ 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'
+ })
+ compile 'com.android.support:appcompat-v7:25.3.1'
+ compile 'com.android.support.constraint:constraint-layout:1.0.2'
+ testCompile 'junit:junit:4.12'
+}
diff --git a/FingerprintAuthentication/app/proguard-rules.pro b/FingerprintAuthentication/app/proguard-rules.pro
new file mode 100644
index 0000000..775e288
--- /dev/null
+++ b/FingerprintAuthentication/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\Dhruv\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/FingerprintAuthentication/app/src/androidTest/java/com/example/dhruv/fingerprintauthentication/ExampleInstrumentedTest.java b/FingerprintAuthentication/app/src/androidTest/java/com/example/dhruv/fingerprintauthentication/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..e78e68f
--- /dev/null
+++ b/FingerprintAuthentication/app/src/androidTest/java/com/example/dhruv/fingerprintauthentication/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.example.dhruv.fingerprintauthentication;
+
+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.dhruv.fingerprintauthentication", appContext.getPackageName());
+ }
+}
diff --git a/FingerprintAuthentication/app/src/main/AndroidManifest.xml b/FingerprintAuthentication/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..0f3e2e8
--- /dev/null
+++ b/FingerprintAuthentication/app/src/main/AndroidManifest.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FingerprintAuthentication/app/src/main/java/com/example/dhruv/fingerprintauthentication/FingerprintHandler.java b/FingerprintAuthentication/app/src/main/java/com/example/dhruv/fingerprintauthentication/FingerprintHandler.java
new file mode 100644
index 0000000..a00d3a5
--- /dev/null
+++ b/FingerprintAuthentication/app/src/main/java/com/example/dhruv/fingerprintauthentication/FingerprintHandler.java
@@ -0,0 +1,53 @@
+package com.example.dhruv.fingerprintauthentication;
+
+import android.hardware.fingerprint.FingerprintManager;
+import android.os.Build;
+import android.os.CancellationSignal;
+import android.support.annotation.RequiresApi;
+import android.widget.TextView;
+
+
+@RequiresApi(api = Build.VERSION_CODES.M)
+public class FingerprintHandler extends FingerprintManager.AuthenticationCallback {
+
+ private TextView tv;
+
+
+ public FingerprintHandler(TextView tv) {
+ this.tv = tv;
+ }
+
+ public void doAuth(FingerprintManager manager, FingerprintManager.CryptoObject obj) {
+ CancellationSignal signal = new CancellationSignal();
+
+ try {
+ manager.authenticate(obj, signal, 0, this, null);
+ }
+ catch(SecurityException sce) {}
+ }
+
+ @Override
+ public void onAuthenticationError(int errorCode, CharSequence errString) {
+ super.onAuthenticationError(errorCode, errString);
+ tv.setText("Auth Error");
+ }
+
+ @Override
+ public void onAuthenticationHelp(int helpCode, CharSequence helpString) {
+ super.onAuthenticationHelp(helpCode, helpString);
+
+ }
+
+ @Override
+ public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
+ super.onAuthenticationSucceeded(result);
+ tv.setText("Auth Success");
+ }
+
+ @Override
+ public void onAuthenticationFailed() {
+ super.onAuthenticationFailed();
+ }
+
+
+}
\ No newline at end of file
diff --git a/FingerprintAuthentication/app/src/main/java/com/example/dhruv/fingerprintauthentication/MainActivity.java b/FingerprintAuthentication/app/src/main/java/com/example/dhruv/fingerprintauthentication/MainActivity.java
new file mode 100644
index 0000000..fc2c89f
--- /dev/null
+++ b/FingerprintAuthentication/app/src/main/java/com/example/dhruv/fingerprintauthentication/MainActivity.java
@@ -0,0 +1,174 @@
+package com.example.dhruv.fingerprintauthentication;
+
+import android.app.KeyguardManager;
+import android.hardware.fingerprint.FingerprintManager;
+import android.security.keystore.KeyGenParameterSpec;
+import android.security.keystore.KeyGenParameterSpec.Builder;
+import android.security.keystore.KeyProperties;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.UnrecoverableKeyException;
+import java.security.cert.CertificateException;
+
+import javax.crypto.Cipher;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+
+public class MainActivity extends AppCompatActivity {
+
+ private TextView message;
+ private static final String KEY_NAME = "SwA";
+
+ private KeyStore keyStore;
+ private KeyGenerator keyGenerator;
+ private FingerprintManager.CryptoObject cryptoObject;
+
+ private FingerprintManager fingerprintManager;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ message = (TextView) findViewById(R.id.fingerStatus);
+ Button btn = (Button) findViewById(R.id.authBtn);
+
+ final FingerprintHandler fph = new FingerprintHandler(message);
+
+ if (!checkFinger()) {
+ btn.setEnabled(false);
+ }
+ else {
+ // We are ready to set up the cipher and the key
+ try {
+ generateKey();
+ Cipher cipher = generateCipher();
+ cryptoObject =
+ new FingerprintManager.CryptoObject(cipher);
+
+ }
+ catch(FingerprintException fpe) {
+ // Handle exception
+ btn.setEnabled(false);
+ }
+ }
+
+ btn.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ message.setText("Swipe your finger");
+ fph.doAuth(fingerprintManager, cryptoObject);
+ }
+ });
+ }
+
+
+ private boolean checkFinger() {
+
+ // Keyguard Manager
+ KeyguardManager keyguardManager = (KeyguardManager) getSystemService(KEYGUARD_SERVICE);
+
+ // Fingerprint Manager
+ fingerprintManager = (FingerprintManager) getSystemService(FINGERPRINT_SERVICE);
+
+ try {
+ // Check if the fingerprint sensor is present
+ if (!fingerprintManager.isHardwareDetected()) {
+ message.setText("Fingerprint authentication not supported");
+ return false;
+ }
+
+ if (!fingerprintManager.hasEnrolledFingerprints()) {
+ message.setText("No fingerprint configured.");
+ return false;
+ }
+
+ if (!keyguardManager.isKeyguardSecure()) {
+ message.setText("Secure lock screen not enabled");
+ return false;
+ }
+
+ }
+ catch(SecurityException se) {
+ se.printStackTrace();
+ }
+
+
+ return true;
+
+ }
+
+ private void generateKey() throws FingerprintException {
+ try {
+ // Get the reference to the key store
+ keyStore = KeyStore.getInstance("AndroidKeyStore");
+
+ // Key generator to generate the key
+ keyGenerator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES, "AndroidKeyStore");
+
+ keyStore.load(null);
+ keyGenerator.init( new
+ KeyGenParameterSpec.Builder(KEY_NAME,
+ KeyProperties.PURPOSE_ENCRYPT |
+ KeyProperties.PURPOSE_DECRYPT)
+ .setBlockModes(KeyProperties.BLOCK_MODE_CBC)
+ .setUserAuthenticationRequired(true)
+ .setEncryptionPaddings(
+ KeyProperties.ENCRYPTION_PADDING_PKCS7)
+ .build());
+
+ keyGenerator.generateKey();
+
+ }
+ catch(KeyStoreException
+ | NoSuchAlgorithmException
+ | NoSuchProviderException
+ | InvalidAlgorithmParameterException
+ | CertificateException
+ | IOException exc) {
+ exc.printStackTrace();
+ throw new FingerprintException(exc);
+ }
+
+
+ }
+
+ private Cipher generateCipher() throws FingerprintException {
+ try {
+ Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/"
+ + KeyProperties.BLOCK_MODE_CBC + "/"
+ + KeyProperties.ENCRYPTION_PADDING_PKCS7);
+ SecretKey key = (SecretKey) keyStore.getKey(KEY_NAME,
+ null);
+ cipher.init(Cipher.ENCRYPT_MODE, key);
+ return cipher;
+ }
+ catch (NoSuchAlgorithmException
+ | NoSuchPaddingException
+ | InvalidKeyException
+ | UnrecoverableKeyException
+ | KeyStoreException exc) {
+ exc.printStackTrace();
+ throw new FingerprintException(exc);
+ }
+ }
+
+ private class FingerprintException extends Exception {
+
+ public FingerprintException(Exception e) {
+ super(e);
+ }
+ }
+}
\ No newline at end of file
diff --git a/FingerprintAuthentication/app/src/main/res/layout/activity_main.xml b/FingerprintAuthentication/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..4992756
--- /dev/null
+++ b/FingerprintAuthentication/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FingerprintAuthentication/app/src/main/res/mipmap-hdpi/ic_launcher.png b/FingerprintAuthentication/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..cde69bc
Binary files /dev/null and b/FingerprintAuthentication/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/FingerprintAuthentication/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/FingerprintAuthentication/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..9a078e3
Binary files /dev/null and b/FingerprintAuthentication/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/FingerprintAuthentication/app/src/main/res/mipmap-mdpi/ic_launcher.png b/FingerprintAuthentication/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c133a0c
Binary files /dev/null and b/FingerprintAuthentication/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/FingerprintAuthentication/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/FingerprintAuthentication/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..efc028a
Binary files /dev/null and b/FingerprintAuthentication/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/FingerprintAuthentication/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/FingerprintAuthentication/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..bfa42f0
Binary files /dev/null and b/FingerprintAuthentication/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/FingerprintAuthentication/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/FingerprintAuthentication/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..3af2608
Binary files /dev/null and b/FingerprintAuthentication/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/FingerprintAuthentication/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/FingerprintAuthentication/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..324e72c
Binary files /dev/null and b/FingerprintAuthentication/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/FingerprintAuthentication/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/FingerprintAuthentication/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..9bec2e6
Binary files /dev/null and b/FingerprintAuthentication/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/FingerprintAuthentication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/FingerprintAuthentication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..aee44e1
Binary files /dev/null and b/FingerprintAuthentication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/FingerprintAuthentication/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/FingerprintAuthentication/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..34947cd
Binary files /dev/null and b/FingerprintAuthentication/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/FingerprintAuthentication/app/src/main/res/values/colors.xml b/FingerprintAuthentication/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..2a12c47
--- /dev/null
+++ b/FingerprintAuthentication/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #3F51B5
+ #303F9F
+ #FF4081
+
diff --git a/FingerprintAuthentication/app/src/main/res/values/dimens.xml b/FingerprintAuthentication/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..0a7d9a5
--- /dev/null
+++ b/FingerprintAuthentication/app/src/main/res/values/dimens.xml
@@ -0,0 +1,5 @@
+
+
+ 16dp
+ 16dp
+
\ No newline at end of file
diff --git a/FingerprintAuthentication/app/src/main/res/values/ids.xml b/FingerprintAuthentication/app/src/main/res/values/ids.xml
new file mode 100644
index 0000000..5d0f6e2
--- /dev/null
+++ b/FingerprintAuthentication/app/src/main/res/values/ids.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/FingerprintAuthentication/app/src/main/res/values/strings.xml b/FingerprintAuthentication/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..e0f9000
--- /dev/null
+++ b/FingerprintAuthentication/app/src/main/res/values/strings.xml
@@ -0,0 +1,4 @@
+
+ Fingerprint Authentication
+ AndroidKeyStore
+
diff --git a/FingerprintAuthentication/app/src/main/res/values/styles.xml b/FingerprintAuthentication/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..6f19b47
--- /dev/null
+++ b/FingerprintAuthentication/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/FingerprintAuthentication/app/src/test/java/com/example/dhruv/fingerprintauthentication/ExampleUnitTest.java b/FingerprintAuthentication/app/src/test/java/com/example/dhruv/fingerprintauthentication/ExampleUnitTest.java
new file mode 100644
index 0000000..335fb48
--- /dev/null
+++ b/FingerprintAuthentication/app/src/test/java/com/example/dhruv/fingerprintauthentication/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.example.dhruv.fingerprintauthentication;
+
+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/FingerprintAuthentication/build.gradle b/FingerprintAuthentication/build.gradle
new file mode 100644
index 0000000..6514a0b
--- /dev/null
+++ b/FingerprintAuthentication/build.gradle
@@ -0,0 +1,23 @@
+// 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.3'
+
+ // 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/FingerprintAuthentication/gradle.properties b/FingerprintAuthentication/gradle.properties
new file mode 100644
index 0000000..3530b01
--- /dev/null
+++ b/FingerprintAuthentication/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/FingerprintAuthentication/gradle/wrapper/gradle-wrapper.jar b/FingerprintAuthentication/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
Binary files /dev/null and b/FingerprintAuthentication/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/FingerprintAuthentication/gradle/wrapper/gradle-wrapper.properties b/FingerprintAuthentication/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..44fcb98
--- /dev/null
+++ b/FingerprintAuthentication/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Oct 06 11:37:17 IST 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/FingerprintAuthentication/gradlew b/FingerprintAuthentication/gradlew
new file mode 100644
index 0000000..9d82f78
--- /dev/null
+++ b/FingerprintAuthentication/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/FingerprintAuthentication/gradlew.bat b/FingerprintAuthentication/gradlew.bat
new file mode 100755
index 0000000..aec9973
--- /dev/null
+++ b/FingerprintAuthentication/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/FingerprintAuthentication/settings.gradle b/FingerprintAuthentication/settings.gradle
new file mode 100644
index 0000000..d3db109
--- /dev/null
+++ b/FingerprintAuthentication/settings.gradle
@@ -0,0 +1 @@
+include ':app'
diff --git a/GeoFence/.gitignore b/GeoFence/.gitignore
new file mode 100644
index 0000000..a4c7838
--- /dev/null
+++ b/GeoFence/.gitignore
@@ -0,0 +1,9 @@
+*.iml
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/GeoFence/.idea/compiler.xml b/GeoFence/.idea/compiler.xml
new file mode 100644
index 0000000..96cc43e
--- /dev/null
+++ b/GeoFence/.idea/compiler.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GeoFence/.idea/copyright/profiles_settings.xml b/GeoFence/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..c7d1c5a
--- /dev/null
+++ b/GeoFence/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/GeoFence/.idea/gradle.xml b/GeoFence/.idea/gradle.xml
new file mode 100644
index 0000000..7ac24c7
--- /dev/null
+++ b/GeoFence/.idea/gradle.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GeoFence/.idea/misc.xml b/GeoFence/.idea/misc.xml
new file mode 100644
index 0000000..5d19981
--- /dev/null
+++ b/GeoFence/.idea/misc.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GeoFence/.idea/modules.xml b/GeoFence/.idea/modules.xml
new file mode 100644
index 0000000..a1df8d8
--- /dev/null
+++ b/GeoFence/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GeoFence/.idea/runConfigurations.xml b/GeoFence/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/GeoFence/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GeoFence/app/.gitignore b/GeoFence/app/.gitignore
new file mode 100644
index 0000000..3543521
--- /dev/null
+++ b/GeoFence/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/GeoFence/app/build.gradle b/GeoFence/app/build.gradle
new file mode 100644
index 0000000..a45b1d0
--- /dev/null
+++ b/GeoFence/app/build.gradle
@@ -0,0 +1,32 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 25
+ buildToolsVersion "26.0.2"
+ defaultConfig {
+ applicationId "com.example.dhruv.geofence"
+ minSdkVersion 21
+ targetSdkVersion 25
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ 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'
+
+ })
+ compile 'com.android.support:appcompat-v7:25.3.1'
+ compile 'com.android.support.constraint:constraint-layout:1.0.2'
+ compile 'com.google.android.gms:play-services:11.0.4'
+ testCompile 'junit:junit:4.12'
+}
diff --git a/GeoFence/app/proguard-rules.pro b/GeoFence/app/proguard-rules.pro
new file mode 100644
index 0000000..775e288
--- /dev/null
+++ b/GeoFence/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\Dhruv\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/GeoFence/app/src/androidTest/java/com/example/dhruv/geofence/ExampleInstrumentedTest.java b/GeoFence/app/src/androidTest/java/com/example/dhruv/geofence/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..0c55e84
--- /dev/null
+++ b/GeoFence/app/src/androidTest/java/com/example/dhruv/geofence/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.example.dhruv.geofence;
+
+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.dhruv.geofence", appContext.getPackageName());
+ }
+}
diff --git a/GeoFence/app/src/main/AndroidManifest.xml b/GeoFence/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..d3659b2
--- /dev/null
+++ b/GeoFence/app/src/main/AndroidManifest.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GeoFence/app/src/main/java/com/example/dhruv/geofence/Constants.java b/GeoFence/app/src/main/java/com/example/dhruv/geofence/Constants.java
new file mode 100644
index 0000000..83c5565
--- /dev/null
+++ b/GeoFence/app/src/main/java/com/example/dhruv/geofence/Constants.java
@@ -0,0 +1,27 @@
+package com.example.dhruv.geofence;
+
+/**
+ * Created by Dhruv on 06-Oct-17.
+ */
+
+import com.google.android.gms.maps.model.LatLng;
+
+import java.util.HashMap;
+
+
+public class Constants {
+
+ public static final long GEOFENCE_EXPIRATION_IN_MILLISECONDS = 12 * 60 * 60 * 1000;
+ public static final float GEOFENCE_RADIUS_IN_METERS = 20;
+
+ public static final HashMap LANDMARKS = new HashMap();
+ static {
+ // K.J somaiya College of Engineering
+ LANDMARKS.put("College", new LatLng(19.0731, 72.8998));
+
+ // Shiv Shakti Heights
+ LANDMARKS.put("Home", new LatLng(19.0835, 72.9101));
+
+
+ }
+}
\ No newline at end of file
diff --git a/GeoFence/app/src/main/java/com/example/dhruv/geofence/GeofenceTransitionsIntentService.java b/GeoFence/app/src/main/java/com/example/dhruv/geofence/GeofenceTransitionsIntentService.java
new file mode 100644
index 0000000..f783901
--- /dev/null
+++ b/GeoFence/app/src/main/java/com/example/dhruv/geofence/GeofenceTransitionsIntentService.java
@@ -0,0 +1,77 @@
+package com.example.dhruv.geofence;
+
+import android.app.IntentService;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.app.TaskStackBuilder;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Color;
+import android.support.v4.app.NotificationCompat;
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.google.android.gms.location.Geofence;
+import com.google.android.gms.location.GeofenceStatusCodes;
+import com.google.android.gms.location.GeofencingEvent;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Dhruv on 06-Oct-17.
+ */
+
+public class GeofenceTransitionsIntentService extends IntentService {
+ protected static final String TAG = "GeofenceTransitionsIS";
+
+ public GeofenceTransitionsIntentService() {
+ super(TAG); // use TAG to name the IntentService worker thread
+ }
+
+ @Override
+ protected void onHandleIntent(Intent intent) {
+ GeofencingEvent event = GeofencingEvent.fromIntent(intent);
+ if (event.hasError()) {
+ Log.e(TAG, "GeofencingEvent Error: " + event.getErrorCode());
+ return;
+ }
+ String description = getGeofenceTransitionDetails(event);
+ sendNotification(description);
+ }
+ private static String getGeofenceTransitionDetails(GeofencingEvent event) {
+ String transitionString =
+ GeofenceStatusCodes.getStatusCodeString(event.getGeofenceTransition());
+ List triggeringIDs = new ArrayList();
+ for (Geofence geofence : event.getTriggeringGeofences()) {
+ triggeringIDs.add(geofence.getRequestId());
+ }
+ return String.format("%s: %s", transitionString, TextUtils.join(", ", triggeringIDs));
+ }
+
+ private void sendNotification(String notificationDetails) {
+ // Create an explicit content Intent that starts MainActivity.
+ Intent notificationIntent = new Intent(getApplicationContext(), MainActivity.class);
+
+ // Get a PendingIntent containing the entire back stack.
+ TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);
+ stackBuilder.addParentStack(MainActivity.class).addNextIntent(notificationIntent);
+ PendingIntent notificationPendingIntent =
+ stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);
+
+ // Get a notification builder that's compatible with platform versions >= 4
+ NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
+
+ // Define the notification settings.
+ builder.setColor(Color.RED)
+ .setContentTitle(notificationDetails)
+ .setContentText("Click notification to return to App")
+ .setContentIntent(notificationPendingIntent)
+ .setAutoCancel(true);
+
+ // Fire and notify the built Notification.
+ NotificationManager notificationManager =
+ (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
+ notificationManager.notify(0, builder.build());
+ }
+}
diff --git a/GeoFence/app/src/main/java/com/example/dhruv/geofence/MainActivity.java b/GeoFence/app/src/main/java/com/example/dhruv/geofence/MainActivity.java
new file mode 100644
index 0000000..ab38373
--- /dev/null
+++ b/GeoFence/app/src/main/java/com/example/dhruv/geofence/MainActivity.java
@@ -0,0 +1,144 @@
+package com.example.dhruv.geofence;
+
+
+import android.app.PendingIntent;
+import android.content.Intent;
+import android.os.Bundle;
+import android.app.Activity;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.view.View;
+import android.widget.Button;
+import android.widget.Toast;
+
+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.android.gms.location.Geofence;
+import com.google.android.gms.location.GeofencingRequest;
+import com.google.android.gms.location.LocationServices;
+import com.google.android.gms.maps.model.LatLng;
+
+import java.util.ArrayList;
+import java.util.Map;
+
+public class MainActivity extends Activity
+ implements
+ GoogleApiClient.ConnectionCallbacks,
+ GoogleApiClient.OnConnectionFailedListener,
+ ResultCallback
+{
+ protected ArrayList mGeofenceList;
+ protected GoogleApiClient mGoogleApiClient;
+ private Button mAddGeofencesButton;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+ mAddGeofencesButton = (Button) findViewById(R.id.add_geofences_button);
+ // Empty list for storing geofences.
+ mGeofenceList = new ArrayList();
+
+ // Get the geofences used. Geofence data is hard coded in this sample.
+ populateGeofenceList();
+
+ // Kick off the request to build GoogleApiClient.
+ buildGoogleApiClient();
+ }
+ public void populateGeofenceList() {
+ for (Map.Entry entry : Constants.LANDMARKS.entrySet()) {
+ mGeofenceList.add(new Geofence.Builder()
+ .setRequestId(entry.getKey())
+ .setCircularRegion(
+ entry.getValue().latitude,
+ entry.getValue().longitude,
+ Constants.GEOFENCE_RADIUS_IN_METERS
+ )
+ .setExpirationDuration(Constants.GEOFENCE_EXPIRATION_IN_MILLISECONDS)
+ .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER |
+ Geofence.GEOFENCE_TRANSITION_EXIT)
+ .build());
+ }
+ }
+ protected synchronized void buildGoogleApiClient() {
+ mGoogleApiClient = new GoogleApiClient.Builder(this)
+ .addConnectionCallbacks(this)
+ .addOnConnectionFailedListener(this)
+ .addApi(LocationServices.API)
+ .build();
+ }
+ @Override
+ public void onConnected(@Nullable Bundle bundle) {
+
+ }
+
+ @Override
+ public void onConnectionSuspended(int cause) {
+ mGoogleApiClient.connect();
+ }
+
+ @Override
+ public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
+
+ }
+
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+ if (!mGoogleApiClient.isConnecting() || !mGoogleApiClient.isConnected()) {
+ mGoogleApiClient.connect();
+ }
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ if (mGoogleApiClient.isConnecting() || mGoogleApiClient.isConnected()) {
+ mGoogleApiClient.disconnect();
+ }
+ }
+
+ public void addGeofencesButtonHandler(View view) {
+ if (!mGoogleApiClient.isConnected()) {
+ Toast.makeText(this, "Google API Client not connected!", Toast.LENGTH_SHORT).show();
+ return;
+ }
+
+ try {
+ LocationServices.GeofencingApi.addGeofences(
+ mGoogleApiClient,
+ getGeofencingRequest(),
+ getGeofencePendingIntent()
+ ).setResultCallback(this); // Result processed in onResult().
+ } catch (SecurityException securityException) {
+ // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.
+ }
+ }
+
+ private GeofencingRequest getGeofencingRequest() {
+ GeofencingRequest.Builder builder = new GeofencingRequest.Builder();
+ builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER);
+ builder.addGeofences(mGeofenceList);
+ return builder.build();
+ }
+
+ private PendingIntent getGeofencePendingIntent() {
+ Intent intent = new Intent(this, GeofenceTransitionsIntentService.class);
+ // We use FLAG_UPDATE_CURRENT so that we get the same pending intent back when calling addgeoFences()
+ return PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
+ }
+ public void onResult(Status status) {
+ if (status.isSuccess()) {
+ Toast.makeText(
+ this,
+ "Geofences Added",
+ Toast.LENGTH_SHORT
+ ).show();
+ } else {
+ // Get the status code for the error and log it using a user-friendly message.
+
+ }
+ }
+}
diff --git a/GeoFence/app/src/main/res/layout/activity_main.xml b/GeoFence/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..1e71294
--- /dev/null
+++ b/GeoFence/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/GeoFence/app/src/main/res/mipmap-hdpi/ic_launcher.png b/GeoFence/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..cde69bc
Binary files /dev/null and b/GeoFence/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/GeoFence/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/GeoFence/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..9a078e3
Binary files /dev/null and b/GeoFence/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/GeoFence/app/src/main/res/mipmap-mdpi/ic_launcher.png b/GeoFence/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c133a0c
Binary files /dev/null and b/GeoFence/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/GeoFence/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/GeoFence/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..efc028a
Binary files /dev/null and b/GeoFence/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/GeoFence/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/GeoFence/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..bfa42f0
Binary files /dev/null and b/GeoFence/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/GeoFence/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/GeoFence/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..3af2608
Binary files /dev/null and b/GeoFence/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/GeoFence/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/GeoFence/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..324e72c
Binary files /dev/null and b/GeoFence/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/GeoFence/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/GeoFence/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..9bec2e6
Binary files /dev/null and b/GeoFence/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/GeoFence/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/GeoFence/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..aee44e1
Binary files /dev/null and b/GeoFence/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/GeoFence/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/GeoFence/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..34947cd
Binary files /dev/null and b/GeoFence/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/GeoFence/app/src/main/res/values/colors.xml b/GeoFence/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..2a12c47
--- /dev/null
+++ b/GeoFence/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #3F51B5
+ #303F9F
+ #FF4081
+
diff --git a/GeoFence/app/src/main/res/values/strings.xml b/GeoFence/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..b1db158
--- /dev/null
+++ b/GeoFence/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ GeoFence
+
diff --git a/GeoFence/app/src/main/res/values/styles.xml b/GeoFence/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..6f19b47
--- /dev/null
+++ b/GeoFence/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/GeoFence/app/src/test/java/com/example/dhruv/geofence/ExampleUnitTest.java b/GeoFence/app/src/test/java/com/example/dhruv/geofence/ExampleUnitTest.java
new file mode 100644
index 0000000..93dc2e7
--- /dev/null
+++ b/GeoFence/app/src/test/java/com/example/dhruv/geofence/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.example.dhruv.geofence;
+
+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/GeoFence/build.gradle b/GeoFence/build.gradle
new file mode 100644
index 0000000..6514a0b
--- /dev/null
+++ b/GeoFence/build.gradle
@@ -0,0 +1,23 @@
+// 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.3'
+
+ // 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/GeoFence/gradle.properties b/GeoFence/gradle.properties
new file mode 100644
index 0000000..3530b01
--- /dev/null
+++ b/GeoFence/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/GeoFence/gradle/wrapper/gradle-wrapper.jar b/GeoFence/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
Binary files /dev/null and b/GeoFence/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/GeoFence/gradle/wrapper/gradle-wrapper.properties b/GeoFence/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..93c10fd
--- /dev/null
+++ b/GeoFence/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Oct 06 17:21:53 IST 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/GeoFence/gradlew b/GeoFence/gradlew
new file mode 100644
index 0000000..9d82f78
--- /dev/null
+++ b/GeoFence/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/GeoFence/gradlew.bat b/GeoFence/gradlew.bat
new file mode 100755
index 0000000..aec9973
--- /dev/null
+++ b/GeoFence/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/GeoFence/settings.gradle b/GeoFence/settings.gradle
new file mode 100644
index 0000000..d3db109
--- /dev/null
+++ b/GeoFence/settings.gradle
@@ -0,0 +1 @@
+include ':app'
diff --git a/test1.tar.gz b/test1.tar.gz
new file mode 100644
index 0000000..c0bcb88
Binary files /dev/null and b/test1.tar.gz differ
diff --git a/test1/.gitignore b/test1/.gitignore
new file mode 100644
index 0000000..39fb081
--- /dev/null
+++ b/test1/.gitignore
@@ -0,0 +1,9 @@
+*.iml
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/test1/.idea/compiler.xml b/test1/.idea/compiler.xml
new file mode 100644
index 0000000..96cc43e
--- /dev/null
+++ b/test1/.idea/compiler.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test1/.idea/copyright/profiles_settings.xml b/test1/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..e7bedf3
--- /dev/null
+++ b/test1/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/test1/.idea/gradle.xml b/test1/.idea/gradle.xml
new file mode 100644
index 0000000..7ac24c7
--- /dev/null
+++ b/test1/.idea/gradle.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test1/.idea/misc.xml b/test1/.idea/misc.xml
new file mode 100644
index 0000000..cca2cda
--- /dev/null
+++ b/test1/.idea/misc.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test1/.idea/modules.xml b/test1/.idea/modules.xml
new file mode 100644
index 0000000..2b5631a
--- /dev/null
+++ b/test1/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test1/.idea/runConfigurations.xml b/test1/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/test1/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test1/app/.gitignore b/test1/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/test1/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/test1/app/build.gradle b/test1/app/build.gradle
new file mode 100644
index 0000000..55ccadf
--- /dev/null
+++ b/test1/app/build.gradle
@@ -0,0 +1,30 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 26
+ buildToolsVersion "26.0.1"
+ defaultConfig {
+ applicationId "com.example.lokhandmanav.test1"
+ minSdkVersion 19
+ targetSdkVersion 26
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ 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'
+ })
+ compile 'com.android.support:appcompat-v7:26.+'
+ compile 'com.android.support.constraint:constraint-layout:1.0.2'
+ testCompile 'junit:junit:4.12'
+}
diff --git a/test1/app/proguard-rules.pro b/test1/app/proguard-rules.pro
new file mode 100644
index 0000000..49e10c4
--- /dev/null
+++ b/test1/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 /home/lokhandmanav/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/test1/app/src/androidTest/java/com/example/lokhandmanav/test1/ExampleInstrumentedTest.java b/test1/app/src/androidTest/java/com/example/lokhandmanav/test1/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..cf005e9
--- /dev/null
+++ b/test1/app/src/androidTest/java/com/example/lokhandmanav/test1/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.example.lokhandmanav.test1;
+
+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.lokhandmanav.test1", appContext.getPackageName());
+ }
+}
diff --git a/test1/app/src/main/AndroidManifest.xml b/test1/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..e2698e8
--- /dev/null
+++ b/test1/app/src/main/AndroidManifest.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test1/app/src/main/java/com/example/lokhandmanav/test1/MainActivity.java b/test1/app/src/main/java/com/example/lokhandmanav/test1/MainActivity.java
new file mode 100644
index 0000000..0c3abe3
--- /dev/null
+++ b/test1/app/src/main/java/com/example/lokhandmanav/test1/MainActivity.java
@@ -0,0 +1,103 @@
+package com.example.lokhandmanav.test1;
+
+
+import android.content.Context;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.*;
+import android.net.wifi.WifiManager;
+import android.net.wifi.WifiInfo;
+
+
+public class MainActivity extends AppCompatActivity {
+ WifiManager wifimanager;
+ String mac = "86:73:03:c7:fc:4c";
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ Button button = (Button)findViewById(R.id.Submit);
+ Switch wifi = (Switch)findViewById(R.id.wifiSwitch);
+
+ wifi.setOnCheckedChangeListener(
+ new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton compoundButton, boolean on) {
+ if(on)
+ {
+
+ wifimanager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
+ wifimanager.setWifiEnabled(true);
+
+ }
+ else {
+
+ wifimanager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
+ wifimanager.setWifiEnabled(false);
+ }
+ }
+ }
+
+ );
+
+
+ button.setOnClickListener(
+ new Button.OnClickListener(){
+ public void onClick(View v){
+ wifimanager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
+ WifiInfo wifiInfo = wifimanager.getConnectionInfo();
+ String macCheck = (String)wifiInfo.getBSSID();
+ TextView text = (TextView)findViewById(R.id.textView1);
+ TextView text2 = (TextView)findViewById(R.id.textView2);
+ text2.setText(macCheck) ;
+ if(mac.contentEquals(macCheck))
+ {
+ text.setText("Sarvang Present!");
+ }
+ else
+ {
+ text.setText("Failed!");
+ }
+
+ }
+ }
+ );
+
+
+ }
+
+ @Override
+ protected void onStart(){
+ super.onStart();
+
+ }
+ @Override
+ protected void onResume(){
+ super.onResume();
+
+ }
+ @Override
+ protected void onPause(){
+ super.onPause();
+
+ }
+ @Override
+ protected void onStop(){
+ super.onStop();
+
+ }
+ @Override
+ protected void onRestart(){
+ super.onRestart();
+
+ }
+ @Override
+ protected void onDestroy(){
+ super.onDestroy();
+
+ }
+
+
+}
diff --git a/test1/app/src/main/res/layout/activity_main.xml b/test1/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..7794694
--- /dev/null
+++ b/test1/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test1/app/src/main/res/mipmap-hdpi/ic_launcher.png b/test1/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..cde69bc
Binary files /dev/null and b/test1/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/test1/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/test1/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..9a078e3
Binary files /dev/null and b/test1/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/test1/app/src/main/res/mipmap-mdpi/ic_launcher.png b/test1/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c133a0c
Binary files /dev/null and b/test1/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/test1/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/test1/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..efc028a
Binary files /dev/null and b/test1/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/test1/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/test1/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..bfa42f0
Binary files /dev/null and b/test1/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/test1/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/test1/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..3af2608
Binary files /dev/null and b/test1/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/test1/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/test1/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..324e72c
Binary files /dev/null and b/test1/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/test1/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/test1/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..9bec2e6
Binary files /dev/null and b/test1/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/test1/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/test1/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..aee44e1
Binary files /dev/null and b/test1/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/test1/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/test1/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..34947cd
Binary files /dev/null and b/test1/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/test1/app/src/main/res/values/colors.xml b/test1/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..3ab3e9c
--- /dev/null
+++ b/test1/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #3F51B5
+ #303F9F
+ #FF4081
+
diff --git a/test1/app/src/main/res/values/strings.xml b/test1/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..0356109
--- /dev/null
+++ b/test1/app/src/main/res/values/strings.xml
@@ -0,0 +1,9 @@
+
+ test1
+ Go!
+ Bosdike
+ Wifi
+ Get Mac
+ Mac will be Visible here
+ door
+
diff --git a/test1/app/src/main/res/values/styles.xml b/test1/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..5885930
--- /dev/null
+++ b/test1/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/test1/app/src/test/java/com/example/lokhandmanav/test1/ExampleUnitTest.java b/test1/app/src/test/java/com/example/lokhandmanav/test1/ExampleUnitTest.java
new file mode 100644
index 0000000..e70b589
--- /dev/null
+++ b/test1/app/src/test/java/com/example/lokhandmanav/test1/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.example.lokhandmanav.test1;
+
+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/test1/build.gradle b/test1/build.gradle
new file mode 100644
index 0000000..c2eea8e
--- /dev/null
+++ b/test1/build.gradle
@@ -0,0 +1,23 @@
+// 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.3'
+
+ // 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/test1/gradle.properties b/test1/gradle.properties
new file mode 100644
index 0000000..aac7c9b
--- /dev/null
+++ b/test1/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/test1/gradle/wrapper/gradle-wrapper.jar b/test1/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
Binary files /dev/null and b/test1/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/test1/gradle/wrapper/gradle-wrapper.properties b/test1/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..fd3d718
--- /dev/null
+++ b/test1/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Oct 06 13:28:03 IST 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/test1/gradlew b/test1/gradlew
new file mode 100755
index 0000000..9d82f78
--- /dev/null
+++ b/test1/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/test1/gradlew.bat b/test1/gradlew.bat
new file mode 100644
index 0000000..aec9973
--- /dev/null
+++ b/test1/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/test1/settings.gradle b/test1/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/test1/settings.gradle
@@ -0,0 +1 @@
+include ':app'