0

I am not very familiar with WordPress, as I am a mobile Developer.

I have come across a situation where each time a new blog post is added, I need to trigger a notification on the user's phone.

I have already created an Android app which will load the WordPress site.

My original thought was to use WebSockets. Website is the server, Android mobile app will be the client and I will be notified when there is a new blog post.

From my research, I am aware that WebSockets are not an option with WordPress. So what are my options?

I am not looking for snippets of code. I am looking for any known development solutions, just high level ideas.

Thank you.

  • 1
    Look into push notifications, that's what you're after. – Christine Cooper Nov 5 '16 at 20:52
0

Basically you can PULL or PUSH.

WP Rest API - PULL

Use the REST API to query for posts. Look for the latest publish date and verify your last know post. If there is a difference, send a message or trigger a notification in the app. It's possible you could set the last known on the user's metadata and use that to dif.

add action('publish_post'); - PUSH

Hook the publish post then use PHP to trigger an SMS service. You could at this point query all users to get all known information for SMS messages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.