I’ve a question … what is the difference between push notification and pub/sub … if I’ve register the device then send a push to a channel … and subscribe to the channel to get the published message …isn’t is the same as pub/sub message … ? or they are different ?
And I’ve a problem in data service … when I get the rows from the table … only 10 rows are retrieved … it’s problem from my code ?
And thanks
can be delivered to your app even if the app is not currently running.
have limit in size of messages (check documentation from Apple, Google and Microsoft on these limits)
require registration of the physical device (meaning they cannot be used from a program not running on a device)
Pub/Sub messages:
App which receives messages must be running.
Much higher limit on the message size (2048 bytes)
Can send/receive ANY message - primitive values, strings, dates, objects, collections
works across all devices, browsers, standalone programs
As for the 10 rows received, this is result of paging - use the PageSize argument to set how many records should be returned (cannot exceed more than 100). See [url=https://backendless.com/feature-17-data-paging-or-how-to-efficiently-load-large-data-sets-in-a-mobile-app/]this[/url] for details.
I’ve already generated it … it’s very useful …
but when I select user to chat with it shows a dialog and i’t isn’t dismissing and the selected user don’t get a notification
OK if I send a message using pub/sub and set a header with key “to:” , and value "receiver name "
can the message been sent to only the user who his name is the “receiver name” ?
Sorry … but I haven’t understand the code in the "Data paging " what is the
CountDownLatch latch = new CountDownLatch( 1 );
and why we use it ?
and if have 1 page then I used nextPage method … what it will return ?
that’s my code :
BackendlessDataQuery dataQuery = new BackendlessDataQuery();
dataQuery.setPageSize(100);
Backendless.Persistence.of(Messages.class).find(dataQuery,new AsyncCallback<BackendlessCollection<Messages>>() { @Override
public void handleResponse(BackendlessCollection<Messages> messagesCollection) {
if (messagesCollection != null) {
UsersMessages = messagesCollection.getCurrentPage();
if(messagesCollection.getTotalObjects() > 100){
UsersMessages = messagesCollection.nextPage().getCurrentPage();
}
messagesAdapter adapter = new messagesAdapter(MainActivity.this, UsersMessages);
listView.setAdapter(adapter);
swipeRefreshLayout.setRefreshing(false);
}
} @Override
public void handleFault(BackendlessFault backendlessFault) {
}
});
where I have to use nextPage method ?
and sorry for taking your time
It is used only in the async example to force sequential loading of individual pages (page 2 is loaded after page 1, and page 3 is loaded only after page 2 is available and so on).
nextPage should be used when you need to fetch the next page of data. If you are at the end of the collection, the sync version of the method will be returning empty collection.