Dropsource is an online platform for developing Android and iOS applications without coding. The platform also lets you download the source code for your app so you can make changes and subsequently publish into the app store (note: downloading the source code is a paid feature). If you’re looking to add support for push notifications to your Dropsource apps, Backendless fits right in with relatively simple integration. When you add Backendless push notifications, you can instantly benefit from the following features:
The video below includes a demonstration of an Android Dropsource app integrated with Backendless Push Notifications, followed by a detailed overview of the actual integration process. The integration instructions are outlined in detail in this post following the video.
Configuration on demand is not supported by the current version of the Android Gradle plugin since you are using Gradle version 4.6 or above. Suggestion: disable configuration on demand by setting org.gradle.configureondemand=false in your gradle.properties file or use a Gradle version less than 4.6.
Navigate to the Android Studio properties, select Build, Execution, Deployment, then Compiler. Disable the Configure on demand option:
implementation 'com.google.firebase:firebase-core:16.0.5' implementation 'com.google.firebase:firebase-messaging:17.3.4'
apply plugin: 'com.google.gms.google-services' com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
implementation 'com.backendless:backendless:5.2.2'
<service android:name="com.backendless.push.BackendlessFCMService"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service>
Backendless.initApp( Application.getContext(), "YOUR-BACKENDLESS-APPLICATION-ID", "YOUR-ANDROID-API-KEY");
The YOUR-BACKENDLESS-APPLICATION-ID and YOUR-ANDROID-API-KEY values can be obtained from the main dashboard of your app in Backendless Console.
String userToken = Application.getSharedPreferenceString( "userToken" ); HeadersManager.getInstance().addHeader( HeadersManager.HeadersEnum.USER_TOKEN_KEY, userToken );
List<String> channels = new ArrayList<String>(); channels.add( "dropsourcechannel" ); Backendless.Messaging.registerDevice(channels, new AsyncCallback<DeviceRegistrationResult>() { @Override public void handleResponse(DeviceRegistrationResult response) { Toast.makeText( Application.getContext(), "Device registered!", Toast.LENGTH_LONG).show(); } @Override public void handleFault(BackendlessFault fault) { Toast.makeText( Application.getContext(), "Error registering " + fault.getMessage(), Toast.LENGTH_LONG).show(); } });