我实施了这个答案后 second answer
它显示在亚马逊正确注册的新设备,但我无法在Android设备上接收推送通知
这是我用来注册的代码
CognitoCachingCredentialsProvider cognitoCachingCredentialsProvider = new CognitoCachingCredentialsProvider(context,"IDENTITY_POOL_ID",Regions.US_EAST_1);
PinpointConfiguration config = new PinpointConfiguration(context, "APP_ID", Regions.US_EAST_1, cognitoCachingCredentialsProvider);
PinpointManager pinpointManager = new PinpointManager(config);
pinpointManager.getNotificationClient().registerGCMDeviceToken(refreshedToken);
这是接收器
<receiver
android:name="com.amazonaws.mobileconnectors.pinpoint.targeting.notification.PinpointNotificationReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.amazonaws.intent.fcm.NOTIFICATION_OPEN"/>
</intent-filter>
</receiver>
所以如何解决这个问题或者有什么遗漏
答案 0 :(得分:0)
我检查了API密钥是错误的,现在每件事情都正常工作