Notification Integration in Android
#
Implementationcaution
To use this library it is necessary to have the trust-service.json file with valid access credentials. In case you do not have it, follow the following link
See the actual version here.
#
CompatibilityFor api >= 26 you must set compatibility with java 1.8
#
Firebase messaging#
HolaTo receive any notification you must integrate firebase library
For more information about firebase integration see this
#
Initialize#
trust-service.json fileAll our services are protected by access tokens, which is why in order to generate a trust id or an notification it is necessary to add a .json file called trust-service inside the assets folder of your android studio project. In order to obtain this file it is necessary to send the following data of your application: bundle_id, app_name and redirect_uri (ex: bundle_id: //auth.id) these data must be sent to app@trust.lat
the structure of the trust-service.json file should be as follows
#
PermissionsFor the correct use of this library, it is necessary to grant the application overwriting permission
#
Request the permission#
Response of the permission#
Send a Firebase token#
Change then icon of notificationadd an image in res-> drawable folder with the follow name:
noti_logo_company
#
TimeIt is possible to configure an available schedule to receive and show notifications To configure a schedule is as follows:
In this example, a time range is being configured from 08:00 AM to 21:00 PM means that notifications will only be shown between that time range.
If a time is not set, notifications will be displayed without time restriction
#
Dialog Message#
Banner Message#
Video Message#
Notification Message#
Block MessageNote 1: All the notification should have a "type" property in the main object, this is for different notifications.
Note 2: The color of buttons cannot be empty and must be a HEX color.
Note 3: The URL action in buttons must be a valid URL or the app will crash.
Note 4: you can use HTTP protocol in URL of videos, but need use a "android:usesCleartextTraffic="true" label in the < application> tag inside of your manifest file.