- Home /
Amazon Simple Notification Service (SNS) AWS Mobile SDK for Unity
Hi great people of Unity Community!
I've been stuck for a while trying to enable notifications for my Unity project. I'm not using Cognito, so this is how the code is currently implemented:
AWSCredentials Credentials = new BasicAWSCredentials(key, secret);
IAmazonSimpleNotificationService SnsClient = new AmazonSimpleNotificationServiceClient(Credentials, _snsRegion);
GCM.Register((regId) => {
SnsClient.CreatePlatformEndpointAsync(
new CreatePlatformEndpointRequest {
Token = regId,
PlatformApplicationArn = AndroidPlatformApplicationArn
},
(resultObject) => {
if (resultObject.Exception == null) {
CreatePlatformEndpointResponse response = resultObject.Response;
_endpointArn = response.EndpointArn;
Subscribe();
}
}
);}, GoogleConsoleProjectId);
}
private static void Subscribe() {
SnsClient.SubscribeAsync(new SubscribeRequest(topicARN, "application", _endpointArn), Callback);
}
This is the basics of the code I have right now, what am I missing?
Thanks in advance!
We see the device show up in our list when it registers, but the push notifications don't seem to surface in the device at all.
What am I missing to actually make push notifications show up?
This is all basically following the example code from the SD$$anonymous$$...
Also just updated the $$anonymous$$anifest file with no noticable difference~
Pulling out my own hairs at the moment... been stuck on this for several days now... and not a single person in ##AWS (amazon web services) or #unity3d channel has a clue...
Answer by jmpereyra · Apr 27, 2016 at 05:35 PM
I would first Log what's happening when you DO have an exception on the result, I know that's not an answer to the actual question but probably you'll find the answer there, it happened to me.
Your answer
Follow this Question
Related Questions
Mobile notifications 0 Answers
NotificationServices' UnregisterForRemoteNotifications not persisting between game sessions? 0 Answers
[iOS] NotificationServices.localNotifications is empty when game is minimized 1 Answer
Local notification with closed app 3 Answers
Is there a unified solution for push notifications on both iOS and Android? 1 Answer