├── .gitignore
├── .idea
├── codeStyles
│ └── Project.xml
├── gradle.xml
├── misc.xml
└── runConfigurations.xml
├── README.md
├── User_manual_Make_Payment_App.pdf
├── app
├── .gitignore
├── build.gradle
├── google-services.json
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── login
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── login
│ │ │ ├── CandidateDetails.java
│ │ │ ├── Channel.java
│ │ │ ├── DBHelper.java
│ │ │ ├── Listofcandidates.java
│ │ │ ├── MainActivity.java
│ │ │ ├── MainActivity1.java
│ │ │ ├── Newuser.java
│ │ │ ├── NothingSelectedSpinnerAdapter.java
│ │ │ ├── Receiver.java
│ │ │ ├── a.java
│ │ │ └── changepassword.java
│ └── res
│ │ ├── drawable-v24
│ │ ├── blueback.jpg
│ │ ├── blues.jpg
│ │ ├── curved_view.xml
│ │ ├── curved_view1.xml
│ │ ├── curved_view2.xml
│ │ ├── curved_view3.xml
│ │ ├── goldbutton.jpg
│ │ ├── gradient1.xml
│ │ ├── gradient2.xml
│ │ ├── greenback.jpg
│ │ └── ic_account_circle_black_24dp.xml
│ │ ├── drawable
│ │ ├── blueback.jpg
│ │ ├── buttonback.jpg
│ │ ├── curved_view2.xml
│ │ └── gradient.xml
│ │ ├── font
│ │ └── calligraffitti.xml
│ │ ├── layout
│ │ ├── activity_a.xml
│ │ ├── activity_candidate_details.xml
│ │ ├── activity_changepassword.xml
│ │ ├── activity_fetch_contacts.xml
│ │ ├── activity_listofcandidates.xml
│ │ ├── activity_main.xml
│ │ ├── activity_main1.xml
│ │ ├── activity_newuser.xml
│ │ ├── contact_spinner_row_nothing_selected.xml
│ │ ├── contact_spinner_row_nothing_selected1.xml
│ │ ├── contact_spinner_row_nothing_selected2.xml
│ │ ├── contact_spinner_row_nothing_selected3.xml
│ │ ├── contact_spinner_row_nothing_selected_arr.xml
│ │ ├── contact_spinner_row_nothing_selected_dept.xml
│ │ └── contactlist_row.xml
│ │ ├── menu
│ │ └── menu.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.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
│ │ └── values
│ │ ├── colors.xml
│ │ ├── font_certs.xml
│ │ ├── preloaded_fonts.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── example
│ └── login
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.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 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | xmlns:android
14 |
15 | ^$
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | xmlns:.*
25 |
26 | ^$
27 |
28 |
29 | BY_NAME
30 |
31 |
32 |
33 |
34 |
35 |
36 | .*:id
37 |
38 | http://schemas.android.com/apk/res/android
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | .*:name
48 |
49 | http://schemas.android.com/apk/res/android
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | name
59 |
60 | ^$
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | style
70 |
71 | ^$
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | .*
81 |
82 | ^$
83 |
84 |
85 | BY_NAME
86 |
87 |
88 |
89 |
90 |
91 |
92 | .*
93 |
94 | http://schemas.android.com/apk/res/android
95 |
96 |
97 | ANDROID_ATTRIBUTE_ORDER
98 |
99 |
100 |
101 |
102 |
103 |
104 | .*
105 |
106 | .*
107 |
108 |
109 | BY_NAME
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TicketBookingSystem
2 | For understading the working of Application: Refer the User Manual PDF File attached herewith for the same.
3 |
4 | Don't Forget to Subscribe My Channel , like video and share to your friends. If you want to learn any new things then comment over that. We will make new video on that As soon As Possible.
5 |
--------------------------------------------------------------------------------
/User_manual_Make_Payment_App.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/User_manual_Make_Payment_App.pdf
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'com.google.gms.google-services'
3 | android {
4 | compileSdkVersion 29
5 | buildToolsVersion "29.0.3"
6 |
7 | defaultConfig {
8 | applicationId "com.example.login"
9 | minSdkVersion 16
10 | targetSdkVersion 29
11 | versionCode 1
12 | versionName "1.0"
13 | multiDexEnabled true
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 |
26 | dependencies {
27 | implementation fileTree(dir: 'libs', include: ['*.jar'])
28 | implementation 'com.android.support:multidex:1.0.3'
29 | implementation 'com.google.firebase:firebase-auth:19.2.0'
30 | implementation 'com.google.firebase:firebase-database:19.2.0'
31 | implementation 'com.google.firebase:firebase-firestore:21.4.0'
32 | implementation 'androidx.appcompat:appcompat:1.1.0'
33 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
34 | testImplementation 'junit:junit:4.12'
35 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
36 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
37 | implementation 'androidx.recyclerview:recyclerview:1.1.0'
38 | }
39 |
--------------------------------------------------------------------------------
/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "876395909774",
4 | "firebase_url": "https://login-cc143.firebaseio.com",
5 | "project_id": "login-cc143",
6 | "storage_bucket": "login-cc143.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:876395909774:android:fb90636842d9c38dbaafdf",
12 | "android_client_info": {
13 | "package_name": "com.example.login"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "876395909774-r3rnptc2lkufjt2tq7us91aoqeigmk7f.apps.googleusercontent.com",
19 | "client_type": 1,
20 | "android_info": {
21 | "package_name": "com.example.login",
22 | "certificate_hash": "e32bb730f2d809c0e057fde2ddf3f673c53ebd99"
23 | }
24 | },
25 | {
26 | "client_id": "876395909774-irik1oinnql83c1a7n1vnvgi3luifpdj.apps.googleusercontent.com",
27 | "client_type": 3
28 | }
29 | ],
30 | "api_key": [
31 | {
32 | "current_key": "AIzaSyBmbuC7pVc20LpoX-4F02FzIOuXWpUkjz8"
33 | }
34 | ],
35 | "services": {
36 | "appinvite_service": {
37 | "other_platform_oauth_client": [
38 | {
39 | "client_id": "876395909774-irik1oinnql83c1a7n1vnvgi3luifpdj.apps.googleusercontent.com",
40 | "client_type": 3
41 | }
42 | ]
43 | }
44 | }
45 | }
46 | ],
47 | "configuration_version": "1"
48 | }
--------------------------------------------------------------------------------
/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/androidTest/java/com/example/login/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
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 |
25 | assertEquals("com.example.login", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
33 |
34 |
35 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/login/CandidateDetails.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.content.Intent;
6 | import android.os.Bundle;
7 | import android.view.View;
8 | import android.widget.Button;
9 | import android.widget.TextView;
10 |
11 | public class CandidateDetails extends AppCompatActivity {
12 | TextView t1,t2,t3,t4,t5,t6,t7,t8,t9;
13 | Button goback;
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_candidate_details);
18 |
19 | t1=(TextView)findViewById(R.id.detail11);
20 | t2=(TextView)findViewById(R.id.detail22);
21 | t3=(TextView)findViewById(R.id.detail33);
22 | t4=(TextView)findViewById(R.id.detail44);
23 | t5=(TextView)findViewById(R.id.detail55);
24 | t6=(TextView)findViewById(R.id.detail66);
25 | t7=(TextView)findViewById(R.id.detail77);
26 | t8=(TextView)findViewById(R.id.detail88);
27 | t9=(TextView)findViewById(R.id.detail99);
28 | goback=(Button)findViewById(R.id.but1);
29 |
30 | Bundle b=getIntent().getExtras();
31 | t1.setText(b.getString("name"));
32 | t2.setText(String.valueOf(b.getInt("age")));
33 | t3.setText(String.valueOf(b.getLong("mobileno")));
34 | t4.setText(b.getString("tickettype"));
35 | t5.setText(b.getString("servicetype"));
36 | t6.setText(b.getString("departure"));
37 | t7.setText(b.getString("arrival"));
38 | t8.setText(b.getString("dates"));
39 | t9.setText(b.getString("times"));
40 |
41 | goback.setOnClickListener(new View.OnClickListener() {
42 | @Override
43 | public void onClick(View v) {
44 | Intent int2=new Intent(CandidateDetails.this,MainActivity.class);
45 | startActivity(int2);
46 | }
47 | });
48 | }
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/login/Channel.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
2 |
3 | import android.app.Application;
4 | import android.app.NotificationChannel;
5 | import android.app.NotificationManager;
6 | import android.os.Build;
7 |
8 | public class Channel extends Application {
9 | public static final String CHANNEL_ID = "channel";
10 |
11 | @Override
12 | public void onCreate() {
13 | super.onCreate();
14 | createNotification();
15 | }
16 |
17 | public void createNotification(){
18 | if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O){
19 | NotificationChannel notificationChannel = new NotificationChannel(
20 | CHANNEL_ID,
21 | "Channel",
22 | NotificationManager.IMPORTANCE_HIGH
23 | );
24 | NotificationManager notificationManager = getSystemService(NotificationManager.class);
25 | notificationManager.createNotificationChannel(notificationChannel);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/login/DBHelper.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
2 |
3 | import android.content.ContentValues;
4 | import android.content.Context;
5 | import android.database.Cursor;
6 | import android.database.sqlite.SQLiteDatabase;
7 | import android.database.sqlite.SQLiteOpenHelper;
8 | import android.util.Log;
9 |
10 | public class DBHelper {
11 | public static final String DATABASE_NAME = "ticketdetails";
12 | public static final int DATABASE_VERSION = 1;
13 | public static final String TABLE_NAME = "candidatedetails";
14 | public static final String KEY_ID = "_id";
15 | public static final String COL_NAME = "Name";
16 | public static final String COL_NAME1 = "Age";
17 | public static final String COL_NAME2 = "Mobile_No";
18 | public static final String COL_NAME3 = "Ticket_Type";
19 | public static final String COL_NAME4 = "Service_Type";
20 | public static final String COL_NAME5 = "Departure";
21 | public static final String COL_NAME6 = "Arrival";
22 | public static final String COL_NAME7 = "Date";
23 | public static final String COL_NAME8 = "Time";
24 | public static final int COL_INDEX = 1;
25 |
26 | private static final String DB_CREATE;
27 |
28 | static {
29 | DB_CREATE = "CREATE TABLE " + TABLE_NAME + "("
30 | + KEY_ID + " INTEGER PRIMARY KEY autoincrement, "
31 | + COL_NAME + " TEXT NOT NULL,"
32 | + COL_NAME1 + " INTEGER NOT NULL,"
33 | + COL_NAME2 + " INTEGER NOT NULL,"
34 | + COL_NAME3 + " TEXT NOT NULL,"
35 | + COL_NAME4 + " TEXT NOT NULL,"
36 | + COL_NAME5 + " TEXT NOT NULL,"
37 | + COL_NAME6 + " TEXT NOT NULL,"
38 | + COL_NAME7 + " TEXT NOT NULL,"
39 | + COL_NAME8 + " TEXT NOT NULL" + ")";
40 | }
41 |
42 | private SQLiteDatabase database;
43 | private final Context context;
44 | private MyDBAdapter helper;
45 |
46 | public DBHelper(Context context)
47 | {
48 | this.context = context;
49 | helper = new MyDBAdapter(context,DATABASE_NAME,
50 | null, DATABASE_VERSION);
51 | }
52 | public DBHelper open()
53 | {
54 | database = helper.getWritableDatabase();
55 | //Create and/or open a database that will be used for
56 | // reading and writing.
57 | return this;
58 | }
59 |
60 | public void close()
61 | {
62 | database.close();
63 | }
64 |
65 | public long insertEntry(String Name, Integer Age, Long MobileNo, String TicketType, String ServiceType, String Depart, String Arrive, String Date, String Time) {
66 |
67 | ContentValues contentValues=new ContentValues();
68 | contentValues.put(COL_NAME,Name);
69 | contentValues.put(COL_NAME1,Age);
70 | contentValues.put(COL_NAME2,MobileNo);
71 | contentValues.put(COL_NAME3,TicketType);
72 | contentValues.put(COL_NAME4,ServiceType);
73 | contentValues.put(COL_NAME5,Depart);
74 | contentValues.put(COL_NAME6,Arrive);
75 | contentValues.put(COL_NAME7,Date);
76 | contentValues.put(COL_NAME8,Time);
77 | return database.insert(TABLE_NAME,
78 | null, contentValues);
79 | /*nullColumnHack:
80 | nullColumnHack optional; may be null.
81 | SQL doesn't allow inserting a completely
82 | empty row without naming at least one column name.
83 | If your provided values is empty,
84 | no column names are known and
85 | an empty row can't be inserted.
86 | If not set to null, the nullColumnHack parameter
87 | provides the name of nullable column name
88 | to explicitly insert a NULL into in the case
89 | where your values is empty.
90 | For example, you want to insert an empty row into
91 | a table student(id, name), which id is auto generated
92 | and name is null. You could invoke like this:
93 | ContentValues cv = new ContentValues();
94 | db.insert("student", "name", cv);
95 | */
96 | }
97 | public boolean removeEntry(long rowIndex) {
98 | System.out.print(rowIndex);
99 | return database.delete(TABLE_NAME,
100 | KEY_ID+" = "+rowIndex,
101 | null)>0;
102 | }
103 |
104 | public Cursor getAllEntries() {
105 | return database.query(TABLE_NAME,
106 | new String[]{KEY_ID,COL_NAME,COL_NAME1,COL_NAME2,COL_NAME3,COL_NAME4,COL_NAME5,COL_NAME6,COL_NAME7,COL_NAME8},
107 | null, null,
108 | null, null, null);
109 | }
110 |
111 |
112 | public static class MyDBAdapter extends SQLiteOpenHelper
113 | {
114 |
115 | public MyDBAdapter(Context context, String name,
116 | SQLiteDatabase.CursorFactory factory,
117 | int version) {
118 | super(context, name, factory, version);
119 | //Create a helper object to create,
120 | // open, and/or manage a database.
121 | // The reason of passing null is you want the standard SQLiteCursor behaviour.
122 | // If you want to implement a specialized Cursor you can get it by by extending the Cursor class( this is for doing additional operations on the query results).
123 | // And in these cases, you can use the CursorFactory class to return an instance of your Cursor implementation.
124 | }
125 | @Override
126 | public void onCreate(SQLiteDatabase db) {
127 | db.execSQL(DB_CREATE);
128 | //Called when the database is created
129 | // for the first time.
130 | }
131 | @Override
132 | public void onUpgrade(SQLiteDatabase db,
133 | int oldVersion,
134 | int newVersion) {
135 | Log.w("Updation", "Data base version is being updates");
136 | db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
137 | onCreate(db);
138 | }
139 | }
140 | }
141 |
142 |
143 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/login/Listofcandidates.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
2 |
3 | import androidx.appcompat.app.AlertDialog;
4 | import androidx.appcompat.app.AppCompatActivity;
5 |
6 | import android.content.DialogInterface;
7 | import android.content.Intent;
8 | import android.database.Cursor;
9 | import android.os.Bundle;
10 | import android.view.View;
11 | import android.widget.AdapterView;
12 | import android.widget.ArrayAdapter;
13 | import android.widget.ListAdapter;
14 | import android.widget.ListView;
15 |
16 | import java.util.ArrayList;
17 | import java.util.List;
18 |
19 | public class Listofcandidates extends AppCompatActivity
20 | implements AdapterView.OnItemClickListener {
21 |
22 | private List username,tickettype,servicetype,departure,arrival,dates,times,combination;
23 | private List idList,ages;
24 | private List mobileno;
25 | int updateIndex;
26 | String updateusername;
27 | int updateage;
28 | long updatemobileno;
29 | String updatetickettype;
30 | String updateservicetype;
31 | String updatedeparture;
32 | String updatearrival;
33 | String updatedates;
34 | String updatetimes;
35 | ListAdapter la;
36 | ListView lv;
37 | DBHelper dhelper;
38 |
39 | @Override
40 | protected void onCreate(Bundle savedInstanceState) {
41 | super.onCreate(savedInstanceState);
42 | setContentView(R.layout.activity_listofcandidates);
43 | lv = (ListView)findViewById(R.id.listView);
44 | combination=new ArrayList();
45 | username=new ArrayList();
46 | ages=new ArrayList();
47 | mobileno=new ArrayList();
48 | tickettype=new ArrayList();
49 | servicetype=new ArrayList();
50 | departure=new ArrayList();
51 | arrival=new ArrayList();
52 | dates=new ArrayList();
53 | times=new ArrayList();
54 | idList = new ArrayList();
55 | dhelper = new DBHelper(this);
56 | dhelper.open();
57 | Cursor c = dhelper.getAllEntries();
58 | c.moveToFirst();
59 | for (int i =0; i(this,
76 | android.R.layout.simple_expandable_list_item_1,
77 | combination);
78 | lv.setAdapter(la);
79 | lv.setOnItemClickListener(this);
80 | dhelper.close();
81 | }
82 | @Override
83 | protected void onResume() {
84 | super.onResume();
85 | dhelper = new DBHelper(this);
86 | dhelper.open();
87 | combination.clear();
88 | idList.clear();
89 | username.clear();
90 | ages.clear();
91 | mobileno.clear();
92 | tickettype.clear();
93 | servicetype.clear();
94 | departure.clear();
95 | arrival.clear();
96 | dates.clear();
97 | times.clear();
98 | Cursor c1 = dhelper.getAllEntries();
99 | c1.moveToFirst();
100 | for (int i =0; i(this,android.R.layout.simple_expandable_list_item_1,combination);
118 | lv.setAdapter(la);
119 | lv.setOnItemClickListener(this);
120 | }
121 |
122 | @Override
123 | public void onItemClick(AdapterView> parent, View view, int position, long id) {
124 | final int indexvalue = idList.get(position);
125 | dhelper = new DBHelper(this);
126 | dhelper.open();
127 | updateIndex = idList.get(position);
128 | updateusername = username.get(position);
129 | updateage = ages.get(position);
130 | updatemobileno = mobileno.get(position);
131 | updatetickettype = tickettype.get(position);
132 | updateservicetype = servicetype.get(position);
133 | updatedeparture = departure.get(position);
134 | updatearrival = arrival.get(position);
135 | updatedates = dates.get(position);
136 | updatetimes = times.get(position);
137 | AlertDialog.Builder dialog = new AlertDialog.Builder(this);
138 | dialog.setTitle("Delete");
139 | dialog.setMessage("Do you want to delete "+ username.get(position) + " " + indexvalue);
140 | dialog.setPositiveButton("Delete", new DialogInterface.OnClickListener() {
141 | @Override
142 | public void onClick(DialogInterface dialogInterface, int i) {
143 | boolean result = dhelper.removeEntry(indexvalue);
144 | dhelper.close();
145 | onResume();
146 | }
147 | });
148 |
149 | dialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
150 | @Override
151 | public void onClick(DialogInterface dialogInterface, int i) {
152 | dhelper.close();
153 | onResume();
154 | }
155 | });
156 |
157 | dialog.setNeutralButton("Show Details", new DialogInterface.OnClickListener() {
158 | public void onClick(DialogInterface dlg, int sumthin) {
159 | Bundle b = new Bundle();
160 | b.putString("name",updateusername);
161 | b.putInt("age",updateage);
162 | b.putLong("mobileno",updatemobileno);
163 | b.putString("tickettype",updatetickettype);
164 | b.putString("servicetype",updateservicetype);
165 | b.putString("departure",updatedeparture);
166 | b.putString("arrival",updatearrival);
167 | b.putString("dates",updatedates);
168 | b.putString("times",updatetimes);
169 |
170 | Intent int1 = new Intent(Listofcandidates.this,CandidateDetails.class);
171 | int1.putExtras(b);
172 | startActivity(int1);
173 | }
174 | });
175 |
176 | dialog.create();
177 | dialog.show();
178 |
179 | }
180 | }
181 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/login/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.appcompat.app.AppCompatActivity;
5 |
6 | import android.app.ProgressDialog;
7 | import android.content.Intent;
8 | import android.os.Bundle;
9 | import android.view.View;
10 | import android.widget.Button;
11 | import android.widget.EditText;
12 | import android.widget.TextView;
13 | import android.widget.Toast;
14 |
15 | import com.google.android.gms.tasks.OnCompleteListener;
16 | import com.google.android.gms.tasks.Task;
17 | import com.google.firebase.auth.AuthResult;
18 | import com.google.firebase.auth.FirebaseAuth;
19 | import com.google.firebase.auth.FirebaseUser;
20 |
21 | public class MainActivity extends AppCompatActivity {
22 |
23 | EditText email,password;
24 | Button login;
25 | TextView newuser;
26 | FirebaseAuth firebaseAuth;
27 | ProgressDialog progressDialog;
28 | TextView changepass;
29 | @Override
30 | protected void onCreate(Bundle savedInstanceState) {
31 | super.onCreate(savedInstanceState);
32 | setContentView(R.layout.activity_main);
33 | firebaseAuth=FirebaseAuth.getInstance();
34 | FirebaseUser user=firebaseAuth.getCurrentUser();
35 | if(user!=null)
36 | {
37 | Intent intent=new Intent(this,a.class);
38 | startActivity(intent);
39 | }
40 | email=(EditText)findViewById(R.id.semail);
41 | password=(EditText)findViewById(R.id.spassword);
42 | login=(Button)findViewById(R.id.slogin);
43 | newuser=(TextView) findViewById(R.id.snewuser);
44 | progressDialog=new ProgressDialog(this);
45 |
46 | changepass=(TextView)findViewById(R.id.sforgotpassword);
47 | changepass.setOnClickListener(new View.OnClickListener() {
48 | @Override
49 | public void onClick(View v) {
50 | Intent intent=new Intent(MainActivity.this,changepassword.class);
51 | startActivity(intent);
52 | }
53 | });
54 |
55 | newuser.setOnClickListener(new View.OnClickListener() {
56 | @Override
57 | public void onClick(View v) {
58 | Intent intent=new Intent(MainActivity.this,Newuser.class);
59 | startActivity(intent);
60 | }
61 | });
62 |
63 | login.setOnClickListener(new View.OnClickListener() {
64 | @Override
65 | public void onClick(View v) {
66 | String uemail = email.getText().toString().trim();
67 | String upass = password.getText().toString().trim();
68 | if (uemail.isEmpty() || upass.isEmpty()) {
69 | Toast.makeText(MainActivity.this, "Enter all dedtails", Toast.LENGTH_SHORT).show();
70 | } else {
71 | progressDialog.setMessage("Verifying email and password");
72 | progressDialog.show();
73 | firebaseAuth.signInWithEmailAndPassword(uemail, upass).addOnCompleteListener(new OnCompleteListener() {
74 | @Override
75 | public void onComplete(@NonNull Task task) {
76 | if (task.isSuccessful()) {
77 | progressDialog.dismiss();
78 | checkEmailverification();
79 | } else {
80 | progressDialog.dismiss();
81 | Toast.makeText(MainActivity.this, "email or password is incorrect", Toast.LENGTH_SHORT).show();
82 | }
83 | }
84 | }); }
85 | }
86 | });
87 | }
88 | private void checkEmailverification()
89 | {
90 | FirebaseUser firebaseUser=firebaseAuth.getCurrentUser();
91 | Boolean emailflag=firebaseUser.isEmailVerified();
92 | if(emailflag==true)
93 | { finish();
94 | Intent intent=new Intent(this,a.class);
95 | startActivity(intent);
96 | }
97 | else
98 | {
99 | Toast.makeText(this,"Please verify your email",Toast.LENGTH_SHORT).show();
100 | firebaseAuth.signOut();
101 | }
102 | }
103 |
104 |
105 | }
106 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/login/MainActivity1.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.app.DatePickerDialog;
6 | import android.app.LoaderManager;
7 | import android.app.TimePickerDialog;
8 | import android.content.Intent;
9 | import android.database.Cursor;
10 | import android.os.Bundle;
11 | import android.view.View;
12 | import android.widget.AdapterView;
13 | import android.widget.ArrayAdapter;
14 | import android.widget.Button;
15 | import android.widget.DatePicker;
16 | import android.widget.EditText;
17 | import android.widget.Spinner;
18 | import android.widget.Switch;
19 | import android.widget.TextView;
20 | import android.widget.TimePicker;
21 | import android.widget.Toast;
22 |
23 | import java.util.Calendar;
24 |
25 | public class MainActivity1 extends AppCompatActivity implements
26 | TimePickerDialog.OnTimeSetListener,
27 | DatePickerDialog.OnDateSetListener, AdapterView.OnItemSelectedListener, View.OnClickListener {
28 | private TextView mDateText, mTimeText;
29 | private Calendar mCalendar;
30 | private int mYear, mMonth, mHour, mMinute, mDay;
31 |
32 | private EditText UserName, UserAge, UserMobileNo;
33 | private Spinner TicketType, ServiceType, City1, City2;
34 | private Button BookTicket1, BookedTicket1;
35 | private String mMessage;
36 | private String mTime;
37 | private String mDate;
38 |
39 | private String[] Ticket;
40 | private String[] ServiceTrain;
41 | private String[] ServiceBus;
42 | private String[] ServiceFlight;
43 | private String[] ServiceConcert;
44 | private String[] Concert;
45 | private String[] ListOfCities;
46 |
47 | @Override
48 | protected void onCreate(Bundle savedInstanceState) {
49 | super.onCreate(savedInstanceState);
50 | setContentView(R.layout.activity_main1);
51 |
52 | UserName = (EditText)findViewById(R.id.user_name);
53 | UserAge = (EditText)findViewById(R.id.lage);
54 | UserMobileNo = (EditText)findViewById(R.id.lmobile);
55 | mDateText = (TextView) findViewById(R.id.set_date);
56 | mTimeText = (TextView) findViewById(R.id.set_time);
57 | BookTicket1 = (Button) findViewById(R.id.bookticket2);
58 | BookTicket1.setOnClickListener(this);
59 | BookedTicket1 = (Button) findViewById(R.id.bookedticket);
60 | BookedTicket1.setOnClickListener(this);
61 |
62 | Ticket = getResources().getStringArray(R.array.ticket_type);
63 | ServiceTrain = getResources().getStringArray(R.array.train_type);
64 | ServiceBus = getResources().getStringArray(R.array.bus_type);
65 | ServiceFlight = getResources().getStringArray(R.array.flight_type);
66 | ServiceConcert = getResources().getStringArray(R.array.live_concert);
67 | Concert = getResources().getStringArray(R.array.person_in_concert);
68 | ListOfCities = getResources().getStringArray(R.array.india_top_places);
69 |
70 | mCalendar = Calendar.getInstance();
71 | mHour = mCalendar.get(Calendar.HOUR_OF_DAY);
72 | mMinute = mCalendar.get(Calendar.MINUTE);
73 | mYear = mCalendar.get(Calendar.YEAR);
74 | mMonth = mCalendar.get(Calendar.MONTH) + 1;
75 | mDay = mCalendar.get(Calendar.DATE);
76 |
77 | mDate = mDay + "/" + mMonth + "/" + mYear;
78 | mTime = mHour + ":" + mMinute;
79 |
80 | mDateText.setText(mDate);
81 | mTimeText.setText(mTime);
82 |
83 | TicketType = (Spinner)findViewById(R.id.spinner1);
84 | ServiceType = (Spinner)findViewById(R.id.spinner2);
85 | City1 = (Spinner)findViewById(R.id.spinner3);
86 | City2 = (Spinner)findViewById(R.id.spinner4);
87 | ArrayAdapteradapter = new ArrayAdapter(MainActivity1.this,
88 | android.R.layout.simple_spinner_item,Ticket);
89 |
90 | adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
91 | TicketType.setPrompt("Select a Service for Ticket");
92 |
93 | TicketType.setAdapter(
94 | new NothingSelectedSpinnerAdapter(
95 | adapter,
96 | R.layout.contact_spinner_row_nothing_selected,
97 | // R.layout.contact_spinner_nothing_selected_dropdown, // Optional
98 | this));
99 | //TicketType.setAdapter(adapter);
100 | TicketType.setOnItemSelectedListener(this);
101 | }
102 |
103 | // On clicking Time picker
104 | public void setTime(View v){
105 | // TODO Auto-generated method stub
106 | Calendar mcurrentTime = Calendar.getInstance();
107 | int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);
108 | int minute = mcurrentTime.get(Calendar.MINUTE);
109 | TimePickerDialog mTimePicker;
110 | mTimePicker = new TimePickerDialog(MainActivity1.this, new TimePickerDialog.OnTimeSetListener() {
111 | @Override
112 | public void onTimeSet(TimePicker timePicker, int hourOfDay, int minute) {
113 | mHour = hourOfDay;
114 | mMinute = minute;
115 | if (minute < 10) {
116 | if (hourOfDay > 11) {
117 | if (hourOfDay > 12) {
118 | hourOfDay = hourOfDay - 12;
119 | }
120 | mTime = hourOfDay + ":" + "0" + minute + " PM";
121 | }
122 | else {
123 | if (hourOfDay == 0){
124 | hourOfDay = hourOfDay + 12;
125 | }
126 | mTime = hourOfDay + ":" + "0" + minute + " AM";
127 | }
128 | } else {
129 | if (hourOfDay > 11) {
130 | if (hourOfDay > 12) {
131 | hourOfDay = hourOfDay - 12;
132 | }
133 | mTime = hourOfDay + ":" + minute + " PM";
134 | }
135 | else {
136 | if (hourOfDay == 0){
137 | hourOfDay = hourOfDay + 12;
138 | }
139 | mTime = hourOfDay + ":" + minute + " AM";
140 | }
141 | }
142 | mTimeText.setText(mTime);
143 | }
144 | }, hour, minute, true);//Yes 24 hour time
145 | mTimePicker.setTitle("Select Time");
146 | mTimePicker.show();
147 | }
148 |
149 | // On clicking Date picker
150 | public void setDate(View v){
151 | Calendar mcurrentDate = Calendar.getInstance();
152 | int mmYear = mcurrentDate.get(Calendar.YEAR);
153 | int mmMonth = mcurrentDate.get(Calendar.MONTH);
154 | int mmDay = mcurrentDate.get(Calendar.DAY_OF_MONTH);
155 |
156 | DatePickerDialog mDatePicker;
157 | mDatePicker = new DatePickerDialog(MainActivity1.this, new DatePickerDialog.OnDateSetListener() {
158 | public void onDateSet(DatePicker datepicker, int year, int monthOfYear, int dayOfMonth) {
159 | monthOfYear ++;
160 | mDay = dayOfMonth;
161 | mMonth = monthOfYear;
162 | mYear = year;
163 | mDate = dayOfMonth + "/" + monthOfYear + "/" + year;
164 | mDateText.setText(mDate);
165 | }
166 | }, mmYear, mmMonth, mmDay);
167 | mDatePicker.setTitle("Select Date");
168 | mDatePicker.show();
169 | }
170 |
171 | @Override
172 | public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
173 | month ++;
174 | mDay = dayOfMonth;
175 | mMonth = month;
176 | mYear = year;
177 | mDate = dayOfMonth + "/" + month + "/" + year;
178 | mDateText.setText(mDate);
179 | }
180 |
181 | @Override
182 | public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
183 | mHour = hourOfDay;
184 | mMinute = minute;
185 | if (minute < 10) {
186 | if (hourOfDay > 11) {
187 | if (hourOfDay > 12) {
188 | hourOfDay = hourOfDay - 12;
189 | }
190 | mTime = hourOfDay + ":" + "0" + minute + " PM";
191 | }
192 | else {
193 | if (hourOfDay == 0){
194 | hourOfDay = hourOfDay + 12;
195 | }
196 | mTime = hourOfDay + ":" + "0" + minute + " AM";
197 | }
198 | } else {
199 | if (hourOfDay > 11) {
200 | if (hourOfDay > 12) {
201 | hourOfDay = hourOfDay - 12;
202 | }
203 | mTime = hourOfDay + ":" + minute + " PM";
204 | }
205 | else {
206 | if (hourOfDay == 0){
207 | hourOfDay = hourOfDay + 12;
208 | }
209 | mTime = hourOfDay + ":" + minute + " AM";
210 | }
211 | }
212 | mTimeText.setText(mTime);
213 | }
214 |
215 | @Override
216 | public void onItemSelected(AdapterView> parent, View v, int position, long id) {
217 | //String selectedClass = parent.getItemAtPosition(position).toString();
218 | switch (parent.getId()) {
219 | case R.id.spinner1:
220 | switch (position) {
221 | case 1:
222 | // Whatever you want to happen when the first item gets selected
223 | ServiceType.setVisibility(View.VISIBLE);
224 | ArrayAdapter adapter1 = new ArrayAdapter(MainActivity1.this,
225 | android.R.layout.simple_spinner_item, ServiceBus);
226 |
227 | adapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
228 |
229 | ServiceType.setAdapter(
230 | new NothingSelectedSpinnerAdapter(
231 | adapter1,
232 | R.layout.contact_spinner_row_nothing_selected1,
233 | // R.layout.contact_spinner_nothing_selected_dropdown, // Optional
234 | this));
235 | //TicketType.setAdapter(adapter);
236 | ServiceType.setOnItemSelectedListener(this);
237 | break;
238 | case 2:
239 | // Whatever you want to happen when the second item gets selected
240 | ServiceType.setVisibility(View.VISIBLE);
241 | ArrayAdapter adapter2 = new ArrayAdapter(MainActivity1.this,
242 | android.R.layout.simple_spinner_item, ServiceTrain);
243 |
244 | adapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
245 |
246 | ServiceType.setAdapter(
247 | new NothingSelectedSpinnerAdapter(
248 | adapter2,
249 | R.layout.contact_spinner_row_nothing_selected2,
250 | // R.layout.contact_spinner_nothing_selected_dropdown, // Optional
251 | this));
252 | //TicketType.setAdapter(adapter);
253 | ServiceType.setOnItemSelectedListener(this);
254 | break;
255 | case 3:
256 | // Whatever you want to happen when the thrid item gets selected
257 | ServiceType.setVisibility(View.VISIBLE);
258 | ArrayAdapter adapter3 = new ArrayAdapter(MainActivity1.this,
259 | android.R.layout.simple_spinner_item, ServiceFlight);
260 |
261 | adapter3.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
262 |
263 | ServiceType.setAdapter(
264 | new NothingSelectedSpinnerAdapter(
265 | adapter3,
266 | R.layout.contact_spinner_row_nothing_selected3,
267 | // R.layout.contact_spinner_nothing_selected_dropdown, // Optional
268 | this));
269 | //TicketType.setAdapter(adapter);
270 | ServiceType.setOnItemSelectedListener(this);
271 | break;
272 | }
273 | break;
274 | case R.id.spinner2:
275 | City1.setVisibility(View.VISIBLE);
276 | City2.setVisibility(View.VISIBLE);
277 | ArrayAdapter adapter1 = new ArrayAdapter(MainActivity1.this,
278 | android.R.layout.simple_spinner_item, ListOfCities);
279 |
280 | adapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
281 |
282 | ArrayAdapter adapter2 = new ArrayAdapter(MainActivity1.this,
283 | android.R.layout.simple_spinner_item, ListOfCities);
284 |
285 | adapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
286 |
287 | City1.setAdapter(
288 | new NothingSelectedSpinnerAdapter(
289 | adapter1,
290 | R.layout.contact_spinner_row_nothing_selected_arr,
291 | // R.layout.contact_spinner_nothing_selected_dropdown, // Optional
292 | this));
293 | City1.setOnItemSelectedListener(this);
294 | City2.setAdapter(
295 | new NothingSelectedSpinnerAdapter(
296 | adapter2,
297 | R.layout.contact_spinner_row_nothing_selected_dept,
298 | // R.layout.contact_spinner_nothing_selected_dropdown, // Optional
299 | this));
300 | City2.setOnItemSelectedListener(this);
301 | break;
302 | }
303 | }
304 |
305 | @Override
306 | public void onNothingSelected(AdapterView> parent) {
307 |
308 | }
309 |
310 | @Override
311 | public void onClick(View v) {
312 | int id=v.getId();
313 | switch (id) {
314 | case R.id.bookticket2:
315 | String temp = UserName.getText().toString();
316 | String temp1 = UserAge.getText().toString();
317 | String temp2 = UserMobileNo.getText().toString();
318 | String temp3 = TicketType.getSelectedItem().toString();
319 | String temp4 = ServiceType.getSelectedItem().toString();
320 | String temp5 = City1.getSelectedItem().toString();
321 | String temp6 = City2.getSelectedItem().toString();
322 | String temp7 = mDateText.getText().toString();
323 | String temp8 = mTimeText.getText().toString();
324 | if (temp.equals("") || temp == null || temp.length() == 0 ||
325 | temp1.equals("") || temp1 == null || temp1.length() == 0 ||
326 | temp2.equals("") || temp2 == null || temp2.length() == 0 ||
327 | temp3.equals("") || temp3 == null || temp3.length() == 0 ||
328 | temp4.equals("") || temp4 == null || temp4.length() == 0 ||
329 | temp5.equals("") || temp5 == null || temp5.length() == 0 ||
330 | temp6.equals("") || temp6 == null || temp6.length() == 0 ||
331 | temp7.equals("") || temp7 == null || temp7.length() == 0 ||
332 | temp8.equals("") || temp8 == null || temp8.length() == 0) {
333 | Toast.makeText(this, "Some Field is Empty", Toast.LENGTH_LONG).show();
334 | } else {
335 | DBHelper addb1 = new DBHelper(this);
336 | addb1.open();
337 | addb1.insertEntry(UserName.getText().toString(), Integer.parseInt(UserAge.getText().toString()), Long.parseLong(UserMobileNo.getText().toString()), TicketType.getSelectedItem().toString(), ServiceType.getSelectedItem().toString(), City1.getSelectedItem().toString(), City2.getSelectedItem().toString(), mDateText.getText().toString(), mTimeText.getText().toString());
338 | addb1.close();
339 | Intent i1 = new Intent(MainActivity1.this , Receiver.class);
340 | Bundle b = new Bundle();
341 | b.putString("name",UserName.getText().toString());
342 | b.putInt("age",Integer.parseInt(UserAge.getText().toString()));
343 | b.putLong("mobileno",Long.parseLong(UserMobileNo.getText().toString()));
344 | b.putString("tickettype",TicketType.getSelectedItem().toString());
345 | b.putString("servicetype",ServiceType.getSelectedItem().toString());
346 | b.putString("departure",City1.getSelectedItem().toString());
347 | b.putString("arrival",City2.getSelectedItem().toString());
348 | b.putString("dates",mDateText.getText().toString());
349 | b.putString("times",mTimeText.getText().toString());
350 | i1.putExtras(b);
351 | sendBroadcast(i1);
352 | UserName.setText("");
353 | UserAge.setText("");
354 | UserMobileNo.setText("");
355 | mDateText.setText("");
356 | mTimeText.setText("");
357 | ArrayAdapteradapter = new ArrayAdapter(MainActivity1.this,
358 | android.R.layout.simple_spinner_item,Ticket);
359 |
360 | adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
361 | TicketType.setPrompt("Select a Service for Ticket");
362 | TicketType.setAdapter(
363 | new NothingSelectedSpinnerAdapter(
364 | adapter,
365 | R.layout.contact_spinner_row_nothing_selected,
366 | // R.layout.contact_spinner_nothing_selected_dropdown, // Optional
367 | this));
368 | TicketType.setOnItemSelectedListener(this);
369 | ServiceType.setVisibility(View.GONE);
370 | City1.setVisibility(View.GONE);
371 | City2.setVisibility(View.GONE);
372 | Toast.makeText(this, "Ticket Booked Successfully, Proceed With Your Payment Later", Toast.LENGTH_LONG).show();
373 |
374 | }
375 | break;
376 | case R.id.bookedticket:
377 | Intent int1=new Intent(MainActivity1.this,Listofcandidates.class);
378 | startActivity(int1);
379 | break;
380 | }
381 | }
382 | }
383 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/login/Newuser.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.appcompat.app.AppCompatActivity;
5 |
6 | import android.content.Intent;
7 | import android.os.Bundle;
8 | import android.view.View;
9 | import android.widget.Button;
10 | import android.widget.EditText;
11 | import android.widget.ImageView;
12 | import android.widget.TextView;
13 | import android.widget.Toast;
14 |
15 | import com.google.android.gms.tasks.OnCompleteListener;
16 | import com.google.android.gms.tasks.Task;
17 | import com.google.firebase.auth.AuthResult;
18 | import com.google.firebase.auth.FirebaseAuth;
19 | import com.google.firebase.auth.FirebaseUser;
20 | import com.google.firebase.database.DatabaseReference;
21 | import com.google.firebase.database.FirebaseDatabase;
22 |
23 | public class Newuser extends AppCompatActivity {
24 | EditText username,useremail,userpassword,userage;
25 | Button usersignup;
26 | TextView userlogin;
27 | FirebaseAuth firebaseAuth;
28 | ImageView userprofile;
29 |
30 | String uname,uemail,uage;
31 | @Override
32 | protected void onCreate(Bundle savedInstanceState) {
33 | super.onCreate(savedInstanceState);
34 | setContentView(R.layout.activity_newuser);
35 | firebaseAuth=FirebaseAuth.getInstance();
36 |
37 | username=(EditText)findViewById(R.id.user_name);
38 | useremail=(EditText)findViewById(R.id.lemail);
39 | userpassword=(EditText)findViewById(R.id.lpassword);
40 | usersignup=(Button)findViewById(R.id.signup);
41 | userlogin=(TextView)findViewById(R.id.login);
42 |
43 | userage=(EditText)findViewById(R.id.lage);
44 | userprofile=(ImageView)findViewById(R.id.profile_image);
45 |
46 | usersignup.setOnClickListener(new View.OnClickListener() {
47 | @Override
48 | public void onClick(View v) {
49 | uname=username.getText().toString().trim();
50 | uemail=useremail.getText().toString().trim();
51 | uage=userage.getText().toString().trim();
52 | String upassword=userpassword.getText().toString().trim();
53 |
54 | if(uname.isEmpty() || uemail.isEmpty() || upassword.isEmpty()|| uage.isEmpty())
55 | {
56 | Toast.makeText(Newuser.this,"Please fill all details",Toast.LENGTH_SHORT).show();
57 | }
58 | else
59 | {
60 | firebaseAuth.createUserWithEmailAndPassword(uemail,upassword).addOnCompleteListener(new OnCompleteListener() {
61 | @Override
62 | public void onComplete(@NonNull Task task) {
63 | if(task.isSuccessful())
64 | {
65 | sendEmailVerification1();
66 | }
67 | else
68 | {
69 | Toast.makeText(Newuser.this,"Registation failed",Toast.LENGTH_SHORT).show();
70 | }
71 | }
72 | });
73 | }
74 | }
75 | });
76 |
77 | userlogin.setOnClickListener(new View.OnClickListener() {
78 | @Override
79 | public void onClick(View v) {
80 | Intent intent=new Intent(Newuser.this,MainActivity.class);
81 | startActivity(intent);
82 | }
83 | });
84 | }
85 |
86 | private void sendEmailVerification1()
87 | {
88 | final FirebaseUser firebaseUser=firebaseAuth.getCurrentUser();
89 | if(firebaseUser!=null)
90 | {
91 | firebaseUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener() {
92 | @Override
93 | public void onComplete(@NonNull Task task) {
94 | if(task.isSuccessful()){
95 | Toast.makeText(Newuser.this,"Succesfully registered,verfication mail is sent",Toast.LENGTH_SHORT).show();
96 | firebaseAuth.signOut();
97 | finish();
98 | Intent intent=new Intent(Newuser.this,MainActivity.class);
99 | startActivity(intent);
100 | }
101 | else
102 | {
103 | Toast.makeText(Newuser.this,"Verification mail isn't sent",Toast.LENGTH_SHORT).show();
104 | }
105 | }
106 | });
107 | }
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/login/NothingSelectedSpinnerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
2 |
3 | import android.content.Context;
4 | import android.database.DataSetObserver;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.ListAdapter;
9 | import android.widget.SpinnerAdapter;
10 |
11 | /**
12 | * Decorator Adapter to allow a Spinner to show a 'Nothing Selected...' initially
13 | * displayed instead of the first choice in the Adapter.
14 | */
15 | public class NothingSelectedSpinnerAdapter implements SpinnerAdapter, ListAdapter {
16 |
17 | protected static final int EXTRA = 1;
18 | protected SpinnerAdapter adapter;
19 | protected Context context;
20 | protected int nothingSelectedLayout;
21 | protected int nothingSelectedDropdownLayout;
22 | protected LayoutInflater layoutInflater;
23 |
24 | /**
25 | * Use this constructor to have NO 'Select One...' item, instead use
26 | * the standard prompt or nothing at all.
27 | * @param spinnerAdapter wrapped Adapter.
28 | * @param nothingSelectedLayout layout for nothing selected, perhaps
29 | * you want text grayed out like a prompt...
30 | * @param context
31 | */
32 | public NothingSelectedSpinnerAdapter(
33 | SpinnerAdapter spinnerAdapter,
34 | int nothingSelectedLayout, Context context) {
35 |
36 | this(spinnerAdapter, nothingSelectedLayout, -1, context);
37 | }
38 |
39 | /**
40 | * Use this constructor to Define your 'Select One...' layout as the first
41 | * row in the returned choices.
42 | * If you do this, you probably don't want a prompt on your spinner or it'll
43 | * have two 'Select' rows.
44 | * @param spinnerAdapter wrapped Adapter. Should probably return false for isEnabled(0)
45 | * @param nothingSelectedLayout layout for nothing selected, perhaps you want
46 | * text grayed out like a prompt...
47 | * @param nothingSelectedDropdownLayout layout for your 'Select an Item...' in
48 | * the dropdown.
49 | * @param context
50 | */
51 | public NothingSelectedSpinnerAdapter(SpinnerAdapter spinnerAdapter,
52 | int nothingSelectedLayout, int nothingSelectedDropdownLayout, Context context) {
53 | this.adapter = spinnerAdapter;
54 | this.context = context;
55 | this.nothingSelectedLayout = nothingSelectedLayout;
56 | this.nothingSelectedDropdownLayout = nothingSelectedDropdownLayout;
57 | layoutInflater = LayoutInflater.from(context);
58 | }
59 |
60 | @Override
61 | public final View getView(int position, View convertView, ViewGroup parent) {
62 | // This provides the View for the Selected Item in the Spinner, not
63 | // the dropdown (unless dropdownView is not set).
64 | if (position == 0) {
65 | return getNothingSelectedView(parent);
66 | }
67 | return adapter.getView(position - EXTRA, null, parent); // Could re-use
68 | // the convertView if possible.
69 | }
70 |
71 | /**
72 | * View to show in Spinner with Nothing Selected
73 | * Override this to do something dynamic... e.g. "37 Options Found"
74 | * @param parent
75 | * @return
76 | */
77 | protected View getNothingSelectedView(ViewGroup parent) {
78 | return layoutInflater.inflate(nothingSelectedLayout, parent, false);
79 | }
80 |
81 | @Override
82 | public View getDropDownView(int position, View convertView, ViewGroup parent) {
83 | // Android BUG! http://code.google.com/p/android/issues/detail?id=17128 -
84 | // Spinner does not support multiple view types
85 | if (position == 0) {
86 | return nothingSelectedDropdownLayout == -1 ?
87 | new View(context) :
88 | getNothingSelectedDropdownView(parent);
89 | }
90 |
91 | // Could re-use the convertView if possible, use setTag...
92 | return adapter.getDropDownView(position - EXTRA, null, parent);
93 | }
94 |
95 | /**
96 | * Override this to do something dynamic... For example, "Pick your favorite
97 | * of these 37".
98 | * @param parent
99 | * @return
100 | */
101 | protected View getNothingSelectedDropdownView(ViewGroup parent) {
102 | return layoutInflater.inflate(nothingSelectedDropdownLayout, parent, false);
103 | }
104 |
105 | @Override
106 | public int getCount() {
107 | int count = adapter.getCount();
108 | return count == 0 ? 0 : count + EXTRA;
109 | }
110 |
111 | @Override
112 | public Object getItem(int position) {
113 | return position == 0 ? null : adapter.getItem(position - EXTRA);
114 | }
115 |
116 | @Override
117 | public int getItemViewType(int position) {
118 | return 0;
119 | }
120 |
121 | @Override
122 | public int getViewTypeCount() {
123 | return 1;
124 | }
125 |
126 | @Override
127 | public long getItemId(int position) {
128 | return position >= EXTRA ? adapter.getItemId(position - EXTRA) : position - EXTRA;
129 | }
130 |
131 | @Override
132 | public boolean hasStableIds() {
133 | return adapter.hasStableIds();
134 | }
135 |
136 | @Override
137 | public boolean isEmpty() {
138 | return adapter.isEmpty();
139 | }
140 |
141 | @Override
142 | public void registerDataSetObserver(DataSetObserver observer) {
143 | adapter.registerDataSetObserver(observer);
144 | }
145 |
146 | @Override
147 | public void unregisterDataSetObserver(DataSetObserver observer) {
148 | adapter.unregisterDataSetObserver(observer);
149 | }
150 |
151 | @Override
152 | public boolean areAllItemsEnabled() {
153 | return false;
154 | }
155 |
156 | @Override
157 | public boolean isEnabled(int position) {
158 | return position != 0; // Don't allow the 'nothing selected'
159 | // item to be picked.
160 | }
161 |
162 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/login/Receiver.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
2 |
3 | import android.app.Notification;
4 | import android.app.PendingIntent;
5 | import android.content.BroadcastReceiver;
6 | import android.content.Context;
7 | import android.content.Intent;
8 | import android.graphics.Color;
9 | import android.os.Bundle;
10 | import android.widget.Toast;
11 |
12 | import androidx.core.app.NotificationCompat;
13 | import androidx.core.app.NotificationManagerCompat;
14 |
15 | import static com.example.login.Channel.CHANNEL_ID;
16 |
17 | public class Receiver extends BroadcastReceiver {
18 | @Override
19 | public void onReceive(Context context, Intent intent) {
20 | Intent i = new Intent(context , CandidateDetails.class);
21 | Bundle b = intent.getExtras();
22 | Bundle b1 = new Bundle();
23 | b1.putString("name",b.getString("name"));
24 | b1.putInt("age",b.getInt("age"));
25 | b1.putLong("mobileno",b.getLong("mobileno"));
26 | b1.putString("tickettype",b.getString("tickettype"));
27 | b1.putString("servicetype",b.getString("servicetype"));
28 | b1.putString("departure",b.getString("departure"));
29 | b1.putString("arrival",b.getString("arrival"));
30 | b1.putString("dates",b.getString("dates"));
31 | b1.putString("times",b.getString("times"));
32 | i.putExtras(b1);
33 | PendingIntent pi = PendingIntent.getActivity(context ,0 , i , 0);
34 | NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(context);
35 | Notification notification = new NotificationCompat.Builder(context , CHANNEL_ID)
36 | .setSmallIcon(R.drawable.ic_account_circle_black_24dp)
37 | .setContentTitle("Success, Your Ticket Has Been Booked!")
38 | .setContentText("Click for details (for confirmation, please proceed with payment later)")
39 | .setColor(Color.BLUE)
40 | .setContentIntent(pi)
41 | .setCategory(NotificationCompat.CATEGORY_MESSAGE)
42 | .setPriority(NotificationCompat.PRIORITY_HIGH)
43 | .build();
44 | notificationManagerCompat.notify(1 , notification);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/login/a.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.content.Intent;
6 | import android.os.Bundle;
7 | import android.view.View;
8 | import android.widget.Button;
9 |
10 | public class a extends AppCompatActivity {
11 | Button button;
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | setContentView(R.layout.activity_a);
16 |
17 | button=findViewById(R.id.bookticket);
18 |
19 | button.setOnClickListener(new View.OnClickListener() {
20 | @Override
21 | public void onClick(View v) {
22 | Intent intent=new Intent(a.this,MainActivity1.class);
23 | startActivity(intent);
24 | }
25 | });
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/login/changepassword.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.appcompat.app.AppCompatActivity;
5 |
6 | import android.content.Intent;
7 | import android.os.Bundle;
8 | import android.view.View;
9 | import android.widget.Button;
10 | import android.widget.EditText;
11 | import android.widget.Toast;
12 |
13 | import com.google.android.gms.tasks.OnCompleteListener;
14 | import com.google.android.gms.tasks.Task;
15 | import com.google.firebase.auth.FirebaseAuth;
16 |
17 | public class changepassword extends AppCompatActivity {
18 | EditText editText;
19 | Button button;
20 | FirebaseAuth firebaseAuth;
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 | setContentView(R.layout.activity_changepassword);
25 |
26 | editText=(EditText)findViewById(R.id.pemail);
27 | button=(Button)findViewById(R.id.pbutton);
28 | firebaseAuth=FirebaseAuth.getInstance();
29 |
30 | button.setOnClickListener(new View.OnClickListener() {
31 | @Override
32 | public void onClick(View v) {
33 | String text=editText.getText().toString().trim();
34 | if(text.isEmpty())
35 | {
36 | Toast.makeText(changepassword.this,"Please enter a registered email id",Toast.LENGTH_SHORT).show();
37 | }
38 | else
39 | {
40 | firebaseAuth.sendPasswordResetEmail(text).addOnCompleteListener(new OnCompleteListener() {
41 | @Override
42 | public void onComplete(@NonNull Task task) {
43 | if(task.isSuccessful())
44 | {
45 | Toast.makeText(changepassword.this,"password reset email sent",Toast.LENGTH_SHORT).show();
46 | finish();
47 | Intent intent=new Intent(changepassword.this,MainActivity.class);
48 | startActivity(intent);
49 | }else
50 | {
51 | Toast.makeText(changepassword.this,"error in sending password reset email",Toast.LENGTH_SHORT).show();
52 | }
53 | }
54 | });
55 | }
56 | }
57 | });
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/blueback.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/drawable-v24/blueback.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/blues.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/drawable-v24/blues.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/curved_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/curved_view1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/curved_view2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/curved_view3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/goldbutton.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/drawable-v24/goldbutton.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/gradient1.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/gradient2.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/greenback.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/drawable-v24/greenback.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_account_circle_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/blueback.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/drawable/blueback.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/buttonback.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/drawable/buttonback.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/curved_view2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gradient.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/font/calligraffitti.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_a.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
18 |
27 |
35 |
43 |
51 |
59 |
67 |
75 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_candidate_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
33 |
34 |
46 |
47 |
58 |
59 |
71 |
72 |
83 |
84 |
96 |
97 |
108 |
109 |
121 |
122 |
133 |
134 |
145 |
146 |
157 |
158 |
169 |
170 |
181 |
182 |
193 |
194 |
205 |
206 |
217 |
218 |
229 |
230 |
241 |
242 |
253 |
254 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_changepassword.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
34 |
35 |
44 |
53 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_fetch_contacts.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_listofcandidates.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
21 |
22 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
33 |
34 |
45 |
46 |
55 |
56 |
68 |
69 |
81 |
82 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main1.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
26 |
27 |
39 |
40 |
53 |
54 |
67 |
68 |
77 |
78 |
87 |
88 |
97 |
98 |
107 |
108 |
118 |
119 |
127 |
128 |
134 |
135 |
142 |
143 |
149 |
150 |
151 |
152 |
153 |
154 |
163 |
164 |
172 |
173 |
179 |
180 |
187 |
188 |
194 |
195 |
196 |
197 |
198 |
199 |
208 |
209 |
218 |
219 |
220 |
221 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_newuser.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
29 |
30 |
42 |
43 |
55 |
56 |
69 |
70 |
83 |
84 |
93 |
94 |
104 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/contact_spinner_row_nothing_selected.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/contact_spinner_row_nothing_selected1.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/contact_spinner_row_nothing_selected2.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/contact_spinner_row_nothing_selected3.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/contact_spinner_row_nothing_selected_arr.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/contact_spinner_row_nothing_selected_dept.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/contactlist_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
20 |
21 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 | #FFFFFF
7 | #a1ffa5
8 | #000000
9 | #9EE2FF
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/font_certs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @array/com_google_android_gms_fonts_certs_dev
5 | - @array/com_google_android_gms_fonts_certs_prod
6 |
7 |
8 | -
9 | MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAeFw0wODA0MTUyMzM2NTZaFw0zNTA5MDEyMzM2NTZaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBANbOLggKv+IxTdGNs8/TGFy0PTP6DHThvbbR24kT9ixcOd9W+EaBPWW+wPPKQmsHxajtWjmQwWfna8mZuSeJS48LIgAZlKkpFeVyxW0qMBujb8X8ETrWy550NaFtI6t9+u7hZeTfHwqNvacKhp1RbE6dBRGWynwMVX8XW8N1+UjFaq6GCJukT4qmpN2afb8sCjUigq0GuMwYXrFVee74bQgLHWGJwPmvmLHC69EH6kWr22ijx4OKXlSIx2xT1AsSHee70w5iDBiK4aph27yH3TxkXy9V89TDdexAcKk/cVHYNnDBapcavl7y0RiQ4biu8ymM8Ga/nmzhRKya6G0cGw8CAQOjgfwwgfkwHQYDVR0OBBYEFI0cxb6VTEM8YYY6FbBMvAPyT+CyMIHJBgNVHSMEgcEwgb6AFI0cxb6VTEM8YYY6FbBMvAPyT+CyoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJANWFuGx90071MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBABnTDPEF+3iSP0wNfdIjIz1AlnrPzgAIHVvXxunW7SBrDhEglQZBbKJEk5kT0mtKoOD1JMrSu1xuTKEBahWRbqHsXclaXjoBADb0kkjVEJu/Lh5hgYZnOjvlba8Ld7HCKePCVePoTJBdI4fvugnL8TsgK05aIskyY0hKI9L8KfqfGTl1lzOv2KoWD0KWwtAWPoGChZxmQ+nBli+gwYMzM1vAkP+aayLe0a1EQimlOalO762r0GXO0ks+UeXde2Z4e+8S/pf7pITEI/tP+MxJTALw9QUWEv9lKTk+jkbqxbsh8nfBUapfKqYn0eidpwq2AzVp3juYl7//fKnaPhJD9gs=
10 |
11 |
12 |
13 | -
14 | MIIEQzCCAyugAwIBAgIJAMLgh0ZkSjCNMA0GCSqGSIb3DQEBBAUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBAKtWLgDYO6IIrgqWbxJOKdoR8qtW0I9Y4sypEwPpt1TTcvZApxsdyxMJZ2JORland2qSGT2y5b+3JKkedxiLDmpHpDsz2WCbdxgxRczfey5YZnTJ4VZbH0xqWVW/8lGmPav5xVwnIiJS6HXk+BVKZF+JcWjAsb/GEuq/eFdpuzSqeYTcfi6idkyugwfYwXFU1+5fZKUaRKYCwkkFQVfcAs1fXA5V+++FGfvjJ/CxURaSxaBvGdGDhfXE28LWuT9ozCl5xw4Yq5OGazvV24mZVSoOO0yZ31j7kYvtwYK6NeADwbSxDdJEqO4k//0zOHKrUiGYXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Ylmn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14aloXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCEyj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTbQe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZMcUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/values/preloaded_fonts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @font/calligraffitti
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | TicketBookingSystem
3 | Date
4 | Time
5 | Name:
6 | Age:
7 | Mobile No.:
8 | Ticket for Service:
9 | Service Type:
10 | Departure From:
11 | Arrival To:
12 | Date:
13 | Time:
14 |
15 | - Bus
16 | - Train
17 | - Flight
18 |
19 |
20 |
21 | - Bullet Train
22 | - Local Train
23 | - Express Train
24 | - Luxury Train
25 | - Metro Rail
26 |
27 |
28 | - AMTS
29 | - BRTS
30 | - GSRTC
31 | - AC Volvo
32 | - Luxury
33 |
34 |
35 | - IndiGo
36 | - Air India
37 | - SpiceJet
38 | - GoAir
39 | - AirAsia India
40 |
41 |
42 | - DJ Concert
43 | - Singer Concert
44 | - Musician Band Concert
45 |
46 |
47 | - DJ Chetas and Lijo George
48 | - DJ Notorious
49 | - DJ NYK
50 | - DJ Aqeel
51 | - DJ Angel
52 | - Armaan Malik
53 | - Darshan Raval
54 | - Arijit Singh
55 | - Justin Bieber
56 | - Ed Sheeran
57 | - Salim-Sulaiman
58 | - Vishal-Shekhar
59 | - Lost Stories-Zaedan
60 | - The Chainsmokers
61 | - Jonas Brothers
62 |
63 |
64 | - Agartala
65 | - Agra
66 | - Agumbe
67 | - Ahmedabad
68 | - Aizawl
69 | - Ajmer
70 | - Alappuzha Beach
71 | - Allahabad
72 | - Alleppey
73 | - Almora
74 | - Amarnath
75 | - Amritsar
76 | - Anantagir
77 | - Andaman and Nicobar Islands
78 | - Araku valley
79 | - Aurangabad
80 | - Ayodhya
81 | - Badrinath
82 | - Bangalore
83 | - Baroda
84 | - Bastar
85 | - Bhagalpur
86 | - Bhilai
87 | - Bhimtal
88 | - Bhopal
89 | - Bhubaneswar
90 | - Bhuj
91 | - Bidar
92 | - Bilaspur
93 | - Bodh Gaya
94 | - Calicut
95 | - Chail
96 | - Chamba
97 | - Chandigarh
98 | - Chennai
99 | - Chennai Beaches
100 | - Cherai
101 | - Cherrapunji
102 | - Chidambaram
103 | - Chikhaldara Hills
104 | - Chopta
105 | - Coimbatore
106 | - Coonoor
107 | - Coorg
108 | - Corbett National Park
109 | - Cotigao Wild Life Sanctuary
110 | - Cuttack
111 | - Dadra and Nagar Haveli
112 | - Dalhousie
113 | - Daman and Diu
114 | - Darjeeling
115 | - Dehradun
116 | - Delhi
117 | - Devikulam
118 | - Dhanaulti
119 | - Dharamashala
120 | - Dindigul
121 | - Dudhwa National Park
122 | - Dwaraka
123 | - Faridabad
124 | - Gandhinagar
125 | - Gangotri
126 | - Gangtok
127 | - Gir Wildlife Sanctuary
128 | - Goa
129 | - Great Himalayan National Park
130 | - Gulmarg
131 | - Gurgaon
132 | - Guruvayoor
133 | - Guwahati
134 | - Gwalior
135 | - Hampi
136 | - Haridwar
137 | - Hogenakkal
138 | - Horsley Hills
139 | - Hyderabad
140 | - Idukki
141 | - Imphal
142 | - Indore
143 | - Itangar
144 | - Jabalpur
145 | - Jaipur
146 | - Jaisalmer
147 | - Jalandhar
148 | - Jammu
149 | - Jamshedpur
150 | - Jodhpur
151 | - Kanchipuram
152 | - Kanha National Park
153 | - Kanpur
154 | - Kanyakumari
155 | - Kargil
156 | - Karwar
157 | - Kausani
158 | - Kedarnath
159 | - Keoladeoghana National Park
160 | - Khajuraho
161 | - Kochi
162 | - Kodaikanal
163 | - Kolkata
164 | - Kollam
165 | - Konark
166 | - Kotagiri
167 | - Kottakkal and Ayurveda
168 | - Kovalam
169 | - Kovalam and Ayurveda
170 | - Kudremukh
171 | - Kullu
172 | - Kumaon
173 | - Kumarakom
174 | - Kumarakom and Ayurveda
175 | - Kumarakom Bird Sanctuary
176 | - Kurukshetra
177 | - Lakshadweep
178 | - Lucknow
179 | - Ludhiana
180 | - Madurai
181 | - Mahabalipuram
182 | - Malpe Beach
183 | - Manas National Park
184 | - Mangalore
185 | - Maravanthe Beach
186 | - Margoa
187 | - Mount Abu
188 | - Mumbai
189 | - Munnar
190 | - Mussoorie
191 | - Mysore
192 | - Nahsik
193 | - Nalanda
194 | - Nanda Devi National Park
195 | - Nandi Hills
196 | - Netravali Wild Life Sanctuary
197 | - Ooty
198 | - Orchha
199 | - Pahalgam
200 | - Palakkad
201 | - Panchgani
202 | - Patna
203 | - Patnitop
204 | - Pattadakkal
205 | - Periyar Wildlife Sanctuary
206 | - Pithoragarh
207 | - Pondicherry
208 | - Pune
209 | - Puri
210 | - Pushkar
211 | - Raipur
212 | - Rajaji National Park
213 | - Rajgir
214 | - Rameshwaram
215 | - Ranchi
216 | - Ranganthittu Bird Sanctuary
217 | - Ranikhet
218 | - Ranthambore
219 | - Rishikesh
220 | - Rourkela
221 | - Sanchi
222 | - Saputara
223 | - Sariska Wildlife Sanctuary
224 | - Shillong
225 | - Shimla
226 | - Sohna_Hills
227 | - Srinagar
228 | - Sunderbans
229 | - Surat
230 | - Tezpur
231 | - Thanjavur
232 | - Thiruvananthapuram
233 | - Thrissur
234 | - Tirunelveli
235 | - Tirupati
236 | - Trichy
237 | - Udaipur
238 | - Ujjain
239 | - Vaishali
240 | - Valley of Flowers
241 | - Varanasi
242 | - Varkala and Ayurveda
243 | - Vijayawada
244 | - Vishakhapatnam
245 | - Vrindhavan
246 | - Warangal
247 | - Wayanad
248 | - Wayanad Wildlife Sanctuary
249 | - Yercaud
250 | - Zanskar
251 |
252 |
253 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/test/java/com/example/login/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.login;
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 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 |
9 | }
10 |
11 | dependencies {
12 | classpath 'com.android.tools.build:gradle:3.6.0'
13 | classpath 'com.google.gms:google-services:4.3.3'
14 |
15 |
16 | // NOTE: Do not place your application dependencies here; they belong
17 | // in the individual module build.gradle files
18 | }
19 | }
20 |
21 | allprojects {
22 | repositories {
23 | google()
24 | jcenter()
25 |
26 | }
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/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=-Xmx1536m
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
20 |
21 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krishkamani/TicketBookingSystem/d764a6100bccce17bc337b1852babc4bd0ab8691/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Feb 29 16:32:56 IST 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-5.6.4-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name='Login'
2 | include ':app'
3 |
--------------------------------------------------------------------------------