Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Swati4star committed Dec 14, 2016
1 parent 627c457 commit 80dfed4
Show file tree
Hide file tree
Showing 93 changed files with 1,781 additions and 1,936 deletions.
32 changes: 15 additions & 17 deletions Android/app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
Expand All @@ -47,39 +49,40 @@
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.ToxicBakery.viewpager.transforms/view-pager-transforms/1.2.32/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/23.2.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.2.0/jars" />
Expand Down Expand Up @@ -107,16 +110,11 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/me.zhanghai.android.materialprogressbar/library/1.1.4/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/org.lucasr.twowayview/twowayview/0.1.4/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 24 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
Expand All @@ -132,8 +130,8 @@
<orderEntry type="library" exported="" name="library-1.1.4" level="project" />
<orderEntry type="library" exported="" name="materialsearchview-1.4.0" level="project" />
<orderEntry type="library" exported="" name="library-1.0.4" level="project" />
<orderEntry type="library" exported="" name="glide-3.6.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.2.0" level="project" />
<orderEntry type="library" exported="" name="glide-3.6.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.2.0" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-23.2.0" level="project" />
<orderEntry type="library" exported="" name="support-vector-drawable-23.2.0" level="project" />
Expand Down
10 changes: 1 addition & 9 deletions Android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@
android:name=".Music"
android:label="@string/title_activity_music"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".Books_new"
android:label="@string/title_activity_music" />
<activity
android:name=".SelectCity"
android:label="@string/title_activity_select_city"
Expand Down Expand Up @@ -87,10 +84,6 @@
android:name=".BusList"
android:label="@string/title_activity_bus_list"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".CityInfo"
android:label="@string/title_activity_city_info"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".ShoppingCurrentCity"
android:label="@string/title_activity_shopping_currentcity"
Expand Down Expand Up @@ -123,7 +116,6 @@
android:theme="@style/AppTheme.NoActionBar" />
<activity android:name=".DetectedBeacon" />
<activity android:name=".ShareContact" />
<activity android:name=".CaptureImage" />
<activity
android:name=".LoginActivity"
android:label="@string/title_activity_login"
Expand All @@ -133,7 +125,7 @@
<activity android:name=".MyTrips" />
<activity android:name=".AddNewTrip" />
<activity android:name=".MyTripInfo" />
<activity android:name=".Tweets"></activity>
<activity android:name=".Tweets"/>
</application>

