OneSignal / OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
https://www.onesignal.com
Other
606 stars 204 forks source link

[question]: Push Notifications does'nt open app after dynamic icon change at android #885

Open mberktas opened 1 month ago

mberktas commented 1 month ago

How can we help?

Hi,

I have an application with dynamic icon changing feature.

Push notifications open the app before the dynamic icon changes. However, after changing the dynamic icon, the app does not open on Android. There is no problem on iOS.

I use _flutter_dynamic_iconplus for dynamic icon replacement.

Do you have any information about what may cause this problem?

Packages onesignal_flutter: ^5.1.6 flutter_dynamic_icon_plus: ^1.2.1

Version Flutter 3.19.6

Android Manifest

<activity android:name=".MainActivity" android:exported="true" android:enabled="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
  <!-- Specifies an Android theme to apply to this Activity as soon as
             the Android process has started. This theme is visible to the user
             while the Flutter UI initializes. After that, this theme continues
             to determine the Window background behind the Flutter UI. -->
  <meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme"/>
  <intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
  </intent-filter>
</activity>

  <service
          android:name="com.solusibejo.flutter_dynamic_icon_plus.FlutterDynamicIconPlusService"
          android:stopWithTask="false"/>

<meta-data android:name="flutterEmbedding" android:value="2"/>

<activity-alias
    android:label="@string/app_name"
    android:icon="@mipmap/ic_birthday"
    android:roundIcon="@mipmap/ic_birthday"
    android:name=".birthday"
    android:exported="true"
    android:enabled="false"
    android:targetActivity="${applicationId}.MainActivity">

    <meta-data
        android:name="io.flutter.embedding.android.NormalTheme"
        android:resource="@style/NormalTheme"
        />

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

</activity-alias>

<activity-alias
    android:label="@string/app_name"
    android:icon="@mipmap/ic_mourning"
    android:roundIcon="@mipmap/ic_mourning"
    android:name=".mourning"
    android:exported="true"
    android:enabled="false"
    android:targetActivity="${applicationId}.MainActivity">

    <meta-data
        android:name="io.flutter.embedding.android.NormalTheme"
        android:resource="@style/NormalTheme"
        />

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

</activity-alias>

<activity-alias
    android:label="@string/app_name"
    android:icon="@mipmap/ic_year"
    android:roundIcon="@mipmap/ic_year"
    android:name=".year"
    android:exported="true"
    android:enabled="false"
    android:targetActivity="${applicationId}.MainActivity">

    <meta-data
        android:name="io.flutter.embedding.android.NormalTheme"
        android:resource="@style/NormalTheme"
        />

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

</activity-alias>

<activity-alias
    android:label="@string/app_name"
    android:icon="@mipmap/ic_remembrance"
    android:roundIcon="@mipmap/ic_remembrance"
    android:name=".remembrance"
    android:exported="true"
    android:enabled="false"
    android:targetActivity="${applicationId}.MainActivity">

    <meta-data
        android:name="io.flutter.embedding.android.NormalTheme"
        android:resource="@style/NormalTheme"
        />

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

</activity-alias>

Code of Conduct

emawby commented 1 month ago

Hello I see you have also reported to the icon updater library as well here. Are you still experiencing the issue?

mberktas commented 1 month ago

@emawby Yes, the issue is still occurring.

furkay commented 1 week ago

Is there any progress?