├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable
│ │ │ │ ├── city.png
│ │ │ │ ├── camera.png
│ │ │ │ ├── text_bubble_tx.xml
│ │ │ │ ├── text_bubble_rx.xml
│ │ │ │ └── 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
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── values
│ │ │ │ ├── styles.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── colors.xml
│ │ │ ├── layout
│ │ │ │ ├── activity_text.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── message_sent.xml
│ │ │ │ ├── message_response.xml
│ │ │ │ ├── message_card.xml
│ │ │ │ ├── activity_maps.xml
│ │ │ │ └── text_response_content.xml
│ │ │ └── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── prakritibansal
│ │ │ │ └── dermahack
│ │ │ │ ├── MainActivity.java
│ │ │ │ ├── DiseaseParser.java
│ │ │ │ ├── TextMessage.java
│ │ │ │ ├── AppController.java
│ │ │ │ ├── DownloadUrl.java
│ │ │ │ ├── Conversation.java
│ │ │ │ ├── PermissionUtils.java
│ │ │ │ ├── GetNearbyPlacesData.java
│ │ │ │ ├── DataParser.java
│ │ │ │ ├── MessagesListAdapter.java
│ │ │ │ ├── MapsActivity.java
│ │ │ │ └── TextActivity.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── prakritibansal
│ │ │ └── dermahack
│ │ │ └── ExampleUnitTest.java
│ ├── release
│ │ └── res
│ │ │ └── values
│ │ │ └── google_maps_api.xml
│ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── prakritibansal
│ │ │ └── dermahack
│ │ │ └── ExampleInstrumentedTest.java
│ └── debug
│ │ └── res
│ │ └── values
│ │ └── google_maps_api.xml
├── proguard-rules.pro
├── build.gradle
└── google-services.json
├── settings.gradle
├── deploy-api
├── Procfile
├── runtime.txt
├── nltk.txt
├── Pipfile
├── requirements.txt
├── controllers
│ ├── helperfunctions.pyc
│ ├── setupController.js
│ ├── userController.js
│ ├── api-key
│ │ └── Hackeam-fde790441b8d.json
│ ├── helperfunctions.py
│ ├── web_detect.py
│ ├── bot.py
│ └── data
│ │ └── disease_json.json
├── package.json
├── app.js
├── config
│ └── helperFunctions.js
└── package-lock.json
├── Images
├── gif1.gif
├── gif2.gif
└── Screen Shot 2018-02-11 at 12.06.22.png
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── .idea
├── vcs.xml
├── runConfigurations.xml
├── modules.xml
├── gradle.xml
└── misc.xml
├── gradle.properties
├── gradlew.bat
├── README.md
└── gradlew
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/deploy-api/Procfile:
--------------------------------------------------------------------------------
1 | web: node app.js
2 |
--------------------------------------------------------------------------------
/deploy-api/runtime.txt:
--------------------------------------------------------------------------------
1 | python-2.7.14
2 |
--------------------------------------------------------------------------------
/deploy-api/nltk.txt:
--------------------------------------------------------------------------------
1 | wordnet
2 | pros_cons
3 | reuters
4 |
--------------------------------------------------------------------------------
/deploy-api/Pipfile:
--------------------------------------------------------------------------------
1 | [requires]
2 | python_version = "2.7"
3 |
--------------------------------------------------------------------------------
/Images/gif1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/Images/gif1.gif
--------------------------------------------------------------------------------
/Images/gif2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/Images/gif2.gif
--------------------------------------------------------------------------------
/app/src/main/res/drawable/city.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/drawable/city.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/drawable/camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/drawable/camera.png
--------------------------------------------------------------------------------
/deploy-api/requirements.txt:
--------------------------------------------------------------------------------
1 | nltk==3.2.5
2 | textblob==0.15.1
3 | jsonschema==2.6.0
4 | google-cloud-vision==0.30.0
5 | pandas==0.21.0
6 |
--------------------------------------------------------------------------------
/deploy-api/controllers/helperfunctions.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/deploy-api/controllers/helperfunctions.pyc
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Images/Screen Shot 2018-02-11 at 12.06.22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/Images/Screen Shot 2018-02-11 at 12.06.22.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PikkaPikkachu/DermaHack/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 | node_modules/
11 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/deploy-api/controllers/setupController.js:
--------------------------------------------------------------------------------
1 | module.exports = function(server, restify, restifyValidator){
2 | server.use(restify.acceptParser(server.acceptable));
3 | server.use(restify.queryParser());
4 | server.use(restify.bodyParser());
5 | server.use(restifyValidator);
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Feb 11 01:16:02 IST 2018
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-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/text_bubble_tx.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/text_bubble_rx.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/deploy-api/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "deploy-api",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "node app.js",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "author": "Prakriti",
11 | "license": "ISC",
12 | "dependencies": {
13 | "python-shell": "^0.4.0",
14 | "restify": "^4.1.1",
15 | "restify-validator": "^0.3.1"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/prakritibansal/dermahack/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.prakritibansal.dermahack;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | public class MainActivity extends AppCompatActivity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_main);
12 |
13 |
14 | }
15 |
16 |
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/deploy-api/app.js:
--------------------------------------------------------------------------------
1 | var restify = require('restify');
2 |
3 | var server = restify.createServer();
4 |
5 | var setupController = require('./controllers/setupController.js');
6 | var userController = require('./controllers/userController.js');
7 |
8 | var restifyValidator = require('restify-validator');
9 |
10 | setupController(server, restify, restifyValidator);
11 | userController(server);
12 |
13 | server.listen( (process.env.PORT || 8080), function() {
14 | console.log('%s listening at %s', server.name, server.url);
15 | });
16 |
--------------------------------------------------------------------------------
/app/src/test/java/com/example/prakritibansal/dermahack/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.prakritibansal.dermahack;
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() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/deploy-api/config/helperFunctions.js:
--------------------------------------------------------------------------------
1 | function _respond_convo (res, next, status, data, http_code){
2 | var response = {
3 | 'status': status,
4 | 'response': data
5 | };
6 | res.setHeader('content-type', 'application/json');
7 | res.writeHead(http_code);
8 | res.end(JSON.stringify(response));
9 | return next();
10 | }
11 |
12 | module.exports.success_convo = function(res, next, data){
13 | _respond_convo(res, next, 'success', data, 200);
14 | }
15 |
16 | module.exports.failure_convo = function(res, next, data, http_code){
17 | _respond_convo(res, next, 'failure', data, http_code);
18 | }
19 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | DermaHack
3 | Settings
4 | Details:
5 | Preview:
6 | Uploading image. Please wait.
7 |
8 | Choose a picture
9 | Camera
10 | Gallery
11 |
12 | Something is wrong with that image. Pick a different one please.
13 | Map
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/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
22 |
--------------------------------------------------------------------------------
/app/src/release/res/values/google_maps_api.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 | YOUR_KEY_HERE
20 |
21 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/example/prakritibansal/dermahack/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.prakritibansal.dermahack;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.example.prakritibansal.dermahack", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/debug/res/values/google_maps_api.xml:
--------------------------------------------------------------------------------
1 |
2 |
23 | AIzaSyBc93Ww--wuf6T90UCLjXjeqz45FBzPyNU
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/message_sent.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 | #404142
7 | #404142
8 | #CBCBCB
9 | #AC1600
10 | #37A51C
11 | #329AD6
12 | #B2DFDB
13 | #2A5C91
14 | #E0F2F1
15 | #303232
16 | #4EA9DC
17 | #FF9900
18 | #E94700
19 | #FFFFFF
20 | #F5F7F7
21 | #8D9496
22 | #5A5D5E
23 | #404142
24 | #303232
25 | #1D1E1E
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/message_response.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
15 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/message_card.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
24 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_maps.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
24 |
25 |
34 |
35 |
36 |
37 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/prakritibansal/dermahack/DiseaseParser.java:
--------------------------------------------------------------------------------
1 | package com.example.prakritibansal.dermahack;
2 |
3 | /**
4 | * Created by Dell on 2/11/2018.
5 | */
6 |
7 | import android.util.Log;
8 |
9 | import org.json.JSONArray;
10 | import org.json.JSONException;
11 | import org.json.JSONObject;
12 |
13 | import java.util.ArrayList;
14 | import java.util.HashMap;
15 | import java.util.List;
16 |
17 | /**
18 | * Created by Dell on 2/11/2018.
19 | */
20 |
21 | public class DiseaseParser {
22 |
23 | public static ArrayList diseaseList = new ArrayList();
24 | public static ArrayList descriptionList = new ArrayList();
25 |
26 | public void DiseaseParser (JSONObject object) throws JSONException {
27 |
28 | diseaseList = new ArrayList<>();
29 | HashMap temp1 = new HashMap(), temp2 = new HashMap();
30 | JSONArray jsonArray = object.getJSONArray("response");
31 |
32 | for (int i = 0; i < jsonArray.length() ; i++) {
33 | JSONObject obj = (JSONObject) jsonArray.get(i);
34 | String disease_name = obj.getString("disease_name");
35 | String description_name = obj.getString("treatment_info");
36 | Log.i("Desc", description_name);
37 | diseaseList.add(disease_name);
38 | descriptionList.add(description_name);
39 | }
40 |
41 |
42 | }
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/prakritibansal/dermahack/TextMessage.java:
--------------------------------------------------------------------------------
1 | package com.example.prakritibansal.dermahack;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Created by prakritibansal on 2/11/18.
7 | */
8 |
9 |
10 | public class TextMessage {
11 | private String message;
12 | private String from;
13 | private String timeStamp;
14 | private String photoUrl;
15 | private String imageUrl;
16 |
17 |
18 | public TextMessage(final String message, final String from, final String timeStamp) {
19 | this.message = message;
20 | this.from = from;
21 | this.timeStamp = timeStamp;
22 |
23 | }
24 |
25 | public String getMessage() {
26 | return message;
27 | }
28 |
29 | public void setMessage(String message) {
30 | this.message = message;
31 | }
32 |
33 | public String getFrom() {
34 | return from;
35 | }
36 |
37 | public void setFrom(String from) {
38 | this.from = from;
39 | }
40 |
41 | public String getTimeStamp() {
42 | return timeStamp;
43 | }
44 |
45 | public void setTimeStamp(String timeStamp) {
46 | this.timeStamp = timeStamp;
47 | }
48 |
49 | public String getPhotoUrl() {
50 | return photoUrl;
51 | }
52 |
53 | public void setPhotoUrl(String photoUrl) {
54 | this.photoUrl = photoUrl;
55 | }
56 |
57 | public String getImageUrl(){
58 | return imageUrl;
59 | }
60 |
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/prakritibansal/dermahack/AppController.java:
--------------------------------------------------------------------------------
1 | package com.example.prakritibansal.dermahack;
2 |
3 | /**
4 | * Created by prakritibansal on 2/11/18.
5 | */
6 |
7 | import android.app.Application;
8 | import android.text.TextUtils;
9 |
10 | import com.android.volley.Request;
11 | import com.android.volley.RequestQueue;
12 | import com.android.volley.toolbox.Volley;
13 |
14 | /**
15 | * Created by prakritibansal on 12/22/17.
16 | */
17 |
18 | public class AppController extends Application {
19 |
20 | public static final String TAG = AppController.class.getSimpleName();
21 |
22 | private RequestQueue mRequestQueue;
23 |
24 | private static AppController mInstance;
25 |
26 | @Override
27 | public void onCreate() {
28 | super.onCreate();
29 | mInstance = this;
30 | }
31 |
32 | public static synchronized AppController getInstance() {
33 | return mInstance;
34 | }
35 |
36 | public RequestQueue getRequestQueue() {
37 | if (mRequestQueue == null) {
38 | mRequestQueue = Volley.newRequestQueue(getApplicationContext());
39 | }
40 |
41 | return mRequestQueue;
42 | }
43 |
44 | public void addToRequestQueue(Request req, String tag) {
45 | req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);
46 | getRequestQueue().add(req);
47 | }
48 |
49 | public void addToRequestQueue(Request req) {
50 | req.setTag(TAG);
51 | getRequestQueue().add(req);
52 | }
53 |
54 | public void cancelPendingRequests(Object tag) {
55 | if (mRequestQueue != null) {
56 | mRequestQueue.cancelAll(tag);
57 | }
58 | }
59 | }
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/prakritibansal/dermahack/DownloadUrl.java:
--------------------------------------------------------------------------------
1 | package com.example.prakritibansal.dermahack;
2 |
3 | import android.util.Log;
4 |
5 | import java.io.BufferedReader;
6 | import java.io.IOException;
7 | import java.io.InputStream;
8 | import java.io.InputStreamReader;
9 | import java.net.HttpURLConnection;
10 | import java.net.URL;
11 |
12 | /**
13 | * Created by Dell on 2/10/2018.
14 | */
15 |
16 | class DownloadUrl {
17 | public String readUrl(String strUrl) throws IOException {
18 | String data = "";
19 | InputStream iStream = null;
20 | HttpURLConnection urlConnection = null;
21 | try {
22 | URL url = new URL(strUrl);
23 |
24 | // Creating an http connection to communicate with url
25 | urlConnection = (HttpURLConnection) url.openConnection();
26 |
27 | // Connecting to url
28 | urlConnection.connect();
29 |
30 | // Reading data from url
31 | iStream = urlConnection.getInputStream();
32 |
33 | BufferedReader br = new BufferedReader(new InputStreamReader(iStream));
34 |
35 | StringBuffer sb = new StringBuffer();
36 |
37 | String line = "";
38 | while ((line = br.readLine()) != null) {
39 | sb.append(line);
40 | }
41 |
42 | data = sb.toString();
43 | Log.d("downloadUrl", data.toString());
44 | br.close();
45 |
46 | } catch (Exception e) {
47 | Log.d("Exception", e.toString());
48 | } finally {
49 | iStream.close();
50 | urlConnection.disconnect();
51 | }
52 | return data;
53 | }
54 | }
55 |
56 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 27
5 | defaultConfig {
6 | applicationId "com.example.prakritibansal.dermahack"
7 | minSdkVersion 21
8 | targetSdkVersion 27
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | multiDexEnabled true
13 |
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 |
22 |
23 | }
24 |
25 | dependencies {
26 | implementation fileTree(dir: 'libs', include: ['*.jar'])
27 | implementation 'com.android.support:appcompat-v7:27.0.2'
28 | implementation 'com.google.firebase:firebase-database:11.0.4'
29 | implementation 'com.google.firebase:firebase-storage:11.0.4'
30 | implementation 'com.google.firebase:firebase-auth:11.0.4'
31 | implementation 'com.google.android.gms:play-services-maps:11.0.4'
32 | compile 'com.google.android.gms:play-services:11.0.4'
33 | compile 'com.android.support:design:27.0.2'
34 | compile 'com.android.support:cardview-v7:27.0.2'
35 | implementation 'com.android.support.constraint:constraint-layout:1.0.2'
36 | testImplementation 'junit:junit:4.12'
37 | androidTestImplementation 'com.android.support.test:runner:1.0.1'
38 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
39 | compile 'com.mcxiaoke.volley:library-aar:1.0.0'
40 | compile 'com.squareup.picasso:picasso:2.5.2'
41 |
42 |
43 | }
44 |
45 |
46 |
47 |
48 |
49 | apply plugin: 'com.google.gms.google-services'
--------------------------------------------------------------------------------
/app/src/main/java/com/example/prakritibansal/dermahack/Conversation.java:
--------------------------------------------------------------------------------
1 | package com.example.prakritibansal.dermahack;
2 |
3 | /**
4 | * Created by prakritibansal on 2/11/18.
5 | */
6 |
7 | import org.w3c.dom.Text;
8 |
9 | import java.util.ArrayList;
10 | import java.util.List;
11 | import java.util.TreeSet;
12 |
13 |
14 | public class Conversation {
15 | private static List currentConversation;
16 | private static TreeSet mCardSet;
17 | private static TreeSet mSentMsg;
18 |
19 | public static void clear() {
20 | currentConversation = new ArrayList();
21 | mCardSet = new TreeSet();
22 | mSentMsg = new TreeSet();
23 | }
24 |
25 | public static void add(final TextMessage message) {
26 | if (currentConversation == null) {
27 | clear();
28 | }
29 |
30 | currentConversation.add(message);
31 | if("cd".equals(message.getFrom())){
32 | mCardSet.add(getCount()-1);
33 | }
34 | if("tx".equals(message.getFrom())){
35 |
36 | mSentMsg.add(getCount()-1);
37 | }
38 |
39 | }
40 |
41 | public static boolean inCardSet(int pos){
42 |
43 | return mCardSet.contains(pos);
44 | }
45 |
46 | public static boolean inSentSet(int pos){
47 |
48 | return mSentMsg.contains(pos);
49 | }
50 |
51 | public static TextMessage getMessage(final int pos) {
52 | if (currentConversation == null) {
53 | return null;
54 | }
55 | return currentConversation.get(pos);
56 | }
57 |
58 | public static int getCount() {
59 | return currentConversation == null ? 0 : currentConversation.size();
60 | }
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "1010430282595",
4 | "firebase_url": "https://dermahack.firebaseio.com",
5 | "project_id": "dermahack",
6 | "storage_bucket": "dermahack.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:1010430282595:android:9521ce2304d10400",
12 | "android_client_info": {
13 | "package_name": "com.example.prakritibansal.dermahack"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "1010430282595-83rcri54b30a9v0qfkv9nmlgvdqvooaq.apps.googleusercontent.com",
19 | "client_type": 1,
20 | "android_info": {
21 | "package_name": "com.example.prakritibansal.dermahack",
22 | "certificate_hash": "1e1ac0709abbe965fdf0abea801ed6183ce0fcdc"
23 | }
24 | },
25 | {
26 | "client_id": "1010430282595-jvnfjgn26s68h2it4iin7vhaqu0lf1rm.apps.googleusercontent.com",
27 | "client_type": 3
28 | }
29 | ],
30 | "api_key": [
31 | {
32 | "current_key": "AIzaSyCFOxP1eVMRTMetI3ye56_0RLXmPFXyjzs"
33 | }
34 | ],
35 | "services": {
36 | "analytics_service": {
37 | "status": 1
38 | },
39 | "appinvite_service": {
40 | "status": 2,
41 | "other_platform_oauth_client": [
42 | {
43 | "client_id": "1010430282595-jvnfjgn26s68h2it4iin7vhaqu0lf1rm.apps.googleusercontent.com",
44 | "client_type": 3
45 | }
46 | ]
47 | },
48 | "ads_service": {
49 | "status": 2
50 | }
51 | }
52 | }
53 | ],
54 | "configuration_version": "1"
55 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/prakritibansal/dermahack/PermissionUtils.java:
--------------------------------------------------------------------------------
1 | package com.example.prakritibansal.dermahack;
2 |
3 |
4 | import android.app.Activity;
5 | import android.content.pm.PackageManager;
6 | import android.support.v4.app.ActivityCompat;
7 | import android.support.v4.content.ContextCompat;
8 |
9 | import java.util.ArrayList;
10 |
11 | public class PermissionUtils {
12 | public static boolean requestPermission(
13 | Activity activity, int requestCode, String... permissions) {
14 | boolean granted = true;
15 | ArrayList permissionsNeeded = new ArrayList<>();
16 |
17 | for (String s : permissions) {
18 | int permissionCheck = ContextCompat.checkSelfPermission(activity, s);
19 | boolean hasPermission = (permissionCheck == PackageManager.PERMISSION_GRANTED);
20 | granted &= hasPermission;
21 | if (!hasPermission) {
22 | permissionsNeeded.add(s);
23 | }
24 | }
25 |
26 | if (granted) {
27 | return true;
28 | } else {
29 | ActivityCompat.requestPermissions(activity,
30 | permissionsNeeded.toArray(new String[permissionsNeeded.size()]),
31 | requestCode);
32 | return false;
33 | }
34 | }
35 |
36 |
37 | public static boolean permissionGranted(
38 | int requestCode, int permissionCode, int[] grantResults) {
39 | if (requestCode == permissionCode) {
40 | if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
41 | return true;
42 | } else {
43 | return false;
44 | }
45 | }
46 | return false;
47 | }
48 | }
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/deploy-api/controllers/userController.js:
--------------------------------------------------------------------------------
1 |
2 | var helpers = require('../config/helperFunctions.js');
3 |
4 | module.exports = function(server){
5 | server.post("/convo", function(req, res, next){
6 | req.assert('user_response', 'user_response is required').notEmpty();
7 | var error = req.validationErrors();
8 | if(error){
9 | helpers.failure_convo(res, next, error[0], 400);
10 | }
11 | var user = req.params['user_response'];
12 |
13 | var spawn = require('child_process').spawn;
14 | var py = spawn('python', [__dirname+'/bot.py', user]);
15 |
16 | var bot_reply = '';
17 |
18 | py.stdout.on('data', function(data){
19 | bot_reply += data.toString();
20 | helpers.success_convo(res, next, bot_reply);
21 | });
22 |
23 | py.stderr.on('data', (data) => {
24 | console.log(data.toString());
25 | console.log("Error occured!");
26 | helpers.failure_convo(res, next, "Error occured! Try again in a few hours!");
27 | });
28 |
29 |
30 | py.stdin.end();
31 | });
32 |
33 | server.post("/diagnose", function(req, res, next){
34 | req.assert('url', 'url is required').notEmpty()
35 | var error = req.validationErrors();
36 | if(error){
37 | helpers.failure_convo(res, next, error[0], "error", 400);
38 | }
39 | var url = req.params.url;
40 |
41 | var spawn = require('child_process').spawn;
42 | var py = spawn('python', [__dirname+'/web_detect.py', url]);
43 |
44 |
45 | py.stdout.on('data', function(data){
46 | //var diagnosis += data;
47 | console.log(data.toString());
48 | var diagnosis = JSON.parse(data.toString());
49 | helpers.success_convo(res, next, diagnosis);
50 | });
51 |
52 | py.stderr.on('data', (data) => {
53 | console.log(data.toString());
54 | console.log("Error occured!");
55 | helpers.failure_convo(res, next, "Error occured! Try again in a few hours!");
56 | });
57 |
58 | py.stdin.end();
59 | });
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/deploy-api/controllers/api-key/Hackeam-fde790441b8d.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "service_account",
3 | "project_id": "hackeam-68143",
4 | "private_key_id": "fde790441b8dad86cad1540779d2489187f5e84c",
5 | "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDaPQRDD6ceoLdE\nsAKUatpBEk5Ie/eiMrqF5fiE3K6PYyry/3+/0Bb+8Jz+Ub1CurOIbLOVYOlvVibE\nk+Oj0ftEB47dYkDARcL1LRIJmqkVU5UPxArl5r+mgb28cHfKtK4ixZSWRkyJS2gl\nufE07C0N6Y/akmOAuKfJewHI7RX1vpHaagiHFdyuj51p3nDv/hAOj5HB9hCQOkc4\ny3wOgnzWti68h9FqZlx4KOzzVXsjcoqeL1c5DwJjSCTsU8N8YLPrR0oTRDKudWWT\n4oJLVcMu7ojSrOR2TEc9lVO3+IYM0NogioAFRyC0+hZExuUWZqAYJfePbsrOhJQW\nT71XdgvlAgMBAAECggEACJQeIx7npRWdg23x+Z12QFlE0GazfhtfFFNzcJEpktnY\niGfgmlMTjSIH4QH1PfA18/G/7Z1UxItfDg2fkZY37Nccnf+v4QItAgzrcosZkX/9\n8hPbXZxzlQsKQNctiLKPzZUCL8kKI6beH6BR4FBwJSXOWygzdwEeZiL3cXHX+Ep0\nZUUr6967kj3G6yMY3e2ZNOMVaj1td7tbM/DWm0GVj5fnQIbZR6Gfu+jNl9tZc1Ss\nCIaz34x9vD6A85oOk4esEtJF1Xo9sVaUpqzclFSRCb1bPq7ALbfNR9NhRxTfNtxH\nm5PdjBnVb72M6l4giMJS2KWj/K7Fsaj0GvNQ8cibMQKBgQDuT/LWz0sdF4MApbY3\nrKT/nj0Yt2vxGLy1KmTffYAnlm2SuK1Go8cZRsjdyjerSyHLm4B5EVO//OF+HqRd\n9T9eguqkaKVz79sU/2D3OuSy9KPR2ad1R5oO6Tio9Y4CxoLnETbM7A99OCPvEwD5\nCByrq9Af8AwewI5o5jKpRSFnEQKBgQDqb6ctZqiOEzOC0ETnASYkWX9D2XCl2l/R\n2qSqVxDKQ+EoU64U+JYnRUu8tvjnbFgkn+cUB7oZKWCGkPejVtcKvUbN7W5eRnQT\nunhisdgFo42osaRYfmFj3fuURSlKKB7ZikYlydCt7eobTDO/wbTLlCua9oPM6LeA\npLiHOuoflQKBgAttzCCfKmQHx6GVUOrUnckghp+T1FporEwn71SEiUvcu/6IWs8D\ndb3xlhqE4yyU2tcP6xZjTVfswcexooJbC6H1t1kRJ7Yqr6APK1BQA73NW7nprU1D\nlNDYQH5h4GCjso1wVud2/rsroRWLHMXUrMNS5xVRBtPGuk2vlIhnp1VxAoGBAJ2G\n+vnJ4nbdNh6vXa0vm3aPYLGxuTzouLwlQ8JmEJUo+XGEkRPsWdD3gkXDWQsARVYO\n0FIoQwdHQ2IIpS3vWz4PIzWaVjAo/TSIdv4ybGqVlMmG3FzORxi4/6SIuI7o2Jnq\njOo1avCETmubT6aJPbgRzx8oiDW3Jh7eEFRl5Q3lAoGBAJJSnUT8G2cxyj/KwvOs\n4q6HGaECta91LoXr9ajSB16fU8ag7ONT5/t/8KcGAahlCPFLb1JEWcZ3hPTbE2K2\n8t4TOUbkmOG4o5uoc6xALOEmFrwiC7NttsemAXKeNIF6MgGzsX8FGN2m6JBej1NY\nNGqThTkDMITXc6Zk094lJoA+\n-----END PRIVATE KEY-----\n",
6 | "client_email": "hackeam@hackeam-68143.iam.gserviceaccount.com",
7 | "client_id": "101567548695834239430",
8 | "auth_uri": "https://accounts.google.com/o/oauth2/auth",
9 | "token_uri": "https://accounts.google.com/o/oauth2/token",
10 | "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
11 | "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/hackeam%40hackeam-68143.iam.gserviceaccount.com"
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
42 |
45 |
46 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/deploy-api/controllers/helperfunctions.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 | import pandas as pd
4 | import ast
5 | from nltk.corpus import wordnet as wn
6 | from textblob import TextBlob
7 |
8 |
9 |
10 |
11 | diseases_json = json.load(open(os.path.dirname(os.path.abspath(__file__))+'/data/disease_json.json', 'r'))
12 |
13 | # convert json string to pandas Dataframe
14 | diseases = pd.DataFrame(diseases_json)
15 |
16 | # input: a string with the name of a single disease
17 | # output: returns a string carrying the coressponding treatment info
18 |
19 | def get_treatment_info(disease_name):
20 |
21 | treat = diseases.loc[diseases['name']==disease_name.upper()]['treatment_info'].tolist()
22 | if treat:
23 | return treat[0]
24 | else:
25 | return "No treatment found."
26 |
27 | # input: a list containing multiple strings representing various symptoms
28 | # output: returns a list of strings consisting of three most probable diseases according the symptoms provided as input
29 |
30 | def get_disease_names(tag_list):
31 | d = []
32 | for tag in tag_list:
33 | if (tag.upper() in diseases["name"].tolist()):
34 | d.append(tag)
35 | return d
36 | for tag in tag_list:
37 | limit = 0
38 | for syn in wn.synsets(tag):
39 | for lemma in syn.lemmas():
40 | tag_list.append(lemma.name())
41 | limit=limit+1
42 | if(limit>5):
43 | break
44 | s_no = diseases["s_no"]
45 | diseases["matched_symptoms"] = pd.Series()
46 | p = []
47 | for i in s_no:
48 | disease_symptom_list = ast.literal_eval(diseases.loc[diseases["s_no"]==i]["symptoms"].tolist()[0])
49 | p.append(len(set(tag_list)&set(disease_symptom_list)))
50 |
51 | diseases["matched_symptoms"] = p
52 | matched_diseases = diseases.sort_values(by=["matched_symptoms"], ascending=False)[["name"]][0:3]["name"].tolist()
53 |
54 | return matched_diseases
55 |
56 | def get_disease_dicts(tag_list):
57 | matched_diseases = get_disease_names(tag_list)
58 | matched_disease_list = []
59 |
60 | for disease in matched_diseases:
61 | matched_disease_dict = {}
62 | matched_disease_dict["disease_name"] = disease
63 | matched_disease_dict["treatment_info"] = get_treatment_info(disease)
64 | matched_disease_list.append(matched_disease_dict)
65 |
66 | return json.dumps(matched_disease_list)
67 |
68 |
69 |
70 | # if __name__ == '__main__':
71 | # import sys
72 | # # python bot.py "I am an engineer"
73 | # info = sys.argv[1]
74 | # print(get_disease_dicts(info))
75 | # sys.stdout.flush()
76 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/text_response_content.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
22 |
23 |
31 |
32 |
37 |
38 |
39 |
51 |
52 |
53 |
54 |
55 |
61 |
62 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/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 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
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 Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/prakritibansal/dermahack/GetNearbyPlacesData.java:
--------------------------------------------------------------------------------
1 | package com.example.prakritibansal.dermahack;
2 |
3 | import android.os.AsyncTask;
4 | import android.util.Log;
5 |
6 | import com.google.android.gms.maps.CameraUpdateFactory;
7 | import com.google.android.gms.maps.GoogleMap;
8 | import com.google.android.gms.maps.model.BitmapDescriptorFactory;
9 | import com.google.android.gms.maps.model.LatLng;
10 | import com.google.android.gms.maps.model.MarkerOptions;
11 |
12 | import java.util.HashMap;
13 | import java.util.List;
14 |
15 | /**
16 | * Created by Dell on 2/10/2018.
17 | */
18 |
19 | public class GetNearbyPlacesData extends AsyncTask