</manifest>
63 changes: 32 additions & 31 deletions Android/app/src/main/java/Util/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,54 @@
* Created by swati on 11/10/15.
*/
public class Constants {
public static String ID_ADDED_INDB = "is_added_in_db";
public static final String ID_ADDED_INDB = "is_added_in_db";
public static String FIRST_TIME = "is_first";
public static String USER_NAME = "user_name";
public static final String USER_NAME = "user_name";
public static String USER_EMAIL = "user_email";
public static String USER_NUMBER = "user_number";
public static String USER_ID = "user_id";
public static final String USER_NUMBER = "user_number";
public static final String USER_ID = "user_id";

public static String EVENT_IMG = "event_name";
public static String EVENT_NAME = "event_img";
public static String IMAGE_NO = "number";
public static final String EVENT_IMG = "event_name";
public static final String EVENT_NAME = "event_img";
public static final String IMAGE_NO = "number";

public static String SOURCE_CITY = "source_city";
public static String DESTINATION_CITY = "destination_city";
public static final String SOURCE_CITY = "source_city";
public static final String DESTINATION_CITY = "destination_city";

public static String SOURCE_CITY_ID = "source_city_id";
public static String DESTINATION_CITY_ID = "destination_city_id";
public static String SOURCE_CITY_LAT = "source_city_lat";
public static String DESTINATION_CITY_LAT = "destination_city_lat";
public static String SOURCE_CITY_LON = "source_city_lon";
public static String DESTINATION_CITY_LON = "destination_city_lon";
public static final String SOURCE_CITY_ID = "source_city_id";
public static final String DESTINATION_CITY_ID = "destination_city_id";
public static final String SOURCE_CITY_LAT = "source_city_lat";
public static final String DESTINATION_CITY_LAT = "destination_city_lat";
public static final String SOURCE_CITY_LON = "source_city_lon";
public static final String DESTINATION_CITY_LON = "destination_city_lon";

public static String PLAY_LIST_VERYHAPPY = "UCBkNpeyvBO2TdPGVC_PsPUA";
public static String PLAY_LIST_HAPPY = "UCKEXu8aCjrudFNx2jq9FfQw";
public static String PLAY_LIST_NORMAL = "UCtKpbKXvPKCIplRvJsYEPLg"; //njxcbiucuew
public static String PLAY_LIST_SAD = "UC2ZYeCUb43cfsAPdmsqUc2w";
public static String PLAY_LIST_VERYSAD = "UC25-_5i19rPlLosl_h7G9Ow";

public static String CURRENT_SCORE = "cur_score";
public static String DELHI_LAT = "28.6466773";
public static String DELHI_LON = "76.813073";
public static String MUMBAI_LAT = "19.076";
public static String MUMBAI_LON = "772.8777";
public static final String CURRENT_SCORE = "cur_score";
public static final String DELHI_LAT = "28.6466773";
public static final String DELHI_LON = "76.813073";
public static final String MUMBAI_LAT = "19.076";
public static final String MUMBAI_LON = "772.8777";

public static String MODE = "mode";

public static String IS_BEACON = "is_beacon";
public static String CUR_UID = "cur_uid";
public static String CUR_MAJOR = "cur_major";
public static String CUR_MINOR = "cur_minor";
public static final String IS_BEACON = "is_beacon";
public static final String CUR_UID = "cur_uid";
public static final String CUR_MAJOR = "cur_major";
public static final String CUR_MINOR = "cur_minor";

public static String UID = "B9407F30-F5F8-466E-AFF9-25556B57FE6D";
public static int major = 22537 , minor = 18225; //purple
public static int major2 = 17417 , minor2 = 22087; //lime
public static final String UID = "B9407F30-F5F8-466E-AFF9-25556B57FE6D";
public static final int major = 22537;
public static final int minor = 18225; //purple
public static int major2 = 17417, minor2 = 22087; //lime

public static String userid="USERID";
public static String servicetype="servicetype";
public static String apilink = "http://csinsit.org/prabhakar/tie/";
public static String maps_key = "AIzaSyBgktirlOODUO9zWD-808D7zycmP7smp-Y";
public static String userid = "USERID";
public static String servicetype = "servicetype";
public static final String apilink = "http://csinsit.org/prabhakar/tie/";
public static final String maps_key = "AIzaSyBgktirlOODUO9zWD-808D7zycmP7smp-Y";

}
18 changes: 9 additions & 9 deletions Android/app/src/main/java/Util/GPSTracker.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,32 @@ public class GPSTracker extends Service implements LocationListener {
private final Context mContext;

// flag for GPS status
boolean isGPSEnabled = false;
private boolean isGPSEnabled = false;

// flag for network status
boolean isNetworkEnabled = false;
private boolean isNetworkEnabled = false;

boolean canGetLocation = false;
private boolean canGetLocation = false;

Location location; // location
double latitude; // latitude
double longitude; // longitude
private Location location; // location
private double latitude; // latitude
private double longitude; // longitude

// The minimum distance to change Updates in meters
private static final long MIN_DISTANCE_CHANGE_FOR_UPDATES = 10; // 10 meters

// The minimum time between updates in milliseconds
private static final long MIN_TIME_BW_UPDATES = 1000 * 60 * 1; // 1 minute
private static final long MIN_TIME_BW_UPDATES = 1000 * 60; // 1 minute

// Declaring a Location Manager
protected LocationManager locationManager;
private LocationManager locationManager;

public GPSTracker(Context context) {
this.mContext = context;
getLocation();
}

public Location getLocation() {
private void getLocation() {
try {
locationManager = (LocationManager) mContext
.getSystemService(LOCATION_SERVICE);
Expand Down
Loading

0 comments on commit 80dfed4

Please sign in to comment.