Skip to content

Commit 567adbb

Browse files
committed
live-location-in-background
0 parents  commit 567adbb

Some content is hidden

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

47 files changed

+1390
-0
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
local.properties

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
plugins {
2+
id 'com.android.application'
3+
id 'org.jetbrains.kotlin.android'
4+
id 'kotlin-kapt'
5+
id 'dagger.hilt.android.plugin'
6+
}
7+
8+
android {
9+
compileSdk 33
10+
11+
defaultConfig {
12+
applicationId "com.live.location"
13+
minSdk 21
14+
targetSdk 33
15+
versionCode 1
16+
versionName "1.0"
17+
18+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
19+
vectorDrawables {
20+
useSupportLibrary true
21+
}
22+
}
23+
24+
buildTypes {
25+
release {
26+
minifyEnabled false
27+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
28+
}
29+
}
30+
31+
compileOptions {
32+
sourceCompatibility JavaVersion.VERSION_1_8
33+
targetCompatibility JavaVersion.VERSION_1_8
34+
}
35+
36+
kotlinOptions {
37+
jvmTarget = '1.8'
38+
}
39+
40+
buildFeatures {
41+
compose true
42+
}
43+
44+
composeOptions {
45+
kotlinCompilerExtensionVersion "1.3.1"
46+
}
47+
48+
packagingOptions {
49+
resources {
50+
excludes += '/META-INF/{AL2.0,LGPL2.1}'
51+
}
52+
}
53+
}
54+
55+
dependencies {
56+
57+
// Compose
58+
implementation "androidx.compose.ui:ui:1.2.1"
59+
implementation "androidx.compose.material:material:1.2.1"
60+
implementation "androidx.compose.ui:ui-tooling-preview:1.2.1"
61+
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.2.1"
62+
debugImplementation "androidx.compose.ui:ui-tooling:1.2.1"
63+
debugImplementation "androidx.compose.ui:ui-test-manifest:1.2.1"
64+
implementation "androidx.activity:activity-compose:1.6.0"
65+
implementation "androidx.navigation:navigation-compose:2.5.2"
66+
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1'
67+
implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1"
68+
69+
def accompanist_version = "0.26.3-beta"
70+
implementation "com.google.accompanist:accompanist-swiperefresh:$accompanist_version"
71+
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
72+
implementation "com.google.accompanist:accompanist-navigation-material:$accompanist_version"
73+
implementation "com.google.accompanist:accompanist-appcompat-theme:$accompanist_version"
74+
implementation "com.google.accompanist:accompanist-permissions:$accompanist_version"
75+
implementation "com.google.accompanist:accompanist-pager:$accompanist_version"
76+
implementation "com.google.accompanist:accompanist-pager-indicators:$accompanist_version"
77+
implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist_version"
78+
implementation "com.google.accompanist:accompanist-webview:$accompanist_version"
79+
80+
// Android X
81+
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
82+
implementation "com.google.android.material:material:1.6.1"
83+
84+
// Hilt
85+
implementation "com.google.dagger:hilt-android:$hilt_version"
86+
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"
87+
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
88+
89+
// Architecture Components
90+
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.1"
91+
implementation 'androidx.lifecycle:lifecycle-service:2.5.1'
92+
93+
// Map
94+
implementation "com.google.android.gms:play-services-gcm:17.0.0"
95+
implementation "com.google.android.gms:play-services-location:20.0.0"
96+
97+
// Coroutine
98+
def coroutines_version = "1.6.4"
99+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
100+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
101+
102+
// KTX
103+
implementation "androidx.core:core-ktx:1.9.0"
104+
105+
// Okhttp
106+
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.10.0"))
107+
implementation("com.squareup.okhttp3:okhttp")
108+
implementation("com.squareup.okhttp3:logging-interceptor")
109+
110+
// Test
111+
testImplementation "junit:junit:4.13.2"
112+
androidTestImplementation "androidx.test.ext:junit:1.1.3"
113+
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"
114+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
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
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.live.location
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("com.live.location", appContext.packageName)
23+
}
24+
}

0 commit comments

Comments
 (0)