0

我正在尝试让 AWS Pinpoint 向我的 Android 应用程序发送通知。我在这里完成了设置测试说明:https ://aws-amplify.github.io/docs/android/push-notifications

我能够获取 Pinpoint 客户端设备令牌并使用 Pinpoint 测试消息控制台发送消息。发送消息后,我的日志中会出现以下堆栈跟踪:

2019-04-11 11:56:34.757 8880-9196/com.example E/EventRecorder: Unable to successfully deliver events to server. Events will be saved, error likely recoverable.Cognito Identity not configured
com.amazonaws.AmazonClientException: Cognito Identity not configured
    at com.amazonaws.mobile.client.AWSMobileClient.getCredentials(AWSMobileClient.java:352)
    at com.amazonaws.services.pinpoint.AmazonPinpointClient.invoke(AmazonPinpointClient.java:4024)
    at com.amazonaws.services.pinpoint.AmazonPinpointClient.putEvents(AmazonPinpointClient.java:3074)
    at com.amazonaws.mobileconnectors.pinpoint.internal.event.EventRecorder.submitEventsAndEndpoint(EventRecorder.java:366)
    at com.amazonaws.mobileconnectors.pinpoint.internal.event.EventRecorder.submitEventsAndEndpoint(EventRecorder.java:344)
    at com.amazonaws.mobileconnectors.pinpoint.internal.event.EventRecorder.processEvents(EventRecorder.java:315)
    at com.amazonaws.mobileconnectors.pinpoint.internal.event.EventRecorder$1.run(EventRecorder.java:240)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:914)

stacktrace 建议我需要“Cognito Identity”才能使消息传递工作,但我不希望该服务,因为我已经构建了用户管理/身份验证过程。

我该如何解决这个问题?

谢谢你。

4

1 回答 1

0

我能够通过使用物理设备而不是模拟器来解决这个问题。

于 2019-04-16T12:58:45.203 回答