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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 38 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,62 @@
# Kute
A Commute App for Sri Lanka
Kute App
===================

People travel to the same destination on a regular basis for various reasons using public and private transport. In Kute, the users (also known as travellers) themselves are allowed to share their current location, so that the other travellers can see the current location of the vehicle. A common type of vehicle used for public transport in Sri Lanka is the passenger train. Kute is currently implemented for trains. A registered user can update the current location of a train when travelling by sharing the current location. Another user can view location of a selected train and the expected time a particular train arrives at the nearest station using the location data updated by another user.

**Kute** is an app that makes navigation and transportation easier and more efficient for people travelling to the same destination.People can easily navigate and identify public transport services around them without having to look through the schedules and timings.Travellers can share their location and tackle the problems of ever-changing schedules together.

![alt tag](https://github.com/Dilu9218/kute/blob/master/shareShow.png)
![alt tag](https://github.com/Dilu9218/kute/blob/master/search.png)
![enter image description here](http://res.cloudinary.com/raghavp/image/upload/v1513531690/kute1_bhhvhj.png)

![enter image description here](http://res.cloudinary.com/raghavp/image/upload/v1513531691/kute2_vtvneu.png)

----------

## Installation

1. Download and install android studio for IDE
```
https://developer.android.com/studio/index.html?hl=id
```
2. Download the Android SDK from the IDE on SDK Manager.
Installation
-------------

3. Go to your terminal and execute this command
You can install and run **Kute App** easily on your android device or emulator using the following instructions

`git clone https://github.com/scorelab/kute.git`
or download the zip file and then unzip the contents.
1)Download the zip file from the repository at
https://github.com/scorelab/kute/tree/c_in_refine or,use the following git command to clone the file
> git clone https://github.com/scorelab/kute.git

4. Checkout the branch 'c_in_refine' (Only for Google Code In participants).
2)Next set up Android Studio on your device,using the following link
https://developer.android.com/studio/install.html

`cd kute`

`git checkout c_in_refine`
3)Start Android studio and download the SDK's

5. Launch android studio(version 1.4 above).
4)Set Up your emulator in Android Studio,you can do so by going to Tools>Android>AVD Manager,next you will be prompted with instructions to set up your emulator.

6. To import the project: Click on File, then New and then Import Project or from the welcome screen of android studio click on Import project. (If you wish to contribute, you can directly link to GitHub).
5)Go to the zip file or navigate to the directory using the "Cd" command and launch the project

7. Browse to the location where you had extracted the zip and then select the folder kute-android-app in it.
6)The project will build automatically,there might be some errors but android studio will provide you with the problem and even give you an option to install the required components causing the error.

8. Android studio will automatically run and build the Gradle for you. In case of anything missing, studio will prompt you to download the needed file and sync project, click on it.
7)After this Run the app and select the emulator or your android device.

9. If Gradle finishes to build without error, connect your phone or emulator and run the project by clicking on the play button on the tool bar.
8)Wait for the emulator to start up and turn on,later the APK file will install automatically

10. Wait for a few seconds and the app should start on your device(android phone or emulator), make sure you are connected to Internet.
9)Kute App will start up once you open the APK file you can use the following facebook credentials to log in

11. Possible errors while building the app:
- Colors not found
Solution- Within studio, navigate to res-> values -> colors.xml and add the missing colors here.
- String not found
Solution- Within studio, navigate to res-> values -> strings.xml and add the missing strings here.
- Dusplicate strings found
Solution- Within studio, navigate to res-> values -> strings.xml and remove the strings that are mentioned more than once.

12. The app should now build successfully and run without any errors
**Login 1**

Note: Please use the Facebook credentails given below to access the application.
Email: kute_rukdjlk_one@tfbnw.net
Password: kute123

## Test users
**Login 2**

Email: kute_jmzumqg_two@tfbnw.net
Password: kute123

**That's It :)**

Troubleshooting
-------------
1)Android Manifest incorrect root - In this case restart the project and on the bottom left you will see an option to configure android framework ,do so.

2)Google Maven files not installed - in this case just follow the prompt provided by android studio.

3)SDK Files for emulator not installed - in this case you can try restarting the project and set up the emulator.

user 01
- email: kute_rukdjlk_one@tfbnw.net
- pwd: kute123

user 02
- email: kute_jmzumqg_two@tfbnw.net
- pwd: kute123

## License

This project is licensed under the terms of the Apache License 2.0.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;

import com.google.firebase.database.FirebaseDatabase;
import com.scorelab.kute.kute.Activity.RegisterActivity;
Expand All @@ -15,6 +16,23 @@

public class SplashActivity extends AppCompatActivity {
static FirebaseDatabase fb;
ImageView imageView;
AnimationDrawable anim;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);

imageView = (ImageView)findViewById(R.id.imageView);
if(imageView == null) throw new AssertionError();
imageView.setBackgroundResource(R.drawable.loading_animation);
imageView.setVisibility(View.VISIBLE);

