diff --git a/app/build.gradle b/app/build.gradle
index aefcd82..fd652ba 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -35,6 +35,10 @@ android {
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
+
+ }
+ dataBinding {
+ enabled = true
}
}
@@ -62,6 +66,8 @@ dependencies {
implementation 'com.google.code.gson:gson:2.6.1'
implementation "com.squareup.retrofit2:adapter-rxjava2:2.4.0"
+
+
//Permission
implementation 'gun0912.ted:tedpermission:2.0.0'
// Dali Van Picasso ~~ 밤 고흐의 달이 보이는밤~
@@ -79,6 +85,9 @@ dependencies {
// Google Firebase
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
+ // GA
+
+
implementation files('libs/com.skt.Tmap_1.53.jar')
// Butter knife
@@ -86,11 +95,14 @@ dependencies {
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
// AWS
- implementation ('com.amazonaws:aws-android-sdk-mobile-client:2.6.15@aar') { transitive = true }
+ implementation('com.amazonaws:aws-android-sdk-mobile-client:2.6.15@aar') { transitive = true }
implementation 'com.amazonaws:aws-android-sdk-s3:2.6.+'
implementation 'com.amazonaws:aws-android-sdk-cognito:2.6.+'
implementation 'id.zelory:compressor:2.1.0'
+
+
+
}
apply plugin: 'com.google.gms.google-services'
diff --git a/app/google-services.json b/app/google-services.json
deleted file mode 100644
index 004a232..0000000
--- a/app/google-services.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "project_info": {
- "project_number": "119167983437",
- "firebase_url": "https://hanriver-212300.firebaseio.com",
- "project_id": "hanriver-212300",
- "storage_bucket": "hanriver-212300.appspot.com"
- },
- "client": [
- {
- "client_info": {
- "mobilesdk_app_id": "1:119167983437:android:92d0e8fb47554bd7",
- "android_client_info": {
- "package_name": "com.depromeet.hanriver.hanrivermeetup"
- }
- },
- "oauth_client": [
- {
- "client_id": "119167983437-b15ugg05lrm35u824pkbit7ojbs837m6.apps.googleusercontent.com",
- "client_type": 3
- }
- ],
- "api_key": [
- {
- "current_key": "AIzaSyD0aa5Lsv3jreJZqXFwnJbPx91dVy5nbBU"
- }
- ],
- "services": {
- "analytics_service": {
- "status": 1
- },
- "appinvite_service": {
- "status": 1,
- "other_platform_oauth_client": []
- },
- "ads_service": {
- "status": 2
- }
- }
- }
- ],
- "configuration_version": "1"
-}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 267208b..0dfa549 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -6,19 +6,19 @@
-
-
-
+
+
+
+ android:theme="@style/AppTheme"
+ android:usesCleartextTraffic="true">
+
+
-
@@ -46,15 +51,18 @@
-
-
+
+
+
+
+ android:label="@string/app_name" />
+ android:name=".firebase.CustomFirebaseMessagingService"
+ android:exported="false">
-
+
+ android:name=".firebase.CustomFirebaseInstanceIDService"
+ android:exported="false">
-
+
diff --git a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/HanRiverMeetupApplication.java b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/HanRiverMeetupApplication.java
index fea7b1f..30045fd 100644
--- a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/HanRiverMeetupApplication.java
+++ b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/HanRiverMeetupApplication.java
@@ -81,6 +81,9 @@ public class HanRiverMeetupApplication extends Application {
@NonNull
private final IMeetingListInnerDataModel mEtcDataModel;
+// private static GoogleAnalytics sAnalytics;
+// private static Tracker sTracker;
+
public static HanRiverMeetupApplication getInstance(){
return hanRiverMeetupApplication;
@@ -90,6 +93,7 @@ public static HanRiverMeetupApplication getInstance(){
public void onCreate() {
super.onCreate();
hanRiverMeetupApplication = this;
+// sAnalytics = GoogleAnalytics.getInstance(this);
setPreferences();
}
@@ -179,7 +183,6 @@ public IMeetingListInnerDataModel getEtcDataModel() {
return mEtcDataModel;
}
-
// @NonNull
// public ICreateRoomDataModel getCreateRoomDataModel(){
// return mCreateRoomDataModel;
@@ -288,9 +291,16 @@ public void run() {
}
}, 1500);
}
-
}
}
+// synchronized public Tracker getDefaultTracker() {
+// if (sTracker == null) {
+// sTracker = sAnalytics.newTracker(R.xml.global_tracker);
+// }
+//
+// return sTracker;
+// }
+
}
diff --git a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/activity/main/MainActivity.java b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/activity/main/MainActivity.java
index 2808fa4..2490e25 100644
--- a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/activity/main/MainActivity.java
+++ b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/activity/main/MainActivity.java
@@ -15,7 +15,9 @@
import android.widget.Toast;
import com.amazonaws.mobile.client.AWSMobileClient;
+import com.depromeet.hanriver.hanrivermeetup.HanRiverMeetupApplication;
import com.depromeet.hanriver.hanrivermeetup.R;
+import com.google.firebase.analytics.FirebaseAnalytics;
import com.gun0912.tedpermission.PermissionListener;
import com.gun0912.tedpermission.TedPermission;
@@ -48,11 +50,15 @@ public class MainActivity extends AppCompatActivity {
"어디로강",
"마이한강",
};
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
+ FirebaseAnalytics analytics = FirebaseAnalytics.getInstance(this);
+
+
//Permission Check
PermissionListener permissionlistener = new PermissionListener() {
@Override
@@ -98,6 +104,7 @@ public void onPermissionDenied(ArrayList deniedPermissions) {
// Initializing ViewPager
viewPager = findViewById(R.id.viewpager);
+ viewPager.setOffscreenPageLimit(3);
viewPager.setOverScrollMode(View.OVER_SCROLL_NEVER);
// Creating TabPagerAdapter adapter
diff --git a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/fragment/meeting/MeetingCategoryFragment.java b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/fragment/meeting/MeetingCategoryFragment.java
index 7ac3beb..a26c787 100644
--- a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/fragment/meeting/MeetingCategoryFragment.java
+++ b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/fragment/meeting/MeetingCategoryFragment.java
@@ -13,6 +13,7 @@
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.TextView;
+import android.widget.Toast;
import com.depromeet.hanriver.hanrivermeetup.activity.main.MainActivity;
import com.depromeet.hanriver.hanrivermeetup.HanRiverMeetupApplication;
@@ -26,6 +27,8 @@
import java.util.List;
+import javax.net.ssl.HttpsURLConnection;
+
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.schedulers.Schedulers;
@@ -105,10 +108,19 @@ private void bind() {
mCompositeDisposable.add(WeatherService.getInstance().getWeather()
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
- .subscribe(this::setWeather));
+ .doOnNext(res->{
+ if (res.code() == HttpsURLConnection.HTTP_OK) {
+ setWeather(res.body());
+ } else {
+ Toast.makeText(getContext(), "날씨정보 호출 과정에서 오류가 발생했습니다.", Toast.LENGTH_SHORT).show();
+ }
+ })
+ .subscribe());
}
+
+
private void unBind() {
mCompositeDisposable.clear();
}
diff --git a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/fragment/timeline/TimelineFragment.java b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/fragment/timeline/TimelineFragment.java
index eb0c40d..f3dbe53 100644
--- a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/fragment/timeline/TimelineFragment.java
+++ b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/fragment/timeline/TimelineFragment.java
@@ -13,6 +13,7 @@
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
+import android.widget.Toast;
import com.depromeet.hanriver.hanrivermeetup.R;
import com.depromeet.hanriver.hanrivermeetup.fragment.timeline.Adapter.TimeLineAdapter;
@@ -34,6 +35,8 @@
import java.util.Locale;
import java.util.concurrent.TimeUnit;
+import javax.net.ssl.HttpsURLConnection;
+
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
@@ -176,7 +179,14 @@ private void bind() {
mCompositeDisposable.add(WeatherService.getInstance().getWeather()
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
- .subscribe(this::setWeather));
+ .doOnNext(res->{
+ if (res.code() == HttpsURLConnection.HTTP_OK) {
+ setWeather(res.body());
+ } else {
+ Toast.makeText(getContext(), "날씨정보 호출 과정에서 오류가 발생했습니다.", Toast.LENGTH_SHORT).show();
+ }
+ })
+ .subscribe());
mCompositeDisposable.add(EventService.getInstance().getEvents()
.subscribeOn(Schedulers.computation())
diff --git a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/network/WeatherAPIService.java b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/network/WeatherAPIService.java
index d06f3f0..cd39113 100644
--- a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/network/WeatherAPIService.java
+++ b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/network/WeatherAPIService.java
@@ -4,11 +4,12 @@
import io.reactivex.Observable;
+import retrofit2.Response;
import retrofit2.http.GET;
public interface WeatherAPIService {
@GET("weather/")
- Observable getWeather();
+ Observable> getWeather();
}
diff --git a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/service/WeatherService.java b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/service/WeatherService.java
index 3123370..74ec58a 100644
--- a/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/service/WeatherService.java
+++ b/app/src/main/java/com/depromeet/hanriver/hanrivermeetup/service/WeatherService.java
@@ -4,8 +4,11 @@
import com.depromeet.hanriver.hanrivermeetup.network.APIUtiles;
import com.depromeet.hanriver.hanrivermeetup.network.WeatherAPIService;
+import javax.net.ssl.HttpsURLConnection;
+
import io.reactivex.Observable;
import io.reactivex.schedulers.Schedulers;
+import retrofit2.Response;
public class WeatherService {
private static final WeatherService ourInstance = new WeatherService();
@@ -21,9 +24,14 @@ public void setService(String token,String id){
mService = APIUtiles.getWeatherService(token,id);
}
- public Observable getWeather(){
+ public Observable> getWeather(){
return mService.getWeather()
- .subscribeOn(Schedulers.io());
+ .subscribeOn(Schedulers.io())
+ .doOnNext( res -> {
+ if(res.code() == HttpsURLConnection.HTTP_OK){
+ res.body();
+ }
+ });
}
}
diff --git a/build.gradle b/build.gradle
index a14010d..5bda541 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.1.4'
+ classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 5c788ea..89778df 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sun Jun 17 21:35:16 KST 2018
+#Wed Nov 21 18:03:44 KST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
diff --git "a/\354\213\254\354\213\254\355\225\234\352\260\225.jpeg" "b/\354\213\254\354\213\254\355\225\234\352\260\225.jpeg"
new file mode 100644
index 0000000..ce2c29f
Binary files /dev/null and "b/\354\213\254\354\213\254\355\225\234\352\260\225.jpeg" differ