Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7d14c18
Initial commit
JonathanSudibya Mar 7, 2016
4a96ab4
README.md edited online with Bitbucket
JonathanSudibya Mar 7, 2016
5f186da
Android Studio First Commit.
erickchandra Mar 23, 2016
7603729
Merge branch 'master' of http://gitlab.informatika.org/Chandra/Tubes1…
erickchandra Mar 23, 2016
a9d54bf
Creating and designing home activity.
erickchandra Mar 25, 2016
0c763ab
Created Maps Activity.
erickchandra Mar 25, 2016
90b4f4d
MapsActivity layout design.
erickchandra Mar 25, 2016
21ab2d9
Added permission for camera intent and landscape/portrait layouting f…
erickchandra Mar 25, 2016
ac12716
Compass up and running.
erickchandra Mar 25, 2016
71ac975
Fixed landscape compass direction.
erickchandra Mar 25, 2016
fcb383b
Debug and successfully fix compass direction for four distinct orient…
erickchandra Mar 25, 2016
3e1d2ee
Successfully created socket.
erickchandra Mar 26, 2016
d96d7a1
Created ClientSync.
erickchandra Mar 26, 2016
9396904
Created MessageRecvParser.
erickchandra Mar 26, 2016
4ff082a
Create MessageSendParser and modify MessageRecvParser.
erickchandra Mar 26, 2016
25c82e6
Debug and fix Client and transfer to Asynchronous.
erickchandra Mar 26, 2016
95042e1
Functionality done. Fix submit intent and camera intent.
erickchandra Mar 27, 2016
1cf13f3
Fixing server communication.
erickchandra Mar 27, 2016
8fc7fae
Added location.
erickchandra Mar 27, 2016
9e78858
Modify submit item name.
erickchandra Mar 27, 2016
66db1a2
Recover Latitude and Longitude.
erickchandra Mar 27, 2016
f8ff5fd
Added screenshots in folder.
erickchandra Mar 27, 2016
1b971d8
Added built APK inside folder.
erickchandra Mar 27, 2016
3d003a1
Updated Readme.
erickchandra Mar 27, 2016
98b1964
Update modified Readme.
erickchandra Mar 27, 2016
826cd75
Update modified Readme.
erickchandra Mar 27, 2016
41ac247
Update modified Readme.
erickchandra Mar 27, 2016
7efbb12
Update modified Readme.
erickchandra Mar 27, 2016
e9ad572
Modified connection.
erickchandra Mar 27, 2016
fb5bf70
Updated Readme.
erickchandra Mar 27, 2016
39053db
Solving Merge Problem.
erickchandra Mar 28, 2016
9fd09d9
Readded Readme.
erickchandra Mar 28, 2016
ca09afa
Solving Readme problem.
erickchandra Mar 28, 2016
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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 62 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

116 changes: 115 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,115 @@
# IF3111-2016-Tugas1-Android
# Project 1 - Android - IF3111 Platform-based Application Development
## 13513021 - Erick Chandra

In IF3111 course, all students have to accomplish the app completion within certain deadline. The original specification is available [here] in Bahasa Indonesia.

This application mainly have the functionality of guessing the places in Bandung Institute of Technology. There are 10 places for guessing:
- GKU Barat
- GKU Timur
- Intel
- CC Barat
- CC Timur
- DPR
- Oktagon (changed; previously Sunken)
- Perpustakaan
- PAU
- Kubus

Inside the application, it must communicate with the server (provided by lab assistants) and have certain communication convention such as follows.

**Location Request**

These are the client and server communication via JSON string passed by socket connection.

***First Client Request***
```sh
{“com”:”req_loc”,”nim”:”13513021”}
```

***First Server Request***
```sh
{“status”:”ok”,”nim”:”13513021”,”longitude”:”6.234123132”,”latitude”:”0.1234123412”,”token”:”21nu2f2n3rh23diefef23hr23ew”}
```

