diff --git a/.idea/libraries/bolts_android_1_4_0.xml b/.idea/libraries/bolts_android_1_4_0.xml
new file mode 100644
index 0000000..f6fd908
--- /dev/null
+++ b/.idea/libraries/bolts_android_1_4_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/bolts_applinks_1_4_0.xml b/.idea/libraries/bolts_applinks_1_4_0.xml
new file mode 100644
index 0000000..5ae08af
--- /dev/null
+++ b/.idea/libraries/bolts_applinks_1_4_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/bolts_tasks_1_4_0.xml b/.idea/libraries/bolts_tasks_1_4_0.xml
new file mode 100644
index 0000000..3f0dbce
--- /dev/null
+++ b/.idea/libraries/bolts_tasks_1_4_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 21a2af7..7fff9ad 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -9,37 +9,24 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -68,95 +55,115 @@
-
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
-
-
-
@@ -855,6 +862,10 @@
+
+
+
+
@@ -1566,6 +1577,10 @@
+
+
+
+
@@ -1633,7 +1648,7 @@
+
@@ -1882,6 +1898,8 @@
+
+
@@ -1918,14 +1936,18 @@
-
-
-
+
+
+
+
+
+
+
@@ -1948,7 +1970,7 @@
-
+
@@ -2275,6 +2297,10 @@
+
+
+
+
@@ -2286,8 +2312,8 @@
-
-
+
+
@@ -2318,8 +2344,22 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2337,11 +2377,16 @@
+
+
+
+
+
@@ -2669,7 +2714,13 @@
1458376646013
-
+
+ 1458382455729
+
+
+ 1458382455729
+
+
@@ -2677,14 +2728,14 @@
-
+
-
+
-
+
@@ -2707,6 +2758,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2727,7 +2810,8 @@
-
+
+
@@ -2761,9 +2845,9 @@
-
-
-
+
+
+
@@ -2784,8 +2868,8 @@
-
-
+
+
@@ -2814,18 +2898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2845,18 +2917,21 @@
-
+
-
-
+
+
+
+
+
-
+
-
-
+
+
@@ -2864,7 +2939,7 @@
-
+
@@ -2875,21 +2950,37 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
@@ -2897,21 +2988,20 @@
-
+
-
-
+
+
-
+
-
+
-
-
+
@@ -2919,21 +3009,62 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
diff --git a/app/app.iml b/app/app.iml
index 17aefc4..0373e3a 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -120,6 +120,7 @@
+
@@ -128,6 +129,7 @@
+
@@ -141,6 +143,7 @@
+
diff --git a/app/build.gradle b/app/build.gradle
index 783563b..93b3672 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -14,6 +14,7 @@ android {
buildTypes {
release {
minifyEnabled true
+ shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
@@ -28,4 +29,5 @@ dependencies {
compile 'com.google.android.gms:play-services-plus:8.4.0'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services:8.4.0'
+ compile 'com.parse.bolts:bolts-android:1.+'
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 5854bbe..104ea9b 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -13,12 +13,21 @@
+
+
+
+
+
+
@@ -44,7 +53,13 @@
android:label="@string/title_activity_maps" />
+ android:label="@string/title_activity_checkpoints_maps" />
+
+
diff --git a/app/src/main/java/com/disperz/codeforindia/disperz/AK.java b/app/src/main/java/com/disperz/codeforindia/disperz/AK.java
new file mode 100644
index 0000000..1d63c43
--- /dev/null
+++ b/app/src/main/java/com/disperz/codeforindia/disperz/AK.java
@@ -0,0 +1,91 @@
+package com.disperz.codeforindia.disperz;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v4.app.FragmentActivity;
+
+import com.google.android.gms.maps.CameraUpdateFactory;
+import com.google.android.gms.maps.GoogleMap;
+import com.google.android.gms.maps.OnMapReadyCallback;
+import com.google.android.gms.maps.SupportMapFragment;
+import com.google.android.gms.maps.model.LatLng;
+import com.google.android.gms.maps.model.Marker;
+import com.google.android.gms.maps.model.MarkerOptions;
+
+public class AK extends FragmentActivity implements OnMapReadyCallback {
+
+ private GoogleMap mMap;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_ak);
+ // Obtain the SupportMapFragment and get notified when the map is ready to be used.
+ SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
+ .findFragmentById(R.id.map);
+ mapFragment.getMapAsync(this);
+ }
+
+
+ /**
+ * Manipulates the map once available.
+ * This callback is triggered when the map is ready to be used.
+ * This is where we can add markers or lines, add listeners or move the camera. In this case,
+ * we just add a marker near Sydney, Australia.
+ * If Google Play services is not installed on the device, the user will be prompted to install
+ * it inside the SupportMapFragment. This method will only be triggered once the user has
+ * installed Google Play services and returned to the app.
+ */
+ @Override
+ public void onMapReady(GoogleMap googleMap) {
+ mMap = googleMap;
+
+
+ LatLng chLocation = new LatLng(28.612706, 77.277546);
+ mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(chLocation, 17));
+
+ LatLng check1 = new LatLng(28.612706, 77.277546);
+ mMap.addMarker(new MarkerOptions().position(check1).title("Mandir"));
+
+ LatLng rash = new LatLng(28.613781, 77.277174);
+ mMap.addMarker(new MarkerOptions().position(rash).title("Hirdya Kamal")).showInfoWindow();
+
+ LatLng akshar = new LatLng(28.613877, 77.279382);
+ mMap.addMarker(new MarkerOptions().position(akshar).title("Gandhi Statue"));
+
+ LatLng redfort = new LatLng(28.614041, 77.280853);
+ mMap.addMarker(new MarkerOptions().position(redfort).title("Freedom Fighters"));
+
+ mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
+
+ @Override
+ public boolean onMarkerClick(Marker arg0) {
+
+ Intent intent = new Intent(AK.this, GetTicket.class);
+ intent.putExtra("PLACE", arg0.getTitle());
+
+ if (arg0.getTitle().equals("Mandir")) // if marker source is clicked
+ {
+ intent.putExtra("GATE", "Gate 1");
+ }
+ if (arg0.getTitle().equals("Hirdya Kamal")) // if marker source is clicked
+ {
+ intent.putExtra("GATE", "Gate 2");
+ }
+
+ if (arg0.getTitle().equals("Gandhi Statue")) // if marker source is clicked
+ {
+ intent.putExtra("GATE", "Gate 3");
+ }
+
+ if (arg0.getTitle().equals("Freedom Fighters")) // if marker source is clicked
+ {
+ intent.putExtra("GATE", "Gate 4");
+ }
+
+ startActivity(intent);
+ return true;
+ }
+ });
+ }
+}
diff --git a/app/src/main/java/com/disperz/codeforindia/disperz/CheckpointsMapsActivity.java b/app/src/main/java/com/disperz/codeforindia/disperz/CheckpointsMapsActivity.java
index 74406e7..4d2759c 100644
--- a/app/src/main/java/com/disperz/codeforindia/disperz/CheckpointsMapsActivity.java
+++ b/app/src/main/java/com/disperz/codeforindia/disperz/CheckpointsMapsActivity.java
@@ -11,6 +11,7 @@
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
+import com.parse.ParseUser;
public class CheckpointsMapsActivity extends FragmentActivity implements OnMapReadyCallback {
@@ -20,6 +21,9 @@ public class CheckpointsMapsActivity extends FragmentActivity implements OnMapRe
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_checkpoints_maps);
+
+ ParseUser.enableAutomaticUser();
+
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
@@ -92,4 +96,5 @@ public boolean onMarkerClick(Marker arg0) {
}
});
}
+
}
diff --git a/app/src/main/java/com/disperz/codeforindia/disperz/GetTicket.java b/app/src/main/java/com/disperz/codeforindia/disperz/GetTicket.java
index de62e28..8a0cd25 100644
--- a/app/src/main/java/com/disperz/codeforindia/disperz/GetTicket.java
+++ b/app/src/main/java/com/disperz/codeforindia/disperz/GetTicket.java
@@ -28,11 +28,27 @@ protected void onCreate(Bundle savedInstanceState) {
public void run() {
//Do something after 100ms
- Intent intent_1 = new Intent(GetTicket.this, CheckpointsMapsActivity.class);
- intent_1.putExtra("PLACE", name);
- startActivity(intent_1);
+ if (name.equals("Red Fort")) // if marker source is clicked
+ {
+ Intent intent = new Intent(GetTicket.this, RF.class);
+ intent.putExtra("PLACE", name);
+ intent.putExtra("GATE", "Entry");
+ startActivity(intent);
+ }
+ if (name.equals("Akshardham")) // if marker source is clicked
+ {
+ Intent intent = new Intent(GetTicket.this, AK.class);
+ intent.putExtra("PLACE", name);
+ intent.putExtra("GATE", "Entry");
+ startActivity(intent);
+ }
+ if (name.equals("Rashtrapati Bhavan")) {
+ Intent intent = new Intent(GetTicket.this, CheckpointsMapsActivity.class);
+ intent.putExtra("PLACE", name);
+ startActivity(intent);
+ }
}
- }, 6000);
+ }, 10000);
setContentView(view);
}
diff --git a/app/src/main/java/com/disperz/codeforindia/disperz/MapsActivity.java b/app/src/main/java/com/disperz/codeforindia/disperz/MapsActivity.java
index 18f2c82..5241b54 100644
--- a/app/src/main/java/com/disperz/codeforindia/disperz/MapsActivity.java
+++ b/app/src/main/java/com/disperz/codeforindia/disperz/MapsActivity.java
@@ -40,7 +40,7 @@ protected void onCreate(Bundle savedInstanceState) {
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
- LatLng chLocation = new LatLng(28, 77);
+ LatLng chLocation = new LatLng(28.631713, 77.217109);
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(chLocation, 9));
// Add a marker in Sydney and move the camera
@@ -52,9 +52,11 @@ public void onMapReady(GoogleMap googleMap) {
LatLng redfort = new LatLng(28.6560, 77.2410);
mMap.addMarker(new MarkerOptions().position(redfort).title("Red Fort"));
+/*
LatLng lotus = new LatLng(28.5533, 77.2586);
mMap.addMarker(new MarkerOptions().position(lotus).title("Lotus Temple"));
+*/
mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
diff --git a/app/src/main/java/com/disperz/codeforindia/disperz/ParseApplication.java b/app/src/main/java/com/disperz/codeforindia/disperz/ParseApplication.java
new file mode 100644
index 0000000..728e575
--- /dev/null
+++ b/app/src/main/java/com/disperz/codeforindia/disperz/ParseApplication.java
@@ -0,0 +1,26 @@
+package com.disperz.codeforindia.disperz;
+
+import android.app.Application;
+
+import com.parse.Parse;
+import com.parse.ParseInstallation;
+
+public class ParseApplication extends Application {
+ public static final String YOUR_APPLICATION_ID = "s1z27FruCTuXoiupts6PXKsrYMYUnvm5W9QhpouM";
+ public static final String YOUR_CLIENT_KEY = "HdN6B3JN6jGbGVUNJL8aFuRQhkrBBiiMXyNDImJr";
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+
+ try {
+ // Add your initialization code here
+ Parse.initialize(this, YOUR_APPLICATION_ID, YOUR_CLIENT_KEY);
+ ParseInstallation.getCurrentInstallation().saveInBackground();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+}
+
diff --git a/app/src/main/java/com/disperz/codeforindia/disperz/RF.java b/app/src/main/java/com/disperz/codeforindia/disperz/RF.java
new file mode 100644
index 0000000..2fbdfdc
--- /dev/null
+++ b/app/src/main/java/com/disperz/codeforindia/disperz/RF.java
@@ -0,0 +1,90 @@
+package com.disperz.codeforindia.disperz;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v4.app.FragmentActivity;
+
+import com.google.android.gms.maps.CameraUpdateFactory;
+import com.google.android.gms.maps.GoogleMap;
+import com.google.android.gms.maps.OnMapReadyCallback;
+import com.google.android.gms.maps.SupportMapFragment;
+import com.google.android.gms.maps.model.LatLng;
+import com.google.android.gms.maps.model.Marker;
+import com.google.android.gms.maps.model.MarkerOptions;
+
+public class RF extends FragmentActivity implements OnMapReadyCallback {
+
+ private GoogleMap mMap;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_lt);
+ // Obtain the SupportMapFragment and get notified when the map is ready to be used.
+ SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
+ .findFragmentById(R.id.map);
+ mapFragment.getMapAsync(this);
+ }
+
+
+ /**
+ * Manipulates the map once available.
+ * This callback is triggered when the map is ready to be used.
+ * This is where we can add markers or lines, add listeners or move the camera. In this case,
+ * we just add a marker near Sydney, Australia.
+ * If Google Play services is not installed on the device, the user will be prompted to install
+ * it inside the SupportMapFragment. This method will only be triggered once the user has
+ * installed Google Play services and returned to the app.
+ */
+ @Override
+ public void onMapReady(GoogleMap googleMap) {
+ mMap = googleMap;
+
+ LatLng chLocation = new LatLng(28.655816, 77.241009);
+ mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(chLocation, 17));
+
+ LatLng check1 = new LatLng(28.655816, 77.241009);
+ mMap.addMarker(new MarkerOptions().position(check1).title("Naqquar Khaana"));
+
+ LatLng rash = new LatLng(28.655670, 77.242270);
+ mMap.addMarker(new MarkerOptions().position(rash).title("Diwan-i-Aam")).showInfoWindow();
+
+ LatLng akshar = new LatLng(28.655744, 77.243542);
+ mMap.addMarker(new MarkerOptions().position(akshar).title("Rang Mahal"));
+
+ LatLng redfort = new LatLng(28.656407, 77.243586);
+ mMap.addMarker(new MarkerOptions().position(redfort).title("Diwan-i-Khas"));
+
+ mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
+
+ @Override
+ public boolean onMarkerClick(Marker arg0) {
+
+ Intent intent = new Intent(RF.this, GetTicket.class);
+ intent.putExtra("PLACE", arg0.getTitle());
+
+ if (arg0.getTitle().equals("Naqquar Khaana")) // if marker source is clicked
+ {
+ intent.putExtra("GATE", "Gate 1");
+ }
+ if (arg0.getTitle().equals("Diwan-i-Aam")) // if marker source is clicked
+ {
+ intent.putExtra("GATE", "Gate 2");
+ }
+
+ if (arg0.getTitle().equals("Rang Mahal")) // if marker source is clicked
+ {
+ intent.putExtra("GATE", "Gate 3");
+ }
+
+ if (arg0.getTitle().equals("Diwan-i-Khas")) // if marker source is clicked
+ {
+ intent.putExtra("GATE", "Gate 4");
+ }
+
+ startActivity(intent);
+ return true;
+ }
+ });
+ }
+}
diff --git a/app/src/main/res/drawable/logo.png b/app/src/main/res/drawable/logo.png
new file mode 100644
index 0000000..16f72a0
Binary files /dev/null and b/app/src/main/res/drawable/logo.png differ
diff --git a/app/src/main/res/layout/activity_ak.xml b/app/src/main/res/layout/activity_ak.xml
new file mode 100644
index 0000000..20d6984
--- /dev/null
+++ b/app/src/main/res/layout/activity_ak.xml
@@ -0,0 +1,7 @@
+
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml
index 8fb4f06..e2dc4d5 100644
--- a/app/src/main/res/layout/activity_login.xml
+++ b/app/src/main/res/layout/activity_login.xml
@@ -12,5 +12,18 @@
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:layout_marginBottom="41dp" />
+
+
+
diff --git a/app/src/main/res/layout/activity_lt.xml b/app/src/main/res/layout/activity_lt.xml
new file mode 100644
index 0000000..6b2e12a
--- /dev/null
+++ b/app/src/main/res/layout/activity_lt.xml
@@ -0,0 +1,7 @@
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 2b0a0b4..e6d6001 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -3,4 +3,6 @@
settings
Map
Map
+ Map
+ Map