-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
Initial Android App displaying user's GPS location
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
._* | ||
/build | ||
/captures | ||
.externalNativeBuild |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
# Project01 | ||
# Android GPS App | ||
|
||
## GitHub Merge Workflow | ||
|
||
![GitHub workflow for the project](/docs/img/github-workflow.png) | ||
|
||
## Assignment Documents | ||
|
||
- Project Plan: [/docs/Android_App_Project_Plan.docx](/docs/Android_App_Project_Plan.docx) | ||
- ICM Tracker: [/docs/ICM_Tracker.xlsx](/docs/ICM_Tracker.xlsx) | ||
|
||
## Trello Board | ||
|
||
[https://trello.com/b/uJQ77sTs/ase-group-2](https://trello.com/b/uJQ77sTs/ase-group-2) | ||
|
||
## Google Drive | ||
|
||
[https://drive.google.com/drive/folders/0B5BQpSIio7rYcktnUXB6aXNlWDg](https://drive.google.com/drive/folders/0B5BQpSIio7rYcktnUXB6aXNlWDg) | ||
|
||
## Semantic Versioning | ||
|
||
[http://semver.org/](http://semver.org/) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 26 | ||
buildToolsVersion "26.0.2" | ||
defaultConfig { | ||
applicationId "com.example.viktorkaslik.gps1" | ||
minSdkVersion 15 | ||
targetSdkVersion 26 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
resValue "string", "mapsKey", (project.findProperty("MAPS_KEY") ?:"") | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { | ||
exclude group: 'com.android.support', module: 'support-annotations' | ||
}) | ||
compile 'com.android.support:appcompat-v7:26.+' | ||
compile 'com.android.support.constraint:constraint-layout:1.0.2' | ||
testCompile 'junit:junit:4.12' | ||
compile 'com.google.android.gms:play-services-maps:11.0.4' | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in /Users/viktorkaslik/Library/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 *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.example.viktorkaslik.gps1; | ||
|
||
import android.content.Context; | ||
import android.support.test.InstrumentationRegistry; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Instrumentation test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentedTest { | ||
@Test | ||
public void useAppContext() throws Exception { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getTargetContext(); | ||
|
||
assertEquals("com.example.viktorkaslik.gps1", appContext.getPackageName()); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.example.viktorkaslik.gps1"> | ||
|
||
<uses-permission | ||
android:name="android.permission.ACCESS_COARSE_LOCATION" | ||
android:maxSdkVersion="22" /> | ||
|
||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission> | ||
<!--<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>--> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
|
||
<meta-data | ||
android:name = "com.google.android.gms.version" | ||
android:value = "@integer/google_play_services_version"/> | ||
|
||
<meta-data | ||
android:name = "com.google.android.geo.API_KEY" | ||
android:value = "@string/mapsKey"/> | ||
|
||
|
||
<activity android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout 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:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context="com.example.viktorkaslik.gps1.MainActivity"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<EditText | ||
android:id="@+id/longLabel" | ||
android:layout_width="217dp" | ||
android:layout_height="43dp" | ||
android:ems="10" | ||
android:inputType="textPersonName" | ||
android:text="Name" | ||
android:layout_marginRight="8dp" | ||
app:layout_constraintRight_toRightOf="parent" | ||
android:layout_marginLeft="8dp" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
android:layout_marginTop="8dp" | ||
app:layout_constraintHorizontal_bias="0.503" /> | ||
|
||
<EditText | ||
android:id="@+id/latLabel" | ||
android:layout_width="217dp" | ||
android:layout_height="43dp" | ||
android:ems="10" | ||
android:inputType="textPersonName" | ||
android:text="Name" | ||
android:layout_marginRight="8dp" | ||
app:layout_constraintRight_toRightOf="parent" | ||
android:layout_marginLeft="8dp" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintHorizontal_bias="0.503" | ||
android:layout_marginTop="0dp" | ||
app:layout_constraintTop_toBottomOf="@+id/longLabel" | ||
android:layout_marginBottom="8dp" | ||
app:layout_constraintBottom_toTopOf="@+id/mapsFrag" | ||
app:layout_constraintVertical_bias="0.135" /> | ||
|
||
<!--<Button--> | ||
<!--android:id="@+id/button4"--> | ||
<!--android:onClick="getGPSLoc"--> | ||
<!--android:layout_width="wrap_content"--> | ||
<!--android:layout_height="wrap_content"--> | ||
<!--android:text="Button"--> | ||
<!--app:layout_constraintBottom_toBottomOf="parent"--> | ||
<!--android:layout_marginBottom="326dp"--> | ||
<!--android:layout_marginLeft="8dp"--> | ||
<!--app:layout_constraintLeft_toLeftOf="parent"--> | ||
<!--android:layout_marginRight="8dp"--> | ||
<!--app:layout_constraintRight_toRightOf="parent"--> | ||
<!--android:layout_marginTop="8dp"--> | ||
<!--app:layout_constraintTop_toBottomOf="@+id/latLabel" />--> | ||
|
||
|
||
<fragment | ||
android:id="@+id/mapsFrag" | ||
android:name="com.google.android.gms.maps.SupportMapFragment" | ||
android:layout_width="318dp" | ||
android:layout_height="342dp" | ||
android:layout_marginRight="8dp" | ||
app:layout_constraintRight_toRightOf="parent" | ||
android:layout_marginLeft="8dp" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
android:layout_marginBottom="8dp" | ||
tools:context = "com.example.viktorkaslik.gps1.MainActivity"/> | ||
|
||
|
||
</android.support.constraint.ConstraintLayout> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="colorPrimary">#3F51B5</color> | ||
<color name="colorPrimaryDark">#303F9F</color> | ||
<color name="colorAccent">#FF4081</color> | ||
</resources> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<resources> | ||
<string name="app_name">GPS1</string> | ||
<string name="resume">Get location</string> | ||
<string name="pause" /> | ||
</resources> |