Commit ac568cea authored by Toni Beier's avatar Toni Beier

update librarys

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