anim = (AnimationDrawable)imageView.getBackground();
anim.start();

}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/frame_1" android:duration="290" />
<item android:drawable="@drawable/frame_2" android:duration="290" />
<item android:drawable="@drawable/frame_3" android:duration="290" />
</animation-list>
47 changes: 29 additions & 18 deletions kute-android-app/app/src/main/res/layout/activity_splash.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_splash"
android:layout_width="match_parent"
tools:context="com.scorelab.kute.kute.SplashActivity"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="#3498db"
tools:context="com.example.raghav.myapplication.MainActivity">

<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:srcCompat="@color/splashBackground"
android:id="@+id/imageView2" />
android:id="@+id/imageView"
android:layout_width="270dp"
android:layout_height="300dp"
android:layout_marginLeft="65dp"
android:layout_marginTop="100dp"
android:background="#3498db" />

<TextView
android:layout_width="80dp"
android:layout_height="40dp"
android:text="Kute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:id="@+id/textView"
android:textSize="36sp"
android:textColor="@android:color/background_light"
android:textStyle="normal|bold"
android:fontFamily="sans-serif-smallcaps" />
</RelativeLayout>
android:layout_marginTop="40dp"
android:layout_marginLeft="-180dp"
android:textColor="#fff"
android:textStyle="bold"
android:fontFamily="sans-serif-smallcaps"
android:textSize="35dp" />

<TextView
android:layout_width="240dp"
android:layout_height="400dp"
android:layout_marginLeft="-145dp"
android:layout_marginTop="440dp"
android:text="Loading Kute..."
android:textColor="#fff"
android:textSize="30dp" />

</LinearLayout>
126 changes: 107 additions & 19 deletions kute-android-app/app/src/main/res/layout/testreg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,125 @@
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:orientation="vertical"
android:background="#2979FF"
tools:context=".Activity.RegisterActivity">


<TextView
android:text="Kute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:id="@+id/textView"
android:textSize="46sp"
android:layout_marginRight="16dp"
android:layout_marginLeft="137dp"
android:layout_marginTop="48dp"
android:textColor="@android:color/background_light"
android:textStyle="normal|bold"
android:fontFamily="sans-serif-smallcaps" />
<TextView
android:id="@+id/login_status"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="40dp"
android:layout_marginTop="20dp"
android:text=" Sign in to the Kute App and
Unlock a world of possibilities"
android:textAlignment="center"
android:layout_marginTop="20dp" />
android:textColor="#fff"
android:textSize="20sp"
android:fontFamily="sans-serif"
android:visibility="visible" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginTop="90dp"
android:background="#2962FF"
android:orientation="vertical">

</LinearLayout>

<com.google.android.gms.common.SignInButton
android:id="@+id/login_with_google"
android:text="login_with_google"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="300dp"
android:layout_height="200dp"
android:layout_marginTop="-360dp"
android:layout_gravity="center"
android:background="#FFF"
android:orientation="vertical" >

<com.facebook.login.widget.LoginButton
android:id="@+id/connectWithFbButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center_horizontal"
android:text=" connect_with_facebook" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:src="@android:drawable/ic_lock_lock" />
</LinearLayout>

<TextView
android:layout_width="200dp"
android:layout_height="30dp"
android:text="Username"
android:layout_gravity="center"
android:background="#e0e0e0"
android:layout_marginTop="-149dp"
android:paddingTop="2dp"
android:paddingLeft="6dp"/>
<TextView
android:layout_width="200dp"
android:layout_height="30dp"
android:text="Password"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:paddingTop="2dp"
android:paddingLeft="6dp"
android:background="#e0e0e0"/>


<Button
android:layout_width="180dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginTop="15dp"
android:background="#2979ff"
android:text="Sign In"
android:textColor="#fff" />

<TextView
android:id="@+id/login_status"
android:layout_width="40dp"
android:layout_height="30dp"
android:layout_marginTop="30dp"
android:layout_marginBottom="-47dp"
android:layout_gravity="center"
android:text="OR"
android:textStyle="bold"
android:textColor="#fff"
android:textSize="20sp"
android:fontFamily="sans-serif"
android:visibility="visible" />

<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/imageView" />

<com.google.android.gms.common.SignInButton
android:id="@+id/login_with_google"
android:text="login_with_google"
android:layout_width="150dp"
android:layout_height="50dp"
android:layout_marginTop="50dp"
android:layout_marginLeft="25dp"
/>
<com.facebook.login.widget.LoginButton
android:id="@+id/connectWithFbButton"
android:layout_width="150dp"
android:layout_height="50dp"
android:layout_marginLeft="210dp"
android:layout_marginRight="3dp"
android:layout_marginTop="-50dp"
android:paddingTop="10dp"
android:text="connect_with_facebook"
android:textSize="18sp" />
</LinearLayout>

</LinearLayout>
</LinearLayout>