GithubHelp home page GithubHelp logo

Comments (5)

Mike-mei avatar Mike-mei commented on July 20, 2024

一般级别的消息没有横幅、声音和状态栏显示,可以参考此文档是服务端对推送消息智能分类的,跟demo没关系

from hms-push-serverdemo-csharp.

charzhao avatar charzhao commented on July 20, 2024

一般级别的消息没有横幅、声音和状态栏显示,可以参考此文档是服务端对推送消息智能分类的,跟demo没关系

根据文档,我需要设置消息为非常重要则可以:

  1. 在状态栏显示

  2. 锁屏通知

  3. 响铃

  4. 震动
    我修改代码如下(Importance=NotificationImportance.HIGH),任然是静默的收到消息,没有任何响铃,震动和锁屏通知,状态栏显示。:
    public async Task SendAndroidMessage()
    {
    await AGConnectMessaging.DefaultInstance.SendAsync(new Message()
    {
    Android = new AndroidConfig()
    {
    FastAppTarget = FastAppTarget.Production,
    Category = "PLAY_VOICE",
    Urgency =UrgencyPriority.HIGH,
    Notification = new AndroidNotification()
    {
    Title = "1",
    Body = "*******Hello world! from char3",
    Importance=NotificationImportance.HIGH,
    ClickAction = ClickAction.OpenApp()
    }
    },
    Token = new List() { TOKEN_ANDROID }

        });
    

问题:
1 在我们的SDK里,该如何设置消息为非常重要?
2. 按照文档,设置非常重要也不能显示横幅,请问如何设置可以显示横幅?

from hms-push-serverdemo-csharp.

Mike-mei avatar Mike-mei commented on July 20, 2024

message.android.notification.importance字段级别与智能分类计算出的级别共同决定,两者取低。智能分类的级别是根据应用类型和发送消息的内容来计算的,没有参数可以配置。

from hms-push-serverdemo-csharp.

charzhao avatar charzhao commented on July 20, 2024

message.android.notification.importance字段级别与智能分类计算出的级别共同决定,两者取低。智能分类的级别是根据应用类型和发送消息的内容来计算的,没有参数可以配置。

这样的话,是说我们的官方提供的测试页面为什么发出的消息可以有 横幅、声音和状态栏显示。 和发送源有关系吗?

from hms-push-serverdemo-csharp.

Mike-mei avatar Mike-mei commented on July 20, 2024

请用控制台发送消息,并提供手机端带有横幅状态栏的截图

from hms-push-serverdemo-csharp.

Related Issues (3)

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.