Skip to content

Commit 5280529

Browse files
committed
initial commit
0 parents  commit 5280529

File tree

91 files changed

+1789
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1789
-0
lines changed

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/libraries
5+
/.idea/modules.xml
6+
/.idea/workspace.xml
7+
.DS_Store
8+
/build
9+
/captures
10+
.externalNativeBuild

.idea/assetWizardSettings.xml

+56
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/caches/build_file_checksums.ser

551 Bytes
Binary file not shown.

.idea/codeStyles/Project.xml

+29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 27
5+
defaultConfig {
6+
applicationId "com.example.souravkumarbehera.cetbusservice"
7+
minSdkVersion 21
8+
targetSdkVersion 27
9+
versionCode 1
10+
versionName "1.0"
11+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12+
}
13+
buildTypes {
14+
release {
15+
minifyEnabled false
16+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17+
}
18+
}
19+
}
20+
21+
dependencies {
22+
implementation fileTree(dir: 'libs', include: ['*.jar'])
23+
implementation 'com.android.support:appcompat-v7:27.1.0'
24+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
25+
implementation 'com.android.support:design:27.1.0'
26+
testImplementation 'junit:junit:4.12'
27+
androidTestImplementation 'com.android.support.test:runner:1.0.1'
28+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
29+
compile 'com.google.firebase:firebase-auth:12.0.1'
30+
31+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.example.souravkumarbehera.cetbusservice;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumented test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("com.example.souravkumarbehera.cetbusservice", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.example.souravkumarbehera.cetbusservice">
4+
5+
6+
<!-- To auto-complete the email text field in the login form with the user's emails -->
7+
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
8+
<uses-permission android:name="android.permission.READ_PROFILE" />
9+
<uses-permission android:name="android.permission.READ_CONTACTS" />
10+
<uses-permission android:name="android.permission.INTERNET" />
11+
<application
12+
android:allowBackup="true"
13+
android:icon="@mipmap/ic_launcher"
14+
android:label="@string/app_name"
15+
android:roundIcon="@mipmap/ic_launcher_round"
16+
android:supportsRtl="true"
17+
android:theme="@style/Theme.AppCompat.NoActionBar">
18+
<activity android:name=".MainActivity">
19+
<intent-filter>
20+
<action android:name="android.intent.action.MAIN" />
21+
22+
<category android:name="android.intent.category.LAUNCHER" />
23+
</intent-filter>
24+
</activity>
25+
<activity android:name=".StudentPage" />
26+
<activity android:name=".ListOfGeneralBuses" />
27+
<activity android:name=".GeneralRoute1" />
28+
<activity android:name=".GeneralRoute2" />
29+
<activity android:name=".GeneralRoute3" />
30+
<activity android:name=".GeneralRoute4" />
31+
<activity android:name=".GeneralRoute5" />
32+
<activity android:name=".GeneralRoute6" />
33+
<activity android:name=".AdminLogin" />
34+
<activity android:name=".AdminPage"></activity>
35+
</application>
36+
37+
</manifest>

app/src/main/ic_launcher-web.png

119 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package com.example.souravkumarbehera.cetbusservice;
2+
3+
import android.content.Intent;
4+
import android.support.v7.app.AppCompatActivity;
5+
import android.os.Bundle;
6+
import android.view.View;
7+
import android.widget.Button;
8+
import android.widget.EditText;
9+
import android.widget.Toast;
10+
11+
import com.google.firebase.auth.FirebaseAuth;
12+
13+
public class AdminLogin extends AppCompatActivity {
14+
Button login;
15+
EditText username, password;
16+
//private FirebaseAuth firebaseAuth;
17+
@Override
18+
protected void onCreate(Bundle savedInstanceState) {
19+
super.onCreate(savedInstanceState);
20+
setContentView(R.layout.activity_admin_login);
21+
login=(Button)findViewById(R.id.login);
22+
username =(EditText)findViewById(R.id.userName);
23+
password =(EditText)findViewById(R.id.password);
24+
//firebaseAuth = FirebaseAuth.getInstance();
25+
//firebaseAuth.createUserWithEmailAndPassword()
26+
27+
}
28+
29+
public void loginClicked(View view) {
30+
String un, pw;
31+
un = username.getText().toString();
32+
pw = password.getText().toString();
33+
int count = 0;
34+
if (un.equals("skbisoi@cetb") && pw.equals("cetb1234")) {
35+
Intent next = new Intent(AdminLogin.this, AdminPage.class);
36+
startActivity(next);
37+
}
38+
else{
39+
count++;
40+
Toast.makeText(getApplicationContext(),"wrong username or password", Toast.LENGTH_SHORT).show();
41+
if(count>=5){
42+
Intent back =new Intent(AdminLogin.this, MainActivity.class);
43+
startActivity(back);
44+
}
45+
}
46+
}
47+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.example.souravkumarbehera.cetbusservice;
2+
3+
import android.support.v7.app.AppCompatActivity;
4+
import android.os.Bundle;
5+
6+
public class AdminPage extends AppCompatActivity {
7+
8+
@Override
9+
protected void onCreate(Bundle savedInstanceState) {
10+
super.onCreate(savedInstanceState);
11+
setContentView(R.layout.activity_admin_page);
12+
}
13+
}

0 commit comments

Comments
 (0)