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!