Message:

Android (23 posts)

What does  “mobile-to-web cross login with a QR code” mean ? It is one of the approaches for the two-factor authentication. Suppose that a user is already authenticated in your application (in my example it would be an android app) and the user wants to use it’s actual session to perform an automatic authentication in another application (in my case it’s a web app). There are several examples of popular apps which use this approach. For example, to login into a web session with WhatsАpp, you must login on your phone and then scan a QR code in the web interface.login with qr1 - How to implement mobile-to-web cross login using a QR code

Continue reading

Since Backendless does not have native APIs to download files, today we’ll talk about how to implement this function in your Android application. In order to do that, we’ll need to combine Backendless file listing API and android.app.DownloadManager. There are several alternatives to this approach, but the selected one requires less code to write and has a well-thought structure.

Once a developer uploads files to the Backendless Files system, each file gets a public URL which can either be obtained using the Backendless Console or calculated using the following URL scheme:


publicURL 1024x472 - How to download a file stored in Backendless with your Android appThis public URI is the full path to the file in your Backendless file system. Directory listing API returns a list of the  FileInfo objects representing the files located in the directory, where each element in the collection contains the following properties:
Continue reading

All available APIs for creating, updating and deleting objects in the Backendless database operate on single objects. It means when you need to store multiple objects in the database, each object requires a separate API call. This increases the number of API calls your app makes. While it is great for us (hey, our billing is based on the API calls), it is not that great for your app as it results in longer processing times and substandard user experience. Starting today, with the release of Backendless version 4.5.0 we’re introducing the new APIs which will allow you to create, update or delete multiple objects with a single API call.

Bulk Create

Saving multiple new objects in the database is now as simple as passing an array of objects to the server. The server responds with a collection of objectId values (which, for example, can be used in the createRelation  API). The bulk create API is supported in all SDKs as well as the REST interface.

Bulk Update

To update objects in the database, the API accepts a condition (where clause) which identifies a group of objects. In addition to the condition, the client must also provide an object containing the changes which should be applies to the selected objects.

Bulk Delete

Similar to “Bulk Update”, this API receives a condition which identifies a group of objects to be deleted.

All of the APIs can be extended using custom business logic’s before/after events.

You can find the documentation for these APIs in the developer guides:

Performing a calculation on a group of database objects may be a complex task. For example, to calculate the sum of all orders for a customer would require retrieving all customer’s orders, iterating over them to calculate the mathematical sum of all amounts. This was yesterday! As of Backendless 4.4.0, you can use aggregate functions to calculate the average, sum, maximum and minimum values for a collection of objects without retrieving them from the server. Additionally, the system supports calculating object count for all records in the database or a record subset.

To use an aggregate function, simply request a property in a data retrieval request in the following format (the example below is for calculating the sum for the orderAmount  column):

The returned object includes the sum  property with the calculated value:

The name of the property can be modified by assigning an alias (using %20  to replace the spaces in the URL):

The result contains a value for the property named after the alias:

Grouping Results

Results can be grouped by a column. The column could be either in the same table or a related one. For example, the following request retrieves the sum of all orders grouped by related country:

Unlike the response above, the result for this query includes a collection of objects, each containing the sum for a related country:

It is also possible to apply a filter on the grouped values. This can be done using the having  clause. For example, the request below retrieves only the groups of countries where the total order amount is greater than 10000:

For more information about aggregate functions see the Backendless API documentation:

If you’re starting an Android project with Backendless and import our SDK library from Maven, please pay attention to the version number of the library. We have published a beta version of the 4.0 SDK into Maven central. When referencing Backendless in Android Studio, version 4 is the default one to popup. Unless you’re building with Backendless version 4 (which will be the default backend in the Cloud very soon), make sure to reference version 3.0.25 of the library as shown in the screenshots below:

Continue reading

google signin backendless - Google Sign in for your Backendless AppWe supported Google Sign in for a while, however, the feature was not properly documented. Not anymore )) The documentation has been updated for Android and iOS SDKs. Using the “Login with Google” function, an app can provide a way for the users to login using their Google credentials. Once a user is authenticated, Backendless creates an internal account and starts a logged-in session.

See Backendless documentation for details:

Android SDK

iOS SDK

The recording of the “Push Notifications” webinar which we conducted earlier this month is now available in our YouTube channel. You watch the webinar below or on the Webinars page on our website. In the webinar we reviewed the process of setting up an Android and an iOS apps as well as the backend to be able to register device and receive push notifications.

We conducted a webinar titled “Backendless Core Concepts” for ex-Parses last week. A recording of the webinar is now available. The video should be helpful not only if you’re coming from Parse, but for anyone who is starting their journey with Backendless. The webinar reviewed the concepts of Backendless User and Data services. Specifically, we focused on:

  • user properties
  • setting up user relations
  • registering a user
  • registering a user with custom properties
  • configuring a data model
  • code-driven schema creation
  • data relations
  • a brief overview of Cloud Code

In my previous post I reviewed the user registration API. Now that you know how to use the registration API and have a registered user, the next step is to review the login functionality. The video below focuses on the apps’ login screen and the Backendless Login API.

In the video below I review the code for the User Registration screen of the RestaurantToGo sample app. Additionally, I discuss the usage of the Backendless Registration API. In the previous post and video, I reviewed the process of setting up the development environment for the application.

Find us in facebook