├── requirements.txt ├── android ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── drawable │ │ │ │ │ ├── logo.png │ │ │ │ │ ├── logo_text.png │ │ │ │ │ ├── launch_screen.png │ │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── values │ │ │ │ │ ├── dimens.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── xml │ │ │ │ │ └── network_security_config.xml │ │ │ │ ├── anim │ │ │ │ │ ├── alpha.xml │ │ │ │ │ └── translate.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── layout │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ ├── activity_splash.xml │ │ │ │ │ └── show_dialog_message.xml │ │ │ │ └── drawable-v24 │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── ypasoft │ │ │ │ │ └── contactracing │ │ │ │ │ ├── helpers │ │ │ │ │ └── PermissionHelper.java │ │ │ │ │ ├── SplashActivity.java │ │ │ │ │ ├── tools │ │ │ │ │ ├── ShowDialogMessage.java │ │ │ │ │ └── TransparentProgressDialog.java │ │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── ypasoft │ │ │ │ └── contactracing │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── ypasoft │ │ │ └── contactracing │ │ │ └── ExampleInstrumentedTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore ├── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── raspberry ├── lib │ ├── __init__.py │ ├── calc.py │ └── iwlist.py └── app.py ├── .gitignore ├── bot └── bot.py ├── web ├── .gitignore ├── views │ ├── error.pug │ ├── layout.pug │ └── index.pug ├── public │ ├── stylesheets │ │ └── style.css │ ├── javascripts │ │ └── tracing.min.js │ └── images │ │ └── Sample.svg ├── models │ ├── position.model.js │ └── schemas │ │ └── position.schema.js ├── routes │ ├── users.js │ ├── index.js │ └── positions.js ├── package.json ├── services │ └── database.service.js ├── app.js ├── yarn-error.log └── bin │ └── www ├── doc ├── .DS_Store └── images │ ├── friis_eq.png │ ├── db_screenshot.png │ ├── trilateration.jpg │ ├── 2d-trilateration.jpg │ ├── db_screenshot_2.png │ ├── main_screenshot.png │ ├── user_interfaces_4.png │ ├── raspberry-screenshot.png │ ├── Floorplan.svg │ ├── Sample.svg │ └── project_banner.svg ├── run.sh ├── .idea ├── .gitignore ├── misc.xml ├── vcs.xml ├── modules.xml └── wifi-tracing.iml ├── Dockerfile ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── README.md └── LICENSE /requirements.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /raspberry/lib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | frontend/node_modules 2 | .idea -------------------------------------------------------------------------------- /bot/bot.py: -------------------------------------------------------------------------------- 1 | # this a fake static positional bot 2 | 3 | -------------------------------------------------------------------------------- /web/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | .idea/* 3 | package-lock.json -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name = "ContacTracing" -------------------------------------------------------------------------------- /doc/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/doc/.DS_Store -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | docker build -t python-script . 2 | docker run -it --rm --name my-python-script python-script -------------------------------------------------------------------------------- /doc/images/friis_eq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/doc/images/friis_eq.png -------------------------------------------------------------------------------- /doc/images/db_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/doc/images/db_screenshot.png -------------------------------------------------------------------------------- /doc/images/trilateration.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/doc/images/trilateration.jpg -------------------------------------------------------------------------------- /doc/images/2d-trilateration.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/doc/images/2d-trilateration.jpg -------------------------------------------------------------------------------- /doc/images/db_screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/doc/images/db_screenshot_2.png -------------------------------------------------------------------------------- /doc/images/main_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/doc/images/main_screenshot.png -------------------------------------------------------------------------------- /doc/images/user_interfaces_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/doc/images/user_interfaces_4.png -------------------------------------------------------------------------------- /web/views/error.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /doc/images/ raspberry-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/doc/images/ raspberry-screenshot.png -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/drawable/logo.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/logo_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/drawable/logo_text.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/drawable/launch_screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15dp 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /web/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /web/views/layout.pug: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | 7 | 8 | body 9 | block content -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joelibaceta/wifi-tracing/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/xml/network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /raspberry/lib/calc.py: -------------------------------------------------------------------------------- 1 | from math import log10 2 | 3 | def dbm2m(frequency, dBm): 4 | 5 | FSPL = 27.55 #Free-Space Path Loss 6 | 7 | m = 10 ** (( FSPL - (20 * log10(frequency)) + abs(dBm) ) / 20 ) 8 | 9 | return round(m, 2) 10 | -------------------------------------------------------------------------------- /web/models/position.model.js: -------------------------------------------------------------------------------- 1 | 2 | const mongoose = require('mongoose'); 3 | const PositionSchema = require('./schemas/position.schema') 4 | 5 | const Position = mongoose.model('Position', PositionSchema); 6 | 7 | module.exports = Position; 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/anim/alpha.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3 2 | 3 | RUN apt update 4 | RUN apt install iw -y 5 | 6 | WORKDIR /usr/src/app 7 | 8 | COPY requirements.txt ./ 9 | RUN pip3 install --no-cache-dir -r requirements.txt 10 | 11 | COPY . . 12 | 13 | CMD [ "python", "./test.py" ] -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Jul 25 23:14:22 COT 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res, next) { 6 | 7 | // res.send('respond with a resource'); 8 | const HARD_CODED_ROUTER_POSITIONS = {"x": 7, "y": 4}; 9 | res.json( HARD_CODED_ROUTER_POSITIONS); 10 | 11 | }); 12 | 13 | module.exports = router; 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #6200EE 4 | #3700B3 5 | #03DAC5 6 | 7 | #727272 8 | #000000 9 | #FFFFFF 10 | 11 | -------------------------------------------------------------------------------- /web/public/javascripts/tracing.min.js: -------------------------------------------------------------------------------- 1 | async function getLastLocaleWifi(){let t=await fetch("http://198.199.73.28:3000/positions/lasted");if(t.ok){printPointsInToSVG(await t.json())}else alert("HTTP-Error: "+t.status)}function printPointsInToSVG(t){var e=document.getElementById("People"),n=(600+5*t.x)%1e3,a=(350+3*t.y)%600;e.setAttribute("transform","translate("+n+" "+a+")")}setInterval(function(){getLastLocaleWifi()},5e3); -------------------------------------------------------------------------------- /web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "contact-me", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "nodemon ./bin/www", 7 | "start": "node ./bin/www" 8 | }, 9 | "dependencies": { 10 | "cookie-parser": "~1.4.4", 11 | "debug": "~2.6.9", 12 | "express": "~4.16.1", 13 | "http-errors": "~1.6.3", 14 | "mongoose": "^5.9.25", 15 | "morgan": "~1.9.1", 16 | "pug": "2.0.0-beta11" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/anim/translate.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /web/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function (req, res, next) { 6 | 7 | let points = [ 8 | {translate: '94 88', color: '#f60600', name: '1'}, 9 | {translate: '385 338', color: '#f60600', name: '2'}, 10 | {translate: '500 200', color: '#f60600', name: '3'}, 11 | ]; 12 | 13 | res.render('index', {title: 'Contact Tracing!', points}); 14 | }); 15 | 16 | module.exports = router; 17 | -------------------------------------------------------------------------------- /.idea/wifi-tracing.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/app/src/test/java/com/ypasoft/contactracing/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.ypasoft.contactracing; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /web/models/schemas/position.schema.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const mongoose = require('mongoose'); 3 | const { Long } = require('bson'); 4 | const Schema = mongoose.Schema; 5 | 6 | let PositionSchema = new Schema({ 7 | id: {type: String, required: [true, 'The id is required.']}, 8 | x: {type: String, required: [true, 'The x is required.']}, 9 | y: {type: String, required: [true, 'The y is required.']}, 10 | timestamp: {type: Date, default: Date.now }, 11 | created_at: {type: String} 12 | }); 13 | 14 | module.exports = PositionSchema; -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ContacTracing 3 | 4 | ALTO 5 | CONFIGURACIÓN 6 | Antes de continuar por favor ACTIVE SU GPS para el correcto funcionamiento de la aplicación. 7 | " Antes de continuar por favor acepte todos los permisos necesarios para el correcto funcionamiento de la aplicación. 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath "com.android.tools.build:gradle:4.0.0" 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | task clean(type: Delete) { 23 | delete rootProject.buildDir 24 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /android/app/src/main/java/com/ypasoft/contactracing/helpers/PermissionHelper.java: -------------------------------------------------------------------------------- 1 | package com.ypasoft.contactracing.helpers; 2 | 3 | import android.Manifest; 4 | import android.app.Activity; 5 | import android.content.pm.PackageManager; 6 | 7 | import androidx.core.app.ActivityCompat; 8 | import androidx.core.content.ContextCompat; 9 | 10 | 11 | public class PermissionHelper { 12 | 13 | 14 | public static final int MY_ACCESS_FINE_LOCATION = 1; 15 | 16 | public static boolean getLocation(Activity activity){ 17 | if (ContextCompat.checkSelfPermission(activity, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { 18 | ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, MY_ACCESS_FINE_LOCATION); 19 | return false; 20 | } 21 | return true; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /android/app/src/androidTest/java/com/ypasoft/contactracing/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.ypasoft.contactracing; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | assertEquals("com.ypasoft.contactracing", appContext.getPackageName()); 25 | } 26 | } -------------------------------------------------------------------------------- /web/services/database.service.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const mongoose = require('mongoose'); 4 | 5 | let params = { 6 | dbUser: "dbuser", 7 | dbPassword: "securepassword", 8 | dbHost: "cluster0.daynf.mongodb.net", 9 | dbPort: "", 10 | dbName: "wifitracingdb" 11 | } 12 | 13 | const MONGO_URI = `mongodb+srv://${params.dbUser}:${params.dbPassword}@${params.dbHost}:${params.dbPort}/${params.dbName}?retryWrites=true&w=majority`; 14 | 15 | const initialize = async () => { 16 | 17 | const options = { 18 | useCreateIndex: true, 19 | useNewUrlParser: true, 20 | useUnifiedTopology: true 21 | }; 22 | 23 | mongoose.Promise = global.Promise; 24 | mongoose.connect(MONGO_URI, options) 25 | .then(() => { 26 | console.log('Mongo Connection Status: Success') 27 | }).catch(err => { 28 | console.log(MONGO_URI) 29 | console.log('Mongo Connection Status:' + err); 30 | } 31 | ); 32 | 33 | } 34 | 35 | module.exports = { initialize }; -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true -------------------------------------------------------------------------------- /android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | 27 | 28 | -------------------------------------------------------------------------------- /raspberry/app.py: -------------------------------------------------------------------------------- 1 | from time import sleep 2 | from lib import iwlist 3 | from lib import calc 4 | 5 | import requests 6 | 7 | 8 | 9 | # For demo purpose only 10 | 11 | REFERENCE_NETWORKS = [ 12 | "dlink-FA14", 13 | "ADMIN*", 14 | "Internet Joel" 15 | ] 16 | 17 | def get_distances(): 18 | content = iwlist.scan(interface='wlan0') 19 | cells = iwlist.parse(content) 20 | 21 | counter = 0 22 | distances = {} 23 | 24 | uri = "http://198.199.73.28:3000/positions/save" 25 | 26 | for cell in cells: 27 | if cell["essid"] in REFERENCE_NETWORKS: 28 | mhz = float(cell["frequency"]) * 1000 29 | dbm = float(cell["signal_level_dBm"]) 30 | essid = cell["essid"] 31 | 32 | distance = calc.dbm2m(mhz, dbm) 33 | 34 | distances[essid] = distance 35 | 36 | counter += 1 37 | 38 | 39 | print(essid + ":" + str(distance)) 40 | # print(cell["signal_quality"]) 41 | # print(cell["signal_total"]) 42 | # print(cell["signal_level_dBm"]) 43 | 44 | payload = {"distances": [ 45 | distances["dlink-FA14"], 46 | distances["ADMIN*"] / 2, 47 | distances["Internet Joel"] 48 | ], "id": "raspberry"} 49 | 50 | r = requests.post(uri, data=payload) 51 | 52 | print(r.text) 53 | 54 | while(True): 55 | sleep(5) 56 | get_distances() -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | buildToolsVersion "30.0.0" 6 | 7 | defaultConfig { 8 | applicationId "com.ypasoft.contactracing" 9 | minSdkVersion 21 10 | targetSdkVersion 28 11 | versionCode 1 12 | versionName "1.0" 13 | 14 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 15 | } 16 | 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | } 24 | 25 | dependencies { 26 | implementation fileTree(dir: "libs", include: ["*.jar"]) 27 | implementation 'androidx.appcompat:appcompat:1.1.0' 28 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 29 | testImplementation 'junit:junit:4.12' 30 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 31 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 32 | implementation "androidx.recyclerview:recyclerview:1.1.0" 33 | // For control over item selection of both touch and mouse driven selection 34 | implementation "androidx.recyclerview:recyclerview-selection:1.1.0-rc01" 35 | implementation 'com.android.volley:volley:1.1.1' 36 | } -------------------------------------------------------------------------------- /web/app.js: -------------------------------------------------------------------------------- 1 | var createError = require('http-errors'); 2 | var express = require('express'); 3 | var path = require('path'); 4 | var cookieParser = require('cookie-parser'); 5 | var logger = require('morgan'); 6 | 7 | var indexRouter = require('./routes/index'); 8 | var usersRouter = require('./routes/users'); 9 | 10 | var app = express(); 11 | 12 | var positionsRouter = require('./routes/positions'); 13 | 14 | const serviceDatabase = require('./services/database.service'); 15 | 16 | var app = express(); 17 | 18 | serviceDatabase.initialize(); 19 | 20 | // view engine setup 21 | app.set('views', path.join(__dirname, 'views')); 22 | app.set('view engine', 'pug'); 23 | 24 | app.use(logger('dev')); 25 | app.use(express.json()); 26 | app.use(express.urlencoded({ extended: false })); 27 | app.use(cookieParser()); 28 | app.use(express.static(path.join(__dirname, 'public'))); 29 | 30 | app.use('/', indexRouter); 31 | app.use('/users', usersRouter); 32 | 33 | app.use('/positions', positionsRouter); 34 | 35 | // catch 404 and forward to error handler 36 | app.use(function(req, res, next) { 37 | next(createError(404)); 38 | }); 39 | 40 | // error handler 41 | app.use(function(err, req, res, next) { 42 | // set locals, only providing error in development 43 | res.locals.message = err.message; 44 | res.locals.error = req.app.get('env') === 'development' ? err : {}; 45 | 46 | // render the error page 47 | res.status(err.status || 500); 48 | res.render('error'); 49 | }); 50 | 51 | module.exports = app; 52 | -------------------------------------------------------------------------------- /web/yarn-error.log: -------------------------------------------------------------------------------- 1 | Arguments: 2 | /Users/ypasoft/.nvm/versions/node/v11.15.0/bin/node /usr/local/Cellar/yarn/1.22.4/libexec/bin/yarn.js dev 3 | 4 | PATH: 5 | /usr/local/opt/php@7.3/bin:/usr/local/opt/libiconv/bin:/usr/local/sbin:/Users/ypasoft/.nvm/versions/node/v11.15.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 6 | 7 | Yarn version: 8 | 1.22.4 9 | 10 | Node version: 11 | 11.15.0 12 | 13 | Platform: 14 | darwin x64 15 | 16 | Trace: 17 | SyntaxError: /Users/ypasoft/develop/wifi-tracing/frontend/package.json: Unexpected token < in JSON at position 278 18 | at JSON.parse () 19 | at /usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:1625:59 20 | at Generator.next () 21 | at step (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:310:30) 22 | at /usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:321:13 23 | 24 | npm manifest: 25 | { 26 | "name": "contact-me", 27 | "version": "0.0.0", 28 | "private": true, 29 | "scripts": { 30 | "dev": "nodemon ./bin/www", 31 | "start": "node ./bin/www" 32 | }, 33 | "dependencies": { 34 | "cookie-parser": "~1.4.4", 35 | "debug": "~2.6.9", 36 | "express": "~4.16.1", 37 | "http-errors": "~1.6.3", 38 | <<<<<<< HEAD 39 | ======= 40 | "mongoose": "^5.9.25", 41 | >>>>>>> 36cb0dfbdbdd743e6f512b7bd9641bd9eb83f1d2 42 | "morgan": "~1.9.1", 43 | "pug": "2.0.0-beta11" 44 | } 45 | } 46 | 47 | yarn manifest: 48 | No manifest 49 | 50 | Lockfile: 51 | No lockfile 52 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 14 | 15 | 19 | 20 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /android/app/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | 23 | 28 | 29 | 30 | 31 | 41 | 42 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /web/routes/positions.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | 5 | 6 | const Position = require('../models/position.model') 7 | 8 | 9 | HARD_CODED_ROUTER_POSITIONS = [ 10 | {"x": 4.5, "y": 4}, 11 | {"x": 0, "y": 0}, 12 | {"x": 7, "y": 4}, 13 | ] 14 | 15 | router.get('/snapshot', function(req, res, next){ 16 | 17 | }); 18 | 19 | router.get('/lasted', async function(req, res, next){ 20 | const lasted = await Position.find().sort({$natural:-1}).limit(1); 21 | res.json(lasted[0]); 22 | }); 23 | 24 | 25 | 26 | router.post('/save', function(req, res, next) { 27 | console.log(req.body) 28 | points = HARD_CODED_ROUTER_POSITIONS // For demo purpose only 29 | 30 | distances = req.body.distances; 31 | 32 | x1 = points[0]["x"] 33 | x2 = points[1]["x"] 34 | x3 = points[2]["x"] 35 | y1 = points[0]["y"] 36 | y2 = points[1]["y"] 37 | y3 = points[2]["y"] 38 | r1 = parseFloat(distances[0]) 39 | r2 = parseFloat(distances[1]) 40 | r3 = parseFloat(distances[2]) 41 | 42 | A = 2*x2 - 2*x1 43 | B = 2*y2 - 2*y1 44 | C = r1**2 - r2**2 - x1**2 + x2**2 - y1**2 + y2**2 45 | D = 2*x3 - 2*x2 46 | E = 2*y3 - 2*y2 47 | F = r2**2 - r3**2 - x2**2 + x3**2 - y2**2 + y3**2 48 | 49 | x = (C*E - F*B) / (E*A - B*D) 50 | y = (C*D - A*F) / (B*D - A*E) 51 | 52 | console.log("x: " + x + " y: " + y) 53 | 54 | let current_millies = new Date().getTime(); 55 | 56 | position_data = { 57 | "id": req.body.id, 58 | "x": x, 59 | "y": y 60 | } 61 | 62 | let newPosition = new Position(position_data); 63 | newPosition.save(function(err) { 64 | if (err) { 65 | // you could avoid http status if you want. I put error 500 66 | return res.status(500).send({ 67 | success: false, 68 | message: err 69 | }); 70 | } 71 | 72 | res.json({x: x, y: y}); 73 | }); 74 | 75 | 76 | }); 77 | 78 | module.exports = router; -------------------------------------------------------------------------------- /web/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('contact-me:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3000'); 16 | app.set('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app); 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port); 29 | server.on('error', onError); 30 | server.on('listening', onListening); 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort(val) { 37 | var port = parseInt(val, 10); 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val; 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError(error) { 57 | if (error.syscall !== 'listen') { 58 | throw error; 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port; 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges'); 69 | process.exit(1); 70 | break; 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use'); 73 | process.exit(1); 74 | break; 75 | default: 76 | throw error; 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening() { 85 | var addr = server.address(); 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port; 89 | debug('Listening on ' + bind); 90 | } 91 | -------------------------------------------------------------------------------- /raspberry/lib/iwlist.py: -------------------------------------------------------------------------------- 1 | import re 2 | import subprocess 3 | 4 | cellNumberRe = re.compile(r"^Cell\s+(?P.+)\s+-\s+Address:\s(?P.+)$") 5 | regexps = [ 6 | re.compile(r"^ESSID:\"(?P.*)\"$"), 7 | re.compile(r"^Protocol:(?P.+)$"), 8 | re.compile(r"^Mode:(?P.+)$"), 9 | re.compile(r"^Frequency:(?P[\d.]+) (?P.+) \(Channel (?P\d+)\)$"), 10 | re.compile(r"^Encryption key:(?P.+)$"), 11 | re.compile(r"^Quality=(?P\d+)/(?P\d+)\s+Signal level=(?P.+) d.+$"), 12 | re.compile(r"^Signal level=(?P\d+)/(?P\d+).*$"), 13 | ] 14 | 15 | wpaRe = re.compile(r"IE:\ WPA\ Version\ 1$") 16 | wpa2Re = re.compile(r"IE:\ IEEE\ 802\.11i/WPA2\ Version\ 1$") 17 | 18 | def scan(interface='wlan0'): 19 | cmd = ["iwlist", interface, "scan"] 20 | proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 21 | points = proc.stdout.read().decode('utf-8') 22 | return points 23 | 24 | def parse(content): 25 | cells = [] 26 | lines = content.split('\n') 27 | for line in lines: 28 | line = line.strip() 29 | cellNumber = cellNumberRe.search(line) 30 | if cellNumber is not None: 31 | cells.append(cellNumber.groupdict()) 32 | continue 33 | wpa = wpaRe.search(line) 34 | if wpa is not None : 35 | cells[-1].update({'encryption':'wpa'}) 36 | wpa2 = wpa2Re.search(line) 37 | if wpa2 is not None : 38 | cells[-1].update({'encryption':'wpa2'}) 39 | for expression in regexps: 40 | result = expression.search(line) 41 | if result is not None: 42 | if 'encryption' in result.groupdict() : 43 | if result.groupdict()['encryption'] == 'on' : 44 | cells[-1].update({'encryption': 'wep'}) 45 | else : 46 | cells[-1].update({'encryption': 'off'}) 47 | else : 48 | cells[-1].update(result.groupdict()) 49 | continue 50 | return cells -------------------------------------------------------------------------------- /android/app/src/main/java/com/ypasoft/contactracing/SplashActivity.java: -------------------------------------------------------------------------------- 1 | package com.ypasoft.contactracing; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | import android.content.Intent; 6 | import android.net.Uri; 7 | import android.os.Bundle; 8 | import android.os.Handler; 9 | import android.provider.Settings; 10 | import android.view.animation.Animation; 11 | import android.view.animation.AnimationUtils; 12 | import android.widget.ImageView; 13 | import android.widget.LinearLayout; 14 | 15 | import com.ypasoft.contactracing.helpers.PermissionHelper; 16 | import com.ypasoft.contactracing.tools.TransparentProgressDialog; 17 | 18 | public class SplashActivity extends AppCompatActivity { 19 | 20 | public TransparentProgressDialog transparentProgressDialog; 21 | 22 | 23 | @Override 24 | protected void onCreate(Bundle savedInstanceState) { 25 | super.onCreate(savedInstanceState); 26 | setContentView(R.layout.activity_splash); 27 | 28 | transparentProgressDialog = new TransparentProgressDialog(SplashActivity.this); 29 | startAnimation(); 30 | 31 | } 32 | 33 | public void goToMain() { 34 | startActivity(new Intent(this, MainActivity.class) 35 | .setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | 36 | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | 37 | Intent.FLAG_ACTIVITY_CLEAR_TOP) 38 | .setAction(Intent.ACTION_MAIN)); 39 | finish(); 40 | } 41 | 42 | private void startAnimation() { 43 | Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha); 44 | anim.reset(); 45 | LinearLayout l = (LinearLayout) findViewById(R.id.main_layout_splash); 46 | if (l != null) { 47 | l.clearAnimation(); 48 | l.startAnimation(anim); 49 | } 50 | anim = AnimationUtils.loadAnimation(this, R.anim.translate); 51 | anim.reset(); 52 | ImageView iv = (ImageView) findViewById(R.id.splash); 53 | if (iv != null) { 54 | iv.clearAnimation(); 55 | iv.startAnimation(anim); 56 | } 57 | 58 | int SPLASH_ANIMATION_LENGTH = 3000; 59 | 60 | new Handler().postDelayed(new Runnable() { 61 | @Override 62 | public void run() { 63 | 64 | goToMain(); 65 | 66 | } 67 | }, SPLASH_ANIMATION_LENGTH); 68 | } 69 | 70 | 71 | } -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /android/app/src/main/res/layout/show_dialog_message.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 20 | 21 | 22 | 30 | 40 | 41 | 42 | 51 | 52 | 53 | 59 | 60 |