chetna bhandari、
この問題が発生していました。私はiOS(APNS)とAndroid(GCM)用のプラットフォームアプリケーションを用意しています。 iOSの場合、createPlatformEndpointメソッドは正常に動作します。しかし、Androidの場合、同じトークンを持つ複数のエンドポイント(あなたと同じように最大3つ)を作成します。次回、createPlatformEndpointを使用しようとすると、例外がスローされます。
正しい方法は、エンドポイントをアプリケーションに保存することです。まだ格納されていない場合は、作成して保存します。
次に、擬似コードは次のとおりです。
retrieve the latest device token from the mobile operating system
if (the platform endpoint ARN is not stored)
# this is a first-time registration
call create platform endpoint
store the returned platform endpoint ARN
endif
call get endpoint attributes on the platform endpoint ARN
if (while getting the attributes a not-found exception is thrown)
# the platform endpoint was deleted
call create platform endpoint with the latest device token
store the returned platform endpoint ARN
else
if (the device token in the endpoint does not match the latest one) or
(get endpoint attributes shows the endpoint as disabled)
call set endpoint attributes to set the latest device token and then
enable the platform endpoint
endif
endif
あなたは、このリンクで見ることができます: Create a Platform Endpoint and Manage Device Tokens
を