Support Topics Documentation Slack YouTube Blog

Push Notification Setup for Android boilerplate code

Task: Register device for push notifications

I’m running into a problem with the registerDevice method call. The boilerplate code referenced in the support article (Push Notification Setup (Android) - Backendless SDK for Android/Java API Documentation) passes an array of strings (well…one string) as the first argument… but I think the method expects a string, no? I’m working in a Kotlin project, so it auto-converted code from the java example, but it’s complaining about the channel reference and the async callback. Screenshot: Dropbox - Screen Shot 2021-03-07 at 12.23.57 PM.png - Simplify your life

I figured this out. The culprit was an old reference to the Backendless SDK version referenced in Client-side Setup - Backendless SDK for Android/Java API Documentation.

This line:

implementation group: 'com.backendless', name: 'backendless', version: '5.0.+'

Should instead read:

implementation group: 'com.backendless', name: 'backendless', version: '6.2.1'

Or whatever the latest version is. Specifically to use the boilerplate code, it looks like it need at least a 6.x version.