Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Complete code/BornToCode.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="BornToCode" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
20 changes: 20 additions & 0 deletions Complete code/CabBookingDriver.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="CabBookingDriver" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Empty file added Complete code/README.md
Empty file.
1 change: 1 addition & 0 deletions Complete code/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
277 changes: 277 additions & 0 deletions Complete code/app/app.iml

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions Complete code/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.softup.utkarsh.uber"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.android.gms:play-services-maps:12.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:12.0.1'

//Add Library
implementation 'com.google.maps.android:android-maps-utils:0.5+'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.github.glomadrian:MaterialAnimatedSwitch:1.1@aar'
implementation 'com.firebase:geofire-android:2.1.2'
implementation 'com.github.d-max:spots-dialog:0.7@aar'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.android.support:design:26.+'
implementation 'com.android.support:cardview-v7:26.+'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
implementation 'com.google.firebase:firebase-database:12.0.1'
implementation 'com.google.firebase:firebase-auth:12.0.1'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.android.support:multidex:1.0.3'

}
apply plugin: 'com.google.gms.google-services'
55 changes: 55 additions & 0 deletions Complete code/app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"project_info": {
"project_number": "21625424728",
"firebase_url": "https://uber-798e0.firebaseio.com",
"project_id": "uber-798e0",
"storage_bucket": "uber-798e0.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:21625424728:android:366153b4406cffb8",
"android_client_info": {
"package_name": "com.softup.utkarsh.uber"
}
},
"oauth_client": [
{
"client_id": "21625424728-1q85m5dvv7pesadams64ti492a6flfc6.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.softup.utkarsh.uber",
"certificate_hash": "e620ca98dc64d4a59cc867cccb87ee6e0913abf5"
}
},
{
"client_id": "21625424728-fhujpkrdkte2g7rucdkjoqvgcdtick8l.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyD1EUcJZ2OFQ3habqilOdfo2grbguSmO18"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "21625424728-fhujpkrdkte2g7rucdkjoqvgcdtick8l.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}
21 changes: 21 additions & 0 deletions Complete code/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.softup.utkarsh.uber;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("com.softup.utkarsh.uber", appContext.getPackageName());
}
}
26 changes: 26 additions & 0 deletions Complete code/app/src/debug/res/values/google_maps_api.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<resources>
<!--
TODO: Before you run your application, you need a Google Maps API key.

To get one, follow this link, follow the directions and press "Create" at the end:

https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=E6:20:CA:98:DC:64:D4:A5:9C:C8:67:CC:CB:87:EE:6E:09:13:AB:F5%3Bcom.softup.utkarsh.uber

You can also add your credentials to an existing key, using these values:

Package name:
E6:20:CA:98:DC:64:D4:A5:9C:C8:67:CC:CB:87:EE:6E:09:13:AB:F5

SHA-1 certificate fingerprint:
E6:20:CA:98:DC:64:D4:A5:9C:C8:67:CC:CB:87:EE:6E:09:13:AB:F5

Alternatively, follow the directions here:
https://developers.google.com/maps/documentation/android/start#get-key

Once you have your key (it starts with "AIza"), replace the "google_maps_key"
string in this file.
-->
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
AIzaSyCGBMKqJny_m658EFB-42vAaYKxOdpoJXI
</string>
</resources>
65 changes: 65 additions & 0 deletions Complete code/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.softup.utkarsh.uber">

<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the 'MyLocation' functionality.
-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />

<activity android:name=".CustommerCall" />

<service android:name=".Service.MyFirebaseIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<service android:name=".Service.MyFirebaseMessaging">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>

<activity
android:name=".DriverTracking"
android:label="@string/title_activity_driver_tracking" />
<activity
android:name=".TripDetail"
android:label="@string/title_activity_trip_detail" />
<activity
android:name=".DriverHome"
android:label="@string/title_activity_driver_home"
android:theme="@style/AppTheme"></activity>
</application>

</manifest>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.softup.utkarsh.uber.Common;

import android.location.Location;

import com.softup.utkarsh.uber.Model.User;
import com.softup.utkarsh.uber.Remote.FCMClient;
import com.softup.utkarsh.uber.Remote.IFCMService;
import com.softup.utkarsh.uber.Remote.IGoogleAPI;
import com.softup.utkarsh.uber.Remote.RetrofitClient;

public class Common
{

public static final String driver_tb1 = "Drivers";
public static final String user_driver_tb1 = "DriversInformation";
public static final String user_rider_tb1 = "RidersInformation";
public static final String pickup_request_tb1 = "PickupRequest";
public static final String token_tb1 = "Tokens";
public static final int PICK_IMAGE_REQUEST = 9999 ;

public static User currentUser;

public static Location mLastLocation=null;

public static final String baseURL = "https://maps.googleapis.com";
public static final String fcmURL = "https://fcm.googleapis.com/";

public static double base_fare = 1.00;
private static double time_rate = 0.00;
private static double distance_rate = 1.00;

public static double formulaPrice(double km,double min)
{
return base_fare+(distance_rate*km)+(time_rate*min);
}

public static IGoogleAPI getGoogleAPI()
{
return RetrofitClient.getClient(baseURL).create(IGoogleAPI.class);
}

public static IFCMService getFCMService()
{
return FCMClient.getClient(fcmURL).create(IFCMService.class);
}
}
Loading