***Send Answer (Client to Server)***
```sh
{“com”:”answer”,”nim”:”13513021”,”answer”:”labtek_v”, ”longitude”:”6.234123132”,”latitude”:”0.1234123412”,”token”:”21nu2f2n3rh23diefef23hr23ew”}
```

***Server Response (if the answer is correct)***
```sh
{“status”:”ok”,”nim”:”13513021”,”longitude”:”8.13215123214”,”latitude”:”9.1234123412”,”token”:”124fewfm32r32ifmwder42”}
```

***Server Response (if the answer is incorrect)***
```sh
{“status”:”wrong_answer”,”nim”:”13513021”,”token”:”124fewfm32r32ifmwder42”}
```

***Server Response (if the client has reached the third correct answer therefore finish)***
```sh
{“status”:”finish”,”nim”:”13513021”,”token”:”124fewfm32r32ifmwder42”,”check”:1}
```

> Important: The given token must be used when making the next reply. Otherwise it will be an error.

## Detailed Application Specification
* Application must be able to receive message from the server with JSON format, containing location (latitude and longitude) and token.
* Application must be able to calculate location point (latitude and longitude) and show the location indocator on the map view. The map will be implemented with Google Map API.
* There is a navigation arrow located on the map. The default direction is North. In order to implement this, sensors might be utilised.
* Application must be able to send camera intent.
* Photo could be taken but it is not compulsory to upload the photo to the server.
* Applicationmust be able to send message to the server with JSON format containing location information (latitude, longitude), Student ID, and token.
* Use of supporting SDK for this project.
* For some view, there are some differences when rotating the orientation (landscape vs portrait).
* Colours, fonts, and styling are not included in major marking. However, button position on the screen is important.
* Server replies must be shown with Toast or Alert Dialogue.
* Whenever the app uses the sensor, it must release all sensors by the time the user leaves the activity to reduce unnecessary battery consumption and to avoid some performance issues.

## Screenshots

**App Launcher**

![App Launcher](screenshots/01-Launcher.png)

**Home Activity**

![Home Activity](screenshots/02-Home.png)

**Map Activity**

![Map Activity](screenshots/03-Map.png)

**Map Activity (Landscape Mode)**

![Map Activity Landscape](screenshots/03-b-MapLandscape.jpg)

**Calling Camera Intent**

![Camera Intent](screenshots/04-Intent.png)

**Submission Activity**

![Submission Activity](screenshots/05-Submit.png)

**Submission Spinner Drop Down**

![Submission Spinner Drop Down](screenshots/06-SubmitSpinner.png)

**Message Toast**

![Message Toast](screenshots/07-ReceivedMsgToast.png)

## Source Code Folder Path

```sh
~/Tubes1-Android/app/src/main/
```

## Binary Built APK Folder Path

```sh
~/Tubes1-Android/apk/
```

[here]: <http://gitlab.informatika.org/IF3111/Tubes1-Android>
Binary file added apk/app-debug-unaligned.apk
Binary file not shown.
Binary file added apk/app-debug.apk
Binary file not shown.
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
29 changes: 29 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.example.erickchandra.tubes1_android"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:support-v4:23.2.1'
}
17 changes: 17 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /home/erickchandra/Android/Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.example.erickchandra.tubes1_android;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
21 changes: 21 additions & 0 deletions app/src/debug/res/values/google_maps_api.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<resources>
<!--
TODO: Before you run your application, you need a Google Maps API key.

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

https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=F5:89:04:DD:17:DC:B3:16:7F:26:C0:F8:2B:9E:70:10:C3:8B:05:07%3Bcom.example.erickchandra.tubes1_android

You can also add your credentials to an existing key, using this line:
F5:89:04:DD:17:DC:B3:16:7F:26:C0:F8:2B:9E:70:10:C3:8B:05:07;com.example.erickchandra.tubes1_android

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

Once you have your key (it starts with "AIza"), replace the "google_maps_key"
string in this file.
-->
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
AIzaSyCKsgsskyCM5msZiN_VfLFmRp5HfxbO6Es
</string>
</resources>
Loading