Support Topics Documentation Slack YouTube Blog

Error in "Publishing a push notification and targeting specific devices" Android docs

Greetings

In the docs about Messages in “Message Publishing” https://backendless.com/documentation/messaging/android/messaging_message_publishing.htm I think there is an error in the example for “Publishing a push notification and targeting specific devices”.

The example says:

deliveryOptions.setPushPolicy( PushPolicy.ONLY );

But "PushPolicy.ONLY " doesnt work, is red underlined instantly by the IDE, but “PushPolicyEnum.ONLY” does work as is indicated in the previous examples.

Actually I found about this cause I mistakenly wrote “PushPolicyEnum.ONLY.ONLY”, I dont know why that was sintax valid but since I was letting you know about the other issue Im telling you about this also.

Cheers.

Hello, Erick!
Thank you for your report, you’re right - this is a mistake in docs. “PushPolicyEnum.ONLY” is the right one.
Do you have problems with using this method?
best regards,
Alex Navara

No everything is fine, I just catch it and throw you a UserHelpingException as result xD

Okay, thank you) Don’t worry, we shall handle this exception properly.
Soon docs would be upgraded.

The doc has been updated