Closed zstartw closed 6 years ago
Looks like your code is missing the 'Firebase RegistrationIntentService', here is a simple example:
public class FirebaseRegistrationIntentService extends IntentService { public static final String TAG = FirebaseRegistrationIntentService.class.getSimpleName(); public FirebaseRegistrationIntentService() { super(TAG); } @Override protected void onHandleIntent(Intent intent) { Log.d(TAG, "onHandleIntent: registering the token to pusher"); String token = FirebaseInstanceId.getInstance().getToken(); // Register to Liveperson Pusher String account = "82055668"; String appID = "com.shaym.sdk28"; LivePerson.registerLPPusher(account, appID, token); }}
--
And declaring it in the manifest file as well:
<service
android:name=".push.fcm.FirebaseRegistrationIntentService"
android:exported="false">
</service>
Make sure the handleGCM starts the correct service:
private void handleGCMRegistration(Context ctx) {
Intent intent = new Intent(ctx, FirebaseRegistrationIntentService.class);
ctx.startService(intent);
}
@shaymLP Thank you for your reply, I tried to add these configurations to my project, but still no effect. This is my background data configuration, I am not sure there is no set error. Is there any other way to debug notice?
Notifications sent via the Firebase console can be received, but messages from Liveperson can not be found
Hi zstartw, Do you have more than one entry for 'GearBest-Test' under your configured apps on the LP dashboard? If so make sure that all apps are uniquely named.
Also, make sure you are sending the correct application name when you register your token with LP. For example you do...
LivePerson.registerLPPusher(LiverPersonUtil.BRAND_ID, LiverPersonUtil.APP_ID, refreshedToken);
Is 'LiverPersonUtil.APP_ID' set to "GearBest-Test"?
@parrishsteve,I checked out the preparation of the project, and did not find any difference, this is my id set.
public final static String BRAND_ID = "70088615";
public final static String APP_ID = "ed1d95ea-63e7-45b7-8f11-1a87173b7536";
I am very confused now this notification function, do not know when to receive this notice.
@zstartw the App ID should be bundle name, "GearBest-Test" in your case You can check this documentation for more information on how to implement push notification in Android https://developers.liveperson.com/android-implementation-guide.html
I followed the developer liverperson web.and configured my liverperson below:
configured AndroidManefest.xml
MyFirebaseInstanceIDService.java
In my Application init the liveperson
LiverPersonUtil.java
but I can not received the notications. the method
onMessageReceived
inFirebaseMessagingService
not run.please help me