function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sachin10Sachin10 

Push notifications in standard Salesforce Mobile App

Hi All,
I would like to send push notifications to salesforce mobile app given by salesforce.
I looked into the documentation by salesforce, but couldn't succeed.

I have created the trigger given in the below link
 https://developer.salesforce.com/docs/atlas.en-us.pushImplGuide.meta/pushImplGuide/pns_apex_trigger.htm.
I have also configure the connected App as suggested in the below link:
https://developer.salesforce.com/docs/atlas.en-us.pushImplGuide.meta/pushImplGuide/pns_create_connected_app_android.htm
I have turned on the push notification settings in my developer org.
 
Any help on how to proceed further will be much appreciated.
Thanks
PatMcClellan__cPatMcClellan__c
@Sachin10, i just spotted this thread because I'm facing the same challenge. Not sure if you still need an answer, but for the benefit of others who find this thread, I'll share what I've figured out from the VERY CONFUSING documentation about push notifications.
  1. If you want to send push notifications to Salesforce1 users on iOS or Android, you DO NOT need to go through all the instructions for setting up a connected app, registering with Apple and Google, etc. All of that is required for custom apps running outside of Salesforce1.
  2. All of that is already set up for Lightning Apps you create and running in Salesforce1. All you need to do is post to the user's Chatter feed and the notification gets sent. You can create that post in Process Builder, or with Apex by creating a FeedItem record and setting the body and parentId (recipient Id).
NOTE: this works for triggers and events tied to actions of Users who have permission to post to Chatter. This does NOT work for platform events or REST calls that create records you want to trigger the notification, because in those situations, there is no "context user" that has rights to create a Chatter post. Very frustrating... my current challenge.
PatMcClellan__cPatMcClellan__c
OK, I was able to get Chatter posting from a REST call, but going into the SITES > Public Access Settings > check the Chatter checkbox. However, while this will post to Chatter, it won't trigger the Notification. Seems kind of pointless!