Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

handle Push Notification #5

Open
issamux opened this issue Dec 5, 2017 · 2 comments
Open

handle Push Notification #5

issamux opened this issue Dec 5, 2017 · 2 comments

Comments

@issamux
Copy link

issamux commented Dec 5, 2017

Hi,
I m using Firebase implementation for Accengage Push Notifications.
and use same code to handle message received in my Service. (same as sample code)

private Handler mHandler = new Handler(Looper.getMainLooper()) {
@Override
public void handleMessage(Message message) {
A4S a4s = A4S.get(getApplicationContext());
Bundle bundle = message.getData();
if (a4s.isAccengagePush(bundle)) {
// process A4S push
a4s.handlePushMessage(bundle);
} else {
// TODO ... handle non Accengage message
}
}
};

But now , when i try to receive a push notification , my app crash and close

Main Error is : android/support/v7/app/NotificationCompat$Builder;

Android Documentation :

android.support.v7.app.NotificationCompat
and its containing classes has been deprecated and will be removed in a future release:
Use NotificationCompat.Builder instead of v7.app.NotificationCompat.Builder. Functionality that >previously relied on using the v7 AppCompat Builder has now been folded into the v4 Compat Builder.

my build gradle :

compileSdkVersion 27
buildToolsVersion '27.0.1'

implementation 'com.ad4screen.sdk:A4SSDK:3.6.2'
implementation 'com.ad4screen.sdk:plugin-firebase-messaging:2.0'
implementation 'com.google.firebase:firebase-config:11.6.0'
implementation 'com.android.support:support-v4:27.0.1'

trace :

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/app/NotificationCompat$Builder;
at com.ad4screen.sdk.service.modules.push.a.b.(SourceFile:95)
at com.ad4screen.sdk.service.modules.push.a.c.(SourceFile:36)
at com.ad4screen.sdk.service.modules.push.a.d.(SourceFile:24)
at com.ad4screen.sdk.service.modules.push.a.e.(SourceFile:26)
at com.ad4screen.sdk.common.b.j$f.a(SourceFile:137)
at com.ad4screen.sdk.service.modules.push.h.a(SourceFile:138)
at com.ad4screen.sdk.service.modules.push.PushProvider.handleMessage(SourceFile:271)
at com.ad4screen.sdk.service.modules.push.PushProvider.handleMessage(SourceFile:222)
at com.ad4screen.sdk.service.a$14.run(SourceFile:408)
at com.ad4screen.sdk.A4SService$b.run(SourceFile:442)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.app.NotificationCompat$Builder"

@andronmobi
Copy link

Hi!

Thank you for your feedback.

The sdk 3.6.2 is not compatible with Android API 27. You have to downgrade your API to 26 or wait for the new SDK version 3.6.4 which will be available within a week (maximum two).

@issamux
Copy link
Author

issamux commented Dec 6, 2017

Thanks for ure response.
maybe I m missing smith, but it will be more helpful if there are such informations in ure website about compatibility with new version of Android. if they are available some where can you please provide the url .
thanks again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants