More Related Content
PDF
Amazon SNS Mobile Push を使ってみる PDF
BluetoothメッシュによるIoTシステムを支えるサーバーレス技術 #serverlesstokyo PDF
IIJmio meeting 27 5G NSAについて PDF
PPTX
【2017年】ディープラーニングのフレームワーク比較 PDF
「サーバレスの薄い本」からの1年 #serverlesstokyo PDF
PDF
スクラムを導入してみて一回挫折したけど再起させた話 Similar to [AWSマイスターシリーズ]Amazon SNSモバイルプッシュ通知
PDF
AWS Black Belt Techシリーズ Amazon SNS モバイルプッシュ PDF
[AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript- PDF
Amazon Pinpoint × グロースハック活用事例集 PDF
20190604 AWS Black Belt Online Seminar Amazon Simple Notification Service (SNS) PPTX
Amazon SNSでZabbixのアラートをプッシュ通知してみた PDF
マルチテナントメッセージング基盤を刷新して一年運用した話 PDF
【Monaca×mobile backend】 プッシュ通知をカンタン実装! スピード感ある開発をしよう! PDF
AWS Black Belt Online Seminar 2017 Amazon Pinpoint で始めるモバイルアプリのグロースハック PDF
【JavaScript SDK ver.2】MonacaとmBaaSでプッシュ通知を体験しよう(for Android & iOS) More from Amazon Web Services Japan
PDF
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介 PDF
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM) PDF
マルチテナント化で知っておきたいデータベースのこと PDF
Amazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデート PDF
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ PDF
Infrastructure as Code (IaC) 談義 2022 PDF
202204 AWS Black Belt Online Seminar AWS IoT Device Defender PDF
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨ PDF
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用 PPTX
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介 PDF
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介 PDF
Amazon QuickSight の組み込み方法をちょっぴりDD PDF
202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現 PPTX
20220409 AWS BLEA 開発にあたって検討したこと PDF
202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap... PDF
202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS PDF
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf PDF
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles PDF
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介 PDF
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために [AWSマイスターシリーズ]Amazon SNSモバイルプッシュ通知
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
Amazon SNS MobilePushはプラットフォーム横断型プッシュ通知
のための中間マネージドサービス
Amazon SNS
Mobile Push
Apple Devices
Google Devices
Amazon Kindle Fire Devices
- 12.
- 13.
- 14.
メッセージサイズの上限はプラットフォームごと
• Apple PushNotification Service
• 256 bytes
• https://developer.apple.com/library/ios/documentation/NetworkingInternet/Con
ceptual/RemoteNotificationsPG/Chapters/ApplePushService.html
• Amazon Device Messaging
• 6144 bytes
• https://developer.amazon.com/sdk/adm/sending-message.html
• Google Cloud Messaging
• 4096 bytes
• http://developer.android.com/intl/ja/google/gcm/adv.html
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
Java BatchアプリからPush
『AWS SDK提供のSNSライブラリでメッセージをPush』
•AWSのCredential(AccessKeyID と SecretAccessKey)でAmazon SNS用のClientオブジェク
トを生成
↓
• Google apiのキー, Device Token, 送信メッセージを定義
↓
• 各プラットフォーム(Android, Apple, Kindle)用オブジェクトを生成
↓
• 送信先デバイスのEndpointを生成
↓
• Endpointにメッセージを送信
- 38.
Java BatchアプリからPush
• 各プラットフォーム(Android,Apple, Kindle)用オブジェクトを生成
CreatePlatformApplicationRequest platformApplicationRequest =
new CreatePlatformApplicationRequest();
Map<String, String> attributes = new HashMap<String, String>();
attributes.put("PlatformPrincipal", principal);
attributes.put("PlatformCredential", credential);
platformApplicationRequest.setAttributes(attributes);
platformApplicationRequest.setName(applicationName);
platformApplicationRequest.setPlatform(platform.name());
CreatePlatformApplicationResult platformApplicationResult =
snsClient.createPlatformApplication(platformApplicationRequest);
• Google: GCMでは使用しない
• Apple: Certificate(pem)
• Kindle: Client ID
• Google: apisのキー
• Apple: ClientKey(pem)
• Kindle: Client Secret
- 39.
Java BatchアプリからPush
• 送信先デバイスのEndpointを生成
StringapplicationArn = platformApplicationResult.getPlatformApplicationArn();
CreatePlatformEndpointRequest platformEndpointRequest =
new CreatePlatformEndpointRequest();
platformEndpointRequest.setCustomUserData(customData);
platformEndpointRequest.setToken(platformToken);
platformEndpointRequest.setPlatformApplicationArn(applicationArn);
CreatePlatformEndpointResult platformEndpointResult =
snsClient.createPlatformEndpoint(platformEndpointRequest);
端末から取得した
デバイスのトークン
プラットフォーム情報
- 40.
Java BatchアプリからPush
• Endpointにメッセージを送信
PublishRequestpublishRequest = new PublishRequest();
Map<String, String> messageMap = new HashMap<String, String>();
messageMap.put(platform.name(), getPlatformSampleMessage(platform));
publishRequest.setTargetArn(platformEndpointResult.getEndpointArn());
publishRequest.setMessageStructure("json");
message = jsonify(messageMap);
publishRequest.setMessage(message);
PublishResult publishResult = snsClient.publish(publishRequest);
messageをセットしてpublish
各プラットフォームを意識せず
統一のインターフェースでシンプルにpush可能
- 41.
- 42.
- 43.
Amazon SNS
Mobile Push
まとめ:
•クロスプラットフォームプッシュ通知 (Apple, Google, Amazon)
• 1月100万リクエスト無料、以降は100万ごとに$1.00
• 堅牢性と信頼性とスケーラビリティを兼備
• 簡単なトークン管理
参考情報:
• SNSの詳細: http://amzn.to/179ee7r
• はじめ方およびサンプルアプリ: http://amzn.to/15rs1DV