Hey All,
As I am unable to reopen my previous Question, which I believe still remains unanswered. I am starting a brand new topic.
To refer to the old thread
http://support.backendless.com/t/backendless-messagingservice-push-notification-persistenceservice
Currently my team is having problems accessing PersistenceService from within the MessagingService.
Here’s what we are trying to achieve in a nutshell.
- We send a push notification via iOS Client. The responsible method here is
-(void)publish:(NSString
*)channelName message:(id)message publishOptions:(PublishOptions
*)publishOptions deliveryOptions:(DeliveryOptions *)deliveryOptions
response:(void(^)(MessageStatus *))responseBlock error:(void(^)(Fault
*))errorBlock;
Everything is perfect till now. Push Notifications are received in Both iOS and Android
Devices as expected.
We have even implemented a custom Messaging Service Handler at our server end and have successfully deployed it. We have
updated the afterPublish event handler.
@Override
public void afterPublish(
RunnerContext context, Object message, PublishOptions publishOptions,
DeliveryOptions deliveryOptions, ExecutionResult <MessageStatus>
result ) throws Exception
{
// add your custom logic here
}
Now
suppose we have a table, say PushMessageStatusTable in Backendless. As
soon as the afterPublish event handler is called/executed. We would like
to create a new record in the MessageStatusTable.
The problem is, we are having difficulties accessing PushMessageStatusTable from afterPublish Event Handler.
Is this possible at all??
Not to sound rude, but am I banging my head in the wrong place?
Maybe its easier to call Publish method from afterCreate Event Handler?
A lil help please. Thanks for reading through.