For the complete documentation index, see llms.txt. This page is also available as Markdown.

Android Push Message Integration

1

Connect Firebase Project

To use push messages in an Android app, you need to configure the integration between the Hackle Workspace and a Firebase project.

For details, refer to Android FCM Integration.

2

Integrate Firebase Cloud Messaging SDK

Complete the Android app setup by following the Firebase SDK Integration Guide and the Firebase Cloud Messaging Installation Guide.

3

Integrate with Hackle SDK

Add the Hackle SDK dependency and initialize the SDK by following the SDK Integration guide.

The push token is automatically registered when the app launches.

Once the SDK integration is complete, push tokens are automatically collected and push message reception and click handling become available.

4

Test Push Message

Check Token

Send Test

5

Receive Push Message

When a push message is received, an icon is displayed in the status bar and notification center.

  • On Samsung Galaxy Android smartphones, the app icon is displayed.

  • On standard Android smartphones or simulators, a white circle icon is displayed.

  • If you have configured a push message icon change, the changed icon is displayed.

Hackle push messages support deep link navigation when tapped.

When the corresponding activity is opened via a push message, you can retrieve the deep link information using the method below.

For more details about Flutter deep links, refer to the Flutter Deep Linking Guide.

Change Push Message Icon

This feature is supported in Flutter SDK 2.22.0 and above.

Hackle push messages support changing the push icon. By assigning a resource to a reserved key in AndroidManifest.xml, you can change the push icon using local resources within the app.

Image and color resources to be used for the push icon must be added to Android Resources.

For details about small_icon, large_icon, and color, refer to the Android Push Design Guide.

key
Description

io_hackle_android_default_notification_small_icon

Sets the small icon.

io_hackle_android_default_notification_large_icon

Sets the large icon.

io_hackle_android_default_notification_color

Sets the small icon background color.

Example

Modify Push Message Icon from Dashboard

If a push icon is configured in the Dashboard, it modifies the large icon of the push.

If a push icon is set using local resources and a push icon is also sent from the Dashboard, the icon configured in the Dashboard is used.

Push Channel Support

This feature is supported in Flutter SDK 2.23.0 and above.

With Hackle push messages, you can receive pushes on channels pre-declared within the app. If a push is received with a channel ID that does not exist in the app, it is received on the default channel provided by Hackle.

For detailed instructions on adding push channels to your app, refer to the Android Developer Documentation.

If you want to show a notification popup when a push is received, as on iOS, set the channel importance to IMPORTANCE_HIGH.

Example

The following is an example of creating a channel in the onCreate function of the MainActivity class.

Last updated