Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean-up: Fixed lint errors, updated libraries, and rewrote deprecated code. #154

Merged
merged 9 commits into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
50 changes: 25 additions & 25 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,71 +55,71 @@ dependencies {
implementation 'com.dmitrymalkovich.android:progress-fab:1.6'
implementation 'com.wang.avi:library:2.1.3'
implementation 'com.chabbal:slidingdotsplash:1.0.2'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'androidx.multidex:multidex:2.0.1'

implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.google.code.gson:gson:2.8.6'

implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.1'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

//implementation 'com.getbase:floatingactionbutton:1.10.1'
implementation 'com.github.clans:fab:1.6.4'

implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.10.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'

implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.picasso:picasso:2.71828'

implementation 'com.pushwoosh:pushwoosh:4.6.2'
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.pushwoosh:pushwoosh:5.20.0'
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'

implementation 'com.jakewharton:butterknife:10.2.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.github.bumptech.glide:glide:4.10.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'

implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

implementation 'noman.weekcalendar:weekcalendar:1.0.6'

// maps
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-places:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'

// firebase
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-firestore:17.1.1'
implementation 'com.google.firebase:firebase-messaging:17.3.3'
implementation 'com.google.firebase:firebase-core:17.2.1'
implementation 'com.google.firebase:firebase-firestore:21.3.0'
implementation 'com.google.firebase:firebase-messaging:20.0.1'
implementation 'com.firebase:firebase-jobdispatcher:0.7.0'
implementation 'com.google.firebase:firebase-config:16.1.0'
implementation 'com.google.firebase:firebase-config:19.0.3'

// dagger 2
implementation 'com.google.dagger:dagger:2.17'
annotationProcessor 'com.google.dagger:dagger-compiler:2.17'
implementation 'com.google.dagger:dagger:2.25.2'
annotationProcessor 'com.google.dagger:dagger-compiler:2.25.2'

// lombok
compileOnly 'org.projectlombok:lombok:1.18.2'
annotationProcessor 'org.projectlombok:lombok:1.18.2'
compileOnly 'org.projectlombok:lombok:1.18.10'
annotationProcessor 'org.projectlombok:lombok:1.18.10'

// MaterialShowcaseView for spotlight
implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0'

// Required -- JUnit 4 framework
testImplementation 'junit:junit:4.12'
// Optional -- Mockito framework
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'org.mockito:mockito-core:3.1.0'

// Navigation for UI
def nav_version = "2.1.0"
implementation "androidx.navigation:navigation-fragment:$nav_version"
implementation "androidx.navigation:navigation-ui:$nav_version"

// Pushwoosh
implementation 'com.pushwoosh:pushwoosh:5.20.0'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: "androidx.navigation.safeargs"
6 changes: 0 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
Expand Down Expand Up @@ -170,11 +169,6 @@
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name=".utilities.MyFirebaseInstanceIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>

<activity
android:name=".domain.main.CalendarActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,10 @@ public void onMapReady(GoogleMap googleMap) {
public void onMapClick(LatLng latLng) {
if (originWrapper == null || busRouteWrapper == null || navigation_button == null) {
originWrapper = (LinearLayout) layout.findViewById(R.id.origin_bar);
navigation_button = (com.google.android.material.floatingactionbutton.FloatingActionButton) layout.findViewById(R.id.determinate);
navigation_button = layout.findViewById(R.id.determinate);

}
navigation_button.setVisibility(View.VISIBLE);
navigation_button.show();
hideKeyboard(mapView);
clearFocus();
}
Expand Down
35 changes: 14 additions & 21 deletions app/src/main/java/com/asuc/asucmobile/domain/main/PushReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,30 @@
import android.content.Intent;
import android.util.Log;

import com.pushwoosh.PushManager;
import com.pushwoosh.Pushwoosh;

public class PushReceiver extends BroadcastReceiver {

private static final String TAG = "PushReceiver";

private static PushManager manager;

/*
* This method is called when the phone boots
*/
@Override
public void onReceive(Context context, Intent intent) {
// Register for push notifications
registerPushes(context);
}

public static void registerPushes(Context context) {
// If we already registered, deregister then re-register
if (manager != null) {
return;
}

// Start PushWhoosh
manager = PushManager.getInstance(context);
try {
manager.onStartup(context);
manager.registerForPushNotifications();
} catch (Exception e) {
Log.e(TAG, e.toString());
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
// Register for push notifications
Pushwoosh.getInstance().registerForPushNotifications(result -> {
if (result.isSuccess()) {
Log.d(TAG, "Successfully registered for push notifications with token: "
+ result.getData());
} else {
if (result.getException() != null) {
Log.d(TAG, "Failed to register for push notifications: "
+ result.getException().getMessage());
}
}
});
}
}

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,4 @@ private void sendNotification(String messageBody) {
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(MESSAGE_ID++, mBuilder.build());
}



}
3 changes: 1 addition & 2 deletions app/src/main/res/layout/activity_maps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
tools:context="com.androidsample.BottomSheetActivity">
<include layout="@layout/bottom_sheet" />

</androidx.coordinatorlayout.widget.CoordinatorLayout
>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

<RelativeLayout
android:id="@+id/topBox"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/fragment_calendar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
android:id="@+id/list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/toolbar"
/>

</RelativeLayout>
</RelativeLayout>