Commit ac568cea authored by Toni Beier's avatar Toni Beier

update librarys

parent 1d94ec48
......@@ -47,7 +47,7 @@
</service>
<service android:name=".core.manager.push.FirebaseIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
......
......@@ -128,34 +128,37 @@ def parseFile(name) {
}
dependencies {
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile 'me.dm7.barcodescanner:zxing:1.9.8'
implementation 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.4'
//compile 'com.j256.ormlite:ormlite-core:4.48'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.4'
//android support libraries
//simply compile google maps only
//compile 'com.google.android.gms:play-services:11.8.0'
compile 'com.google.android.gms:play-services-maps:12.0.1'
compile 'com.google.android.gms:play-services-location:12.0.1'
compile 'com.google.firebase:firebase-core:12.0.1'
compile 'com.google.firebase:firebase-messaging:12.0.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.jjoe64:graphview:3.1.3'
compile 'com.github.machinarius:preferencefragment:0.1.2'
compile 'com.loopj.android:android-async-http:1.4.5'
compile 'org.greenrobot:eventbus:3.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support.constraint:constraint-layout:1.1.3'
compile 'com.android.support:preference-v7:28.0.0'
//compile 'com.google.android.gms:play-services:12.0.1'
compile 'com.google.android.gms:play-services-maps:17.0.0'
compile 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.jjoe64:graphview:3.1.3'
implementation 'com.github.machinarius:preferencefragment:0.1.2'
implementation 'com.loopj.android:android-async-http:1.4.5'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha4'
implementation 'androidx.preference:preference:1.0.0'
// AndroidX Libraries
implementation 'androidx.work:work-runtime:2.0.0'
implementation 'androidx.work:work-runtime:2.1.0'
implementation group: 'androidx.appcompat', name: 'appcompat', version: '1.0.2'
// Material Design Libraries
implementation 'com.google.android.material:material:1.0.0'
}
allprojects {
......
......@@ -4,7 +4,9 @@ import android.content.Context;
import android.util.Log;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.FirebaseInstanceIdService;
//import com.google.firebase.iid.FirebaseInstanceIdService;
import com.google.firebase.messaging.FirebaseMessagingService;
import de.bps.asist.core.manager.environment.EnvironmentManager;
......@@ -12,7 +14,7 @@ import de.bps.asist.core.manager.environment.EnvironmentManager;
* Created by EPereira on 06.02.2017.
*/
public class FirebaseIDService extends FirebaseInstanceIdService {
public class FirebaseIDService extends FirebaseMessagingService {
private static final String TAG = "FirebaseIDService";
private EnvironmentManager environment;
......@@ -26,18 +28,23 @@ public class FirebaseIDService extends FirebaseInstanceIdService {
environment = EnvironmentManager.getInstance();
pnm = PushNotificationManager.getInstance();
}
@Override
public void onTokenRefresh() {
public void onNewToken(String token) {
Log.d(TAG, "Refreshed token: " + token);
// Get updated InstanceID token.
String refreshedToken = FirebaseInstanceId.getInstance().getToken();
//String refreshedToken = FirebaseInstanceId.getInstance().getToken();
//Log.d(TAG, "Refreshed token: " + refreshedToken);
// If you want to send messages to this application instance or
// manage this apps subscriptions on the server side, send the
// Instance ID token to your app server.
environment.setDeviceToken(context, refreshedToken);
pnm.registerDevice(context, refreshedToken);
sendRegistrationToServer(token);
}
private void sendRegistrationToServer(String token) {
//this method is to send token to your app server.
environment.setDeviceToken(context, token);
pnm.registerDevice(context, token);
}
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment