This repository has been archived by the owner on Dec 15, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
125 changed files
with
6,591 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Built application files | ||
*.apk | ||
*.ap_ | ||
|
||
# Files for the ART/Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
|
||
# Generated files | ||
bin/ | ||
gen/ | ||
out/ | ||
|
||
# Gradle files | ||
/.idea | ||
.gradle/ | ||
build/ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard/ | ||
|
||
# Log Files | ||
*.log | ||
|
||
# Android Studio Navigation editor temp files | ||
.navigation/ | ||
|
||
# Android Studio captures folder | ||
captures/ | ||
|
||
# Intellij | ||
*.iml | ||
.idea/workspace.xml | ||
.idea/tasks.xml | ||
.idea/gradle.xml | ||
.idea/dictionaries | ||
.idea/libraries | ||
|
||
# Keystore files | ||
*.jks | ||
|
||
# External native build folder generated in Android Studio 2.2 and later | ||
.externalNativeBuild | ||
|
||
# Google Services (e.g. APIs or Firebase) | ||
google-services.json | ||
|
||
# Freeline | ||
freeline.py | ||
freeline/ | ||
freeline_project_description.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'me.tatarka.retrolambda' | ||
|
||
android { | ||
compileSdkVersion 24 | ||
buildToolsVersion '25.0.3' | ||
defaultConfig { | ||
applicationId "com.skydoves.waterdays" | ||
minSdkVersion 17 | ||
targetSdkVersion 24 | ||
versionCode 6 | ||
versionName "1.0.0.4" | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
ndk { | ||
moduleName = 'NDKInterface' | ||
} | ||
multiDexEnabled true | ||
} | ||
buildTypes { | ||
release { | ||
debuggable false | ||
minifyEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
packagingOptions { | ||
exclude 'META-INF/services/javax.annotation.processing.Processor' | ||
exclude 'META-INF/license.txt' | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
dependencies { | ||
testCompile 'junit:junit:4.12' | ||
compile fileTree(include: ['*.jar'], dir: 'libs') | ||
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { | ||
exclude group: 'com.android.support', module: 'support-annotations' | ||
}) | ||
|
||
compile 'com.jakewharton.timber:timber:4.5.1' | ||
compile 'com.jakewharton:butterknife:8.8.1' | ||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' | ||
compile 'com.google.dagger:dagger:2.7' | ||
annotationProcessor 'com.google.dagger:dagger-compiler:2.7' | ||
compile 'com.squareup.okhttp:okhttp:2.7.2' | ||
|
||
compile 'com.github.devlight.navigationtabbar:navigationtabbar:1.2.5' | ||
compile 'com.github.jorgecastilloprz:fillableloaders:1.03@aar' | ||
compile 'com.github.paolorotolo:appintro:4.1.0' | ||
compile 'com.skyfishjy.ripplebackground:library:1.0.1' | ||
compile 'com.github.PhilJay:MPAndroidChart:v2.1.6' | ||
compile 'com.github.skydoves:elasticviews:1.0.9' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in C:\Users\coscoi\AppData\Local\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 *; | ||
#} | ||
|
||
-dontwarn okio.** | ||
-dontwarn com.nhn.** | ||
|
||
# butter knife | ||
-keep class butterknife.** { *; } | ||
-dontwarn butterknife.internal.** | ||
-keep class **$$ViewBinder { *; } | ||
|
||
-keepclasseswithmembernames class * { | ||
@butterknife.* <fields>; | ||
} | ||
|
||
-keepclasseswithmembernames class * { | ||
@butterknife.* <methods>; | ||
} |
26 changes: 26 additions & 0 deletions
26
app/src/androidTest/java/com/skydoves/waterlife/ExampleInstrumentedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.skydoves.waterdays; | ||
|
||
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.skydoves.waterdays", appContext.getPackageName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.skydoves.waterdays"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.NFC" /> | ||
<uses-permission android:name="android.permission.WAKE_LOCK" /> | ||
<uses-permission android:name="android.permission.VIBRATE" /> | ||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | ||
|
||
<uses-feature | ||
android:name="android.hardware.nfc" | ||
android:required="true" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:hardwareAccelerated="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme.NoActionBar"> | ||
<activity android:name=".ui.activities.intro.StartActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".ui.activities.main.MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.nfc.action.NDEF_DISCOVERED" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<data android:mimeType="waterdays_nfc/*" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".ui.activities.settings.SetGoalActivity" /> | ||
<activity | ||
android:name=".ui.activities.main.SelectDrinkActivity" | ||
android:theme="@style/AppTheme.mDialog" /> | ||
<activity android:name=".ui.activities.settings.NFCActivity" /> | ||
<activity android:name=".ui.activities.main.MakeAlarmActivity" /> | ||
<activity | ||
android:name=".ui.activities.settings.SettingActivity" | ||
android:theme="@style/AppTheme.Setting" /> | ||
<activity android:name=".ui.activities.settings.SetWeightActivity" /> | ||
<activity android:name=".ui.activities.settings.SetLocalActivity" /> | ||
|
||
<receiver android:name=".services.receivers.AlarmReceiver" /> | ||
<receiver android:name=".services.receivers.LocalWeatherReceiver" /> | ||
<receiver | ||
android:name=".services.receivers.AlarmBootReceiver" | ||
android:enabled="true" | ||
android:exported="false" | ||
android:label="BootReceiver"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.BOOT_COMPLETED" /> | ||
</intent-filter> | ||
</receiver> | ||
|
||
<activity android:name=".ui.activities.settings.SetMyCupActivity" /> | ||
<activity android:name=".ui.activities.alarm.AlarmScreenActivity"></activity> | ||
</application> | ||
|
||
</manifest> |
42 changes: 42 additions & 0 deletions
42
app/src/main/java/com/skydoves/waterdays/consts/LocalNames.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.skydoves.waterdays.consts; | ||
|
||
/** | ||
* Developed by skydoves on 2017-08-18. | ||
* Copyright (c) 2017 skydoves rights reserved. | ||
*/ | ||
|
||
public class LocalNames { | ||
public static String getLocalName(int index) { | ||
if(index == 1) | ||
return "경기도"; | ||
else if(index == 2) | ||
return "강원도"; | ||
else if(index == 3) | ||
return "경상남도"; | ||
else if(index == 4) | ||
return "경상북도"; | ||
else if(index == 5) | ||
return "광주광역시"; | ||
else if(index == 6) | ||
return "대구광역시"; | ||
else if(index == 7) | ||
return "대전광역시"; | ||
else if(index == 8) | ||
return "부산광역시"; | ||
else if(index == 9) | ||
return "울산광역시"; | ||
else if(index == 10) | ||
return "인천광역시"; | ||
else if(index == 11) | ||
return "전라남도"; | ||
else if(index == 12) | ||
return "전라북도"; | ||
else if(index == 13) | ||
return "충청북도"; | ||
else if(index == 14) | ||
return "충청남도"; | ||
else if(index == 15) | ||
return "제주특별자치도"; | ||
return "서울특별시"; | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
app/src/main/java/com/skydoves/waterdays/consts/LocalUrls.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.skydoves.waterdays.consts; | ||
|
||
/** | ||
* Developed by skydoves on 2017-08-18. | ||
* Copyright (c) 2017 skydoves rights reserved. | ||
*/ | ||
|
||
public class LocalUrls { | ||
public static String getLocalUrl(int index) { | ||
if(index == 1) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=4182025000"; | ||
else if(index == 2) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=4282025000"; | ||
else if(index == 3) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=4817074000"; | ||
else if(index == 4) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=4729053000"; | ||
else if(index == 5) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=2920054000"; | ||
else if(index == 6) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=2720065000"; | ||
else if(index == 7) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=3023052000"; | ||
else if(index == 8) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=2644058000"; | ||
else if(index == 9) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=3114056000"; | ||
else if(index == 10) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=2871025000"; | ||
else if(index == 11) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=4681025000"; | ||
else if(index == 12) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=4579031000"; | ||
else if(index == 13) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=4376031000"; | ||
else if(index == 14) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=4376031000"; | ||
else if(index == 15) | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=5013025300"; | ||
return "http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=1159068000"; | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
app/src/main/java/com/skydoves/waterdays/persistence/preference/PreferenceManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.skydoves.waterdays.persistence.preference; | ||
|
||
import android.content.Context; | ||
import android.content.SharedPreferences; | ||
|
||
/** | ||
* Created by skydoves on 2016-10-15. | ||
* Updated by skydoves on 2017-08-17. | ||
* Copyright (c) 2017 skydoves rights reserved. | ||
*/ | ||
|
||
public class PreferenceManager { | ||
|
||
private static final String preferenceKey = "waterdays"; | ||
|
||
private Context mContext; | ||
|
||
public PreferenceManager(Context context) { | ||
this.mContext = context; | ||
} | ||
|
||
public boolean getBoolean(String key, boolean default_value) { | ||
SharedPreferences pref = mContext.getSharedPreferences(preferenceKey, mContext.MODE_PRIVATE); | ||
return pref.getBoolean(key, default_value); | ||
} | ||
|
||
public int getInt(String key, int default_value) { | ||
SharedPreferences pref = mContext.getSharedPreferences(preferenceKey, mContext.MODE_PRIVATE); | ||
return pref.getInt(key, default_value); | ||
} | ||
|
||
public String getString(String key, String default_value) { | ||
SharedPreferences pref = mContext.getSharedPreferences(preferenceKey, mContext.MODE_PRIVATE); | ||
return pref.getString(key, default_value); | ||
} | ||
public void putBoolean(String key, boolean default_value) { | ||
SharedPreferences pref = mContext.getSharedPreferences(preferenceKey, mContext.MODE_PRIVATE); | ||
SharedPreferences.Editor editor = pref.edit(); | ||
editor.putBoolean(key, default_value).apply(); | ||
} | ||
|
||
public void putInt(String key, int default_value) { | ||
SharedPreferences pref = mContext.getSharedPreferences(preferenceKey, mContext.MODE_PRIVATE); | ||
SharedPreferences.Editor editor = pref.edit(); | ||
editor.putInt(key, default_value).apply(); | ||
} | ||
|
||
public void putString(String key, String default_value) { | ||
SharedPreferences pref = mContext.getSharedPreferences(preferenceKey, mContext.MODE_PRIVATE); | ||
SharedPreferences.Editor editor = pref.edit(); | ||
editor.putString(key, default_value).apply(); | ||
} | ||
} |
Oops, something went wrong.