commit 862523813f944ee668b744bc107866230ea1f4ad Author: flavienhaas Date: Sat Jun 4 19:42:54 2016 +0200 Initial commit diff --git a/.gradle/2.10/taskArtifacts/cache.properties b/.gradle/2.10/taskArtifacts/cache.properties new file mode 100644 index 0000000..742cc21 --- /dev/null +++ b/.gradle/2.10/taskArtifacts/cache.properties @@ -0,0 +1 @@ +#Sun May 22 19:33:25 CEST 2016 diff --git a/.gradle/2.10/taskArtifacts/cache.properties.lock b/.gradle/2.10/taskArtifacts/cache.properties.lock new file mode 100644 index 0000000..1145f02 Binary files /dev/null and b/.gradle/2.10/taskArtifacts/cache.properties.lock differ diff --git a/.gradle/2.10/taskArtifacts/fileHashes.bin b/.gradle/2.10/taskArtifacts/fileHashes.bin new file mode 100644 index 0000000..94420fe Binary files /dev/null and b/.gradle/2.10/taskArtifacts/fileHashes.bin differ diff --git a/.gradle/2.10/taskArtifacts/fileSnapshots.bin b/.gradle/2.10/taskArtifacts/fileSnapshots.bin new file mode 100644 index 0000000..eeb2e0a Binary files /dev/null and b/.gradle/2.10/taskArtifacts/fileSnapshots.bin differ diff --git a/.gradle/2.10/taskArtifacts/outputFileStates.bin b/.gradle/2.10/taskArtifacts/outputFileStates.bin new file mode 100644 index 0000000..78f30a4 Binary files /dev/null and b/.gradle/2.10/taskArtifacts/outputFileStates.bin differ diff --git a/.gradle/2.10/taskArtifacts/taskArtifacts.bin b/.gradle/2.10/taskArtifacts/taskArtifacts.bin new file mode 100644 index 0000000..71a66ac Binary files /dev/null and b/.gradle/2.10/taskArtifacts/taskArtifacts.bin differ diff --git a/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin new file mode 100644 index 0000000..9820986 Binary files /dev/null and b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin differ diff --git a/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock new file mode 100644 index 0000000..a81879f Binary files /dev/null and b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock differ diff --git a/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin new file mode 100644 index 0000000..26ef840 Binary files /dev/null and b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin differ diff --git a/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock new file mode 100644 index 0000000..6b6ad6a Binary files /dev/null and b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock differ diff --git a/.gradle/2.8/taskArtifacts/cache.properties b/.gradle/2.8/taskArtifacts/cache.properties new file mode 100644 index 0000000..004c378 --- /dev/null +++ b/.gradle/2.8/taskArtifacts/cache.properties @@ -0,0 +1 @@ +#Sat Jan 23 16:34:59 CET 2016 diff --git a/.gradle/2.8/taskArtifacts/cache.properties.lock b/.gradle/2.8/taskArtifacts/cache.properties.lock new file mode 100644 index 0000000..1afb603 Binary files /dev/null and b/.gradle/2.8/taskArtifacts/cache.properties.lock differ diff --git a/.gradle/2.8/taskArtifacts/fileHashes.bin b/.gradle/2.8/taskArtifacts/fileHashes.bin new file mode 100644 index 0000000..487d1fa Binary files /dev/null and b/.gradle/2.8/taskArtifacts/fileHashes.bin differ diff --git a/.gradle/2.8/taskArtifacts/fileSnapshots.bin b/.gradle/2.8/taskArtifacts/fileSnapshots.bin new file mode 100644 index 0000000..8289153 Binary files /dev/null and b/.gradle/2.8/taskArtifacts/fileSnapshots.bin differ diff --git a/.gradle/2.8/taskArtifacts/outputFileStates.bin b/.gradle/2.8/taskArtifacts/outputFileStates.bin new file mode 100644 index 0000000..e00d02b Binary files /dev/null and b/.gradle/2.8/taskArtifacts/outputFileStates.bin differ diff --git a/.gradle/2.8/taskArtifacts/taskArtifacts.bin b/.gradle/2.8/taskArtifacts/taskArtifacts.bin new file mode 100644 index 0000000..e7d7cd4 Binary files /dev/null and b/.gradle/2.8/taskArtifacts/taskArtifacts.bin differ diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..70fac1b --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +GUI \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..508b3d9 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,23 @@ + + + + + + \ No newline at end of file diff --git a/.idea/libraries/appcompat_v7_23_1_1.xml b/.idea/libraries/appcompat_v7_23_1_1.xml new file mode 100644 index 0000000..5371830 --- /dev/null +++ b/.idea/libraries/appcompat_v7_23_1_1.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/design_23_1_1.xml b/.idea/libraries/design_23_1_1.xml new file mode 100644 index 0000000..4c11b40 --- /dev/null +++ b/.idea/libraries/design_23_1_1.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/hamcrest_core_1_3.xml b/.idea/libraries/hamcrest_core_1_3.xml new file mode 100644 index 0000000..157e3f3 --- /dev/null +++ b/.idea/libraries/hamcrest_core_1_3.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/junit_4_12.xml b/.idea/libraries/junit_4_12.xml new file mode 100644 index 0000000..305df30 --- /dev/null +++ b/.idea/libraries/junit_4_12.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/recyclerview_v7_23_1_1.xml b/.idea/libraries/recyclerview_v7_23_1_1.xml new file mode 100644 index 0000000..95c83fb --- /dev/null +++ b/.idea/libraries/recyclerview_v7_23_1_1.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/support_annotations_23_1_1.xml b/.idea/libraries/support_annotations_23_1_1.xml new file mode 100644 index 0000000..eec3bce --- /dev/null +++ b/.idea/libraries/support_annotations_23_1_1.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/support_v4_23_1_1.xml b/.idea/libraries/support_v4_23_1_1.xml new file mode 100644 index 0000000..cde5934 --- /dev/null +++ b/.idea/libraries/support_v4_23_1_1.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..e45faed --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..6e3bbba --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/AlarmeDomestique.iml b/AlarmeDomestique.iml new file mode 100644 index 0000000..b075323 --- /dev/null +++ b/AlarmeDomestique.iml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GUI.iml b/GUI.iml new file mode 100644 index 0000000..e9231e3 --- /dev/null +++ b/GUI.iml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app/app.iml b/app/app.iml new file mode 100644 index 0000000..2fb19f2 --- /dev/null +++ b/app/app.iml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..dcb2c25 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,27 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.2" + + defaultConfig { + applicationId "fr.lycee.flavien.alarmedomestique" + minSdkVersion 23 + targetSdkVersion 23 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + testCompile 'junit:junit:4.12' + compile 'com.android.support:appcompat-v7:23.1.1' + compile 'com.android.support:design:23.1.1' +} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..e555bf9 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,17 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in C:\Users\Flavien\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 *; +#} diff --git a/app/src/androidTest/java/fr/lycee/flavien/alarmedomestique/ApplicationTest.java b/app/src/androidTest/java/fr/lycee/flavien/alarmedomestique/ApplicationTest.java new file mode 100644 index 0000000..badebaf --- /dev/null +++ b/app/src/androidTest/java/fr/lycee/flavien/alarmedomestique/ApplicationTest.java @@ -0,0 +1,13 @@ +package fr.lycee.flavien.alarmedomestique; + +import android.app.Application; +import android.test.ApplicationTestCase; + +/** + * Testing Fundamentals + */ +public class ApplicationTest extends ApplicationTestCase { + public ApplicationTest() { + super(Application.class); + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..0f2d0ab --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/ic_launcher-web.png b/app/src/main/ic_launcher-web.png new file mode 100644 index 0000000..151bbae Binary files /dev/null and b/app/src/main/ic_launcher-web.png differ diff --git a/app/src/main/intrusionDetectee-web.png b/app/src/main/intrusionDetectee-web.png new file mode 100644 index 0000000..9029204 Binary files /dev/null and b/app/src/main/intrusionDetectee-web.png differ diff --git a/app/src/main/java/fr/lycee/flavien/alarmedomestique/Accueil.java b/app/src/main/java/fr/lycee/flavien/alarmedomestique/Accueil.java new file mode 100644 index 0000000..ff159e9 --- /dev/null +++ b/app/src/main/java/fr/lycee/flavien/alarmedomestique/Accueil.java @@ -0,0 +1,76 @@ +package fr.lycee.flavien.alarmedomestique; + +import android.app.Notification; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.app.TaskStackBuilder; +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import android.support.design.widget.FloatingActionButton; +import android.support.design.widget.Snackbar; +import android.support.v4.app.NotificationCompat; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.Toolbar; +import android.view.View; +import android.view.Menu; +import android.view.MenuItem; + + +public class Accueil extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_accueil); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + + FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); + fab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + Snackbar.make(view, "Rafraichissement de la photo", Snackbar.LENGTH_LONG) + .setAction("Action", null).show(); + } + }); + } +public void simulerIntrusion(View v) +{ + NotificationCompat.Builder builder = new NotificationCompat.Builder(this); + builder.setSmallIcon(R.drawable.ic_stat_name); + builder.setContentTitle("Projet STI2D"); + builder.setContentText("Spécialité SIN"); + Intent intent = new Intent(this,SecondClass.class); + TaskStackBuilder stackBuilder = TaskStackBuilder.create(this); + stackBuilder.addParentStack(SecondClass.class); + stackBuilder.addNextIntent(intent); + PendingIntent pendingIntent = stackBuilder.getPendingIntent(0,PendingIntent.FLAG_UPDATE_CURRENT); + builder.setContentIntent(pendingIntent); + NotificationManager NM = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NM.notify(0,builder.build()); +} + + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.menu_accueil, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } +} diff --git a/app/src/main/java/fr/lycee/flavien/alarmedomestique/Content.java b/app/src/main/java/fr/lycee/flavien/alarmedomestique/Content.java new file mode 100644 index 0000000..2714b49 --- /dev/null +++ b/app/src/main/java/fr/lycee/flavien/alarmedomestique/Content.java @@ -0,0 +1,35 @@ +package fr.lycee.flavien.alarmedomestique; + +import android.app.Activity; +import android.os.Bundle; +import android.webkit.WebView; + +/** + * Created by Flavien on 27/02/2016. + */ + +public class Content extends Activity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.content_accueil); + + String url = "http://10.38.205.155/voleur"; + WebView view=(WebView) this.findViewById(R.id.webView); + view.getSettings().setJavaScriptEnabled(true); + view.loadUrl(url); + } +} + + + + + + + + + + + + + diff --git a/app/src/main/java/fr/lycee/flavien/alarmedomestique/SecondClass.java b/app/src/main/java/fr/lycee/flavien/alarmedomestique/SecondClass.java new file mode 100644 index 0000000..31359f8 --- /dev/null +++ b/app/src/main/java/fr/lycee/flavien/alarmedomestique/SecondClass.java @@ -0,0 +1,21 @@ +package fr.lycee.flavien.alarmedomestique; + +import android.app.Activity; +import android.os.Bundle; +import android.webkit.WebView; + +/** + * Created by Flavien on 01/02/2016. + */ +public class SecondClass extends Activity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.second_layout); + + String url = "http://auto.ferrari.com/fr_FR/wp-content/uploads/sites/13/2014/09/FF-thumb.jpg"; + WebView view=(WebView) this.findViewById(R.id.webView); + view.getSettings().setJavaScriptEnabled(true); + view.loadUrl(url); + } +} diff --git a/app/src/main/res/drawable-hdpi-v11/ic_stat_name.png b/app/src/main/res/drawable-hdpi-v11/ic_stat_name.png new file mode 100644 index 0000000..d690c58 Binary files /dev/null and b/app/src/main/res/drawable-hdpi-v11/ic_stat_name.png differ diff --git a/app/src/main/res/drawable-hdpi-v9/ic_stat_name.png b/app/src/main/res/drawable-hdpi-v9/ic_stat_name.png new file mode 100644 index 0000000..5c64db4 Binary files /dev/null and b/app/src/main/res/drawable-hdpi-v9/ic_stat_name.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_stat_name.png b/app/src/main/res/drawable-hdpi/ic_stat_name.png new file mode 100644 index 0000000..ed9dac2 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_stat_name.png differ diff --git a/app/src/main/res/drawable-mdpi-v11/ic_stat_name.png b/app/src/main/res/drawable-mdpi-v11/ic_stat_name.png new file mode 100644 index 0000000..6a6959e Binary files /dev/null and b/app/src/main/res/drawable-mdpi-v11/ic_stat_name.png differ diff --git a/app/src/main/res/drawable-mdpi-v9/ic_stat_name.png b/app/src/main/res/drawable-mdpi-v9/ic_stat_name.png new file mode 100644 index 0000000..55ebbcb Binary files /dev/null and b/app/src/main/res/drawable-mdpi-v9/ic_stat_name.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_stat_name.png b/app/src/main/res/drawable-mdpi/ic_stat_name.png new file mode 100644 index 0000000..13ae659 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_stat_name.png differ diff --git a/app/src/main/res/drawable-xhdpi-v11/ic_stat_name.png b/app/src/main/res/drawable-xhdpi-v11/ic_stat_name.png new file mode 100644 index 0000000..80ab339 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi-v11/ic_stat_name.png differ diff --git a/app/src/main/res/drawable-xhdpi-v9/ic_stat_name.png b/app/src/main/res/drawable-xhdpi-v9/ic_stat_name.png new file mode 100644 index 0000000..a2281fe Binary files /dev/null and b/app/src/main/res/drawable-xhdpi-v9/ic_stat_name.png differ diff --git a/app/src/main/res/drawable-xhdpi/alarme_anti_intrusion.jpg b/app/src/main/res/drawable-xhdpi/alarme_anti_intrusion.jpg new file mode 100644 index 0000000..25edc84 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/alarme_anti_intrusion.jpg differ diff --git a/app/src/main/res/drawable-xhdpi/ic_stat_name.png b/app/src/main/res/drawable-xhdpi/ic_stat_name.png new file mode 100644 index 0000000..750e1bd Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_stat_name.png differ diff --git a/app/src/main/res/drawable-xxhdpi-v11/ic_stat_name.png b/app/src/main/res/drawable-xxhdpi-v11/ic_stat_name.png new file mode 100644 index 0000000..75c0713 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi-v11/ic_stat_name.png differ diff --git a/app/src/main/res/drawable-xxhdpi-v9/ic_stat_name.png b/app/src/main/res/drawable-xxhdpi-v9/ic_stat_name.png new file mode 100644 index 0000000..97a829b Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi-v9/ic_stat_name.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_stat_name.png b/app/src/main/res/drawable-xxhdpi/ic_stat_name.png new file mode 100644 index 0000000..a607a3d Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_stat_name.png differ diff --git a/app/src/main/res/layout/activity_accueil.xml b/app/src/main/res/layout/activity_accueil.xml new file mode 100644 index 0000000..df1ee7f --- /dev/null +++ b/app/src/main/res/layout/activity_accueil.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/content_accueil.xml b/app/src/main/res/layout/content_accueil.xml new file mode 100644 index 0000000..ccb99cf --- /dev/null +++ b/app/src/main/res/layout/content_accueil.xml @@ -0,0 +1,54 @@ + + + + + +