Support Topics Documentation Slack YouTube Blog

Pub/Sub question

(FlipTrip) #1

In this topic you described difference between pub/sub and push notifications:

Pub/Sub messages:

    App which receives messages must be running.
Does this mean that in case the app is closed I shouldn't get messages? Because when I close the app I'm still receiving them (they are shown as push notification in Android status bar). This is how I send message:
public static void sendJoinRequest(String groupId) {
        String channel = "ch"+ groupId;
        String senderName = User.getName();

        Group group = (Group) User.getUser().getProperty("group");

        PushObject pushObject = new PushObject();

        Backendless.Messaging.publish(channel, new Gson().toJson(pushObject), new AsyncCallback<MessageStatus>() {
            public void handleResponse(MessageStatus response) {
                BusProvider.getInstance().post(new BackendlessCallbackEvent(true));
                Log.d(LOG_TAG, response.toString());

            public void handleFault(BackendlessFault fault) {
                Log.e(LOG_TAG + ".sendJoinRequest", fault.toString()); 

<receiver android:name=".utilities.PushReceiver"
                <action android:name=""/>
                <action android:name=""/>

                &lt;category android:name=&quot;com.fliptripapp.fliptrip&quot;/&gt;

Am I missing something here?

(Arthur Dzidzoiev) #2

You must set PushPolicy because by default it is ALSO which means pus and pub/sub.
Please look at documentation -