GithubHelp home page GithubHelp logo

Comments (8)

pushy avatar pushy commented on August 23, 2024

Hi @callmejm.
We'd be glad to assist.

Is your icon showing up in greyscale, or simply a grey box? Please see this for a solution:
https://clevertap.com/blog/fixing-notification-icon-for-android-lollipop-and-above/

from pushy-flutter.

callmejm avatar callmejm commented on August 23, 2024

from pushy-flutter.

pushy avatar pushy commented on August 23, 2024

Hi @callmejm,
Basically, that's happening because your notification icon is not transparent.

Please read the article again as it explains this very clearly:
https://clevertap.com/blog/fixing-notification-icon-for-android-lollipop-and-above/

You must modify your notification icon to be fully transparent, with the visible logo in white pixels.

The Android system ignores all non-alpha channels in action icons and in the main notification icon. You should assume that these icons will be alpha-only. The system draws notification icons in white and action icons in dark gray.

from pushy-flutter.

callmejm avatar callmejm commented on August 23, 2024

from pushy-flutter.

pushy avatar pushy commented on August 23, 2024

Hi @callmejm,

  1. For in-app iOS 10+ notification banners, please also add this method override to your AppDelegate.swift :
    // Display in-app notification banners (iOS 10+) and invoke notification handler
    @available(iOS 10.0, *)
   func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
        // Call the notification handler, if defined
        Pushy.shared?.notificationHandler?(notification.request.content.userInfo, {(UIBackgroundFetchResult) in})
        
        // Show in-app banner (no sound or badge)
        completionHandler([.alert])
    }
  1. Import the Pushy iOS SDK and UserNotifications by adding the following to the top of AppDelegate.swift:
import Pushy
import UserNotifications
  1. Your AppDelegate class will need to inherit UNUserNotificationCenterDelegate.

from pushy-flutter.

callmejm avatar callmejm commented on August 23, 2024

@pushy-me the grey out issue still exist, I already follow the instructions to generate the icon, but the icon still grey box. I have put icon into all mipmap folder and named ic_notification

from pushy-flutter.

callmejm avatar callmejm commented on August 23, 2024

Hi @callmejm,

  1. For in-app iOS 10+ notification banners, please also add this method override to your AppDelegate.swift :
    // Display in-app notification banners (iOS 10+) and invoke notification handler
    @available(iOS 10.0, *)
   func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
        // Call the notification handler, if defined
        Pushy.shared?.notificationHandler?(notification.request.content.userInfo, {(UIBackgroundFetchResult) in})
        
        // Show in-app banner (no sound or badge)
        completionHandler([.alert])
    }
  1. Import the Pushy iOS SDK and UserNotifications by adding the following to the top of AppDelegate.swift:
import Pushy
import UserNotifications
  1. Your AppDelegate class will need to inherit UNUserNotificationCenterDelegate.

cant import Pushy , getting No such module 'Pushy'

from pushy-flutter.

pushy avatar pushy commented on August 23, 2024

Hi @callmejm,
In Objective-C (Flutter iOS), please import Pushy as follows:

@import Pushy

Please let us know if it works.

from pushy-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.