private SinchClient sinchClient = null;
//setting display name to sinch client
sinchClient.setPushNotificationDisplayName(response.getFirst_name()+" "+response.getLast_name());
//Getting Dispaly name when push notification is shown.
NotificationResult result = sinchClient.relayRemotePushNotificationPayload(intent);
result.getDisplayName();
答案 0 :(得分:1)
我认为问题是你应该只定义private SinchClient sinchClient = null;
,但你忘了在下面声明它们
SinchClient sinchClient = Sinch.getSinchClientBuilder().context(context)
.applicationKey("<application-key>")
.applicationSecret("<application-secret>")
.environmentHost("sandbox.sinch.com")
.userId("<user id>")
.build();