Closed GopalAdappt closed 3 years ago
This is a feature we already resolved in https://github.com/flurry/react-native-flurry-sdk/issues/7.
When you initialize Flurry Messaging, you can specify your FlurryMarketingOptions
.
Inside your FlurryMarketingOptions
, you can define your notification icon there.
Please check our README,
.withMessaging(true, options_or_listener) // optional user's native `FlurryMarketingOptions` or `FlurryMessagingListener`.
I.e.,
build.gradle
:
implementation 'com.flurry.android:marketing:12.9.0'
FlurryMarketingOptions
in your MainApplication
:
import com.flurry.android.marketing.FlurryMarketingOptions;
FlurryMarketingOptions
with the icon you want to show:
FlurryMarketingOptions messagingOptions = new FlurryMarketingOptions.Builder()
.setupMessagingWithAutoIntegration()
.withDefaultNotificationIconResourceId(R.mipmap.ic_launcher_round) // your icon here.
// Define more if needed
// .withDefaultNotificationChannelId(NOTIFICATION_CHANNEL_ID)
// .withDefaultNotificationIconAccentColor(getResources().getColor(R.color.colorPrimary))
// .withFlurryMessagingListener(messagingListener)
.build();
new FlurryModule.Builder()
.withLogEnabled(true)
.withLogLevel(Log.VERBOSE)
.withMessaging(true, messagingOptions)
.build(this, YOUR_APK_KEY);
If the above approach does not resolve your issue, means your Android icon resource is not available for the specific devices.
I.e., your Android resources probably does not give a general definition of this icon.
All of the approach are pure Android codes. Please check your icon Android resources.
@GopalAdappt Do you resolve your app icon issue by checking the icon resources? Thanks!
Close it as the complete steps to set Messaging is described in the React Native Tutorial. https://github.com/flurry/React-Native-Tutorial#users-native-flurry-push-options-or-listener
We are facing some issues in Android regarding receiving notification icon is in Grey box to a specific device module as mentioned below.
package.json “react": "16.8.3", "react-native": "0.59.10", "react-native-flurry-sdk": "^6.0.9"
Devices
Lenovo Model: A7010a48 OS: 6
Redmi Model: RedmiNote 5 Pro OS: 9