V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
c0011
V2EX  ›  Android

小米推送为什么不做成苹果或华为那种?

  •  
  •   c0011 · 2019-09-18 14:37:49 +08:00 · 8434 次点击
    这是一个创建于 1654 天前的主题,其中的信息可能已经有所发展或是发生改变。

    苹果和华为都支持透传。

    现在给小米发推送,不点推送提示框而是直接点桌面上的图标。程序根本就不知道推送的是什么内容。

    小米能不能做个人了?

    27 条回复    2019-09-23 09:44:31 +08:00
    Counter
        1
    Counter  
       2019-09-18 16:32:53 +08:00
    请问最后那一句话是什么意思?
    kekeyu
        2
    kekeyu  
       2019-09-18 17:20:43 +08:00 via iPhone
    小白求教,透传是什么意思
    TuxcraFt
        3
    TuxcraFt  
       2019-09-18 17:40:16 +08:00
    说什么?阴阳怪气的
    leido
        4
    leido  
       2019-09-18 17:43:28 +08:00
    ?
    yukiww233
        5
    yukiww233  
       2019-09-18 17:43:40 +08:00
    不明所以
    kanata
        6
    kanata  
       2019-09-18 17:45:24 +08:00
    句句都听的懂,连在一起就不懂了。
    ochatokori
        7
    ochatokori  
       2019-09-18 17:49:29 +08:00 via Android
    现在给小米推送消息,(用户)不点(通知栏的)推送提示框打开程序而是直接点桌面上的图标打开程序的话,程序根本就不知道推送过什么内容

    猜的
    c0011
        8
    c0011  
    OP
       2019-09-18 17:52:05 +08:00
    @ochatokori 我说的不是这个意思吗?
    c0011
        9
    c0011  
    OP
       2019-09-18 17:53:29 +08:00
    @TuxcraFt 什么叫阴阳怪气???
    happyzed
        10
    happyzed  
       2019-09-18 18:00:21 +08:00
    这样设计不是很合理吗?让你感知到了推送内容你是不是就可以用来干别的了,苹果不是这样?
    yukiww233
        11
    yukiww233  
       2019-09-18 18:04:01 +08:00
    @c0011 #9 确实挺阴阳怪气的。
    还有,先问是不是,再问为什么
    asasas2114823
        12
    asasas2114823  
       2019-09-18 18:06:30 +08:00   ❤️ 2
    小米怎么做人啊,它只是一粒小米啊,就算是小米公司也做不了人啊,拟人化也太恐怖了吧
    fvckDaybyte2
        13
    fvckDaybyte2  
       2019-09-18 18:09:56 +08:00
    华为的透传是不是上滑杀死就无效了?
    BernieDu
        14
    BernieDu  
       2019-09-18 18:40:02 +08:00
    难道苹果点桌面图标能知道推送的是啥??还是说你没用过苹果?
    daozhihun
        15
    daozhihun  
       2019-09-18 19:25:07 +08:00
    什么乱七八糟的,不知所云
    glp664186796
        16
    glp664186796  
       2019-09-19 10:15:55 +08:00
    @ochatokori 我也是没看懂,看到你这里才了然了
    semiwhale
        17
    semiwhale  
       2019-09-19 11:11:13 +08:00
    iOS 除非应用在前台,或者用户点通知栏进入应用。否则 iOS 也拿不到推送内容。

    Let’s review the possible scenarios when the operating delivers a local notification or a remote notification for an application.

    The notification is delivered when the application isn’t running in the foreground. In this case, the system presents the notification, displaying an alert, badging an icon, perhaps playing a sound.

    As a result of the presented notification, the user taps the action button of the alert or taps (or clicks) the application icon. If the action button is tapped (on a device running iOS), the system launches the application and the application calls its delegate’s application:didFinishLaunchingWithOptions: method (if implemented); it passes in the notification payload (for remote notifications) or the local-notification object (for local notifications).

    If the application icon is tapped on a device running iOS, the application calls the same method, but furnishes no information about the notification.
    sunziren
        18
    sunziren  
       2019-09-19 11:16:24 +08:00
    看不懂,估计语文不及格
    shuizhengqi
        19
    shuizhengqi  
       2019-09-19 11:56:51 +08:00
    小米是个品牌啊,他要个人,估计要成精了
    c0011
        20
    c0011  
    OP
       2019-09-19 13:06:46 +08:00
    是这样的。服务期器通过推送给手机发送消息,比如消息是:"hello world"。
    流程是服务器先给推送平台(比如小米推送平台)发送推送,带上消息 "hello world",然后推送平台会在用户手机
    的最上方提示一个通知,通知内容就是"hello world"。现在问题来了,用户通过点击桌面上的图标进入软件,软件并不知道收到了推送消息"hello world"。所以就需要每次软件启动后立刻登录服务器,服务器内部记录一下之前给谁发过推送,然后等到这个人登录后,再重新把 "hello world" 发给客户端。

    并且服务器必须维护这个"hello world" 状态,非常麻烦。

    所以,如果手机客户端不管怎么启动都能知道之前的推送消息,那么服务器只管发推送就行。
    简便很多。
    xionger
        21
    xionger  
       2019-09-19 13:22:35 +08:00
    这这这在说什么
    c0011
        22
    c0011  
    OP
       2019-09-19 15:11:14 +08:00
    @xionger 是你看不懂还是我说的不明白?瞎起什么哄?
    zjlletian
        23
    zjlletian  
       2019-09-19 16:54:11 +08:00
    为啥要做成那种??推送了我想看自然从通知栏点进去了,不想看就不会点。你要直接启动 app 也能看得到的话,那就是 app 内消息,不是系统推送。
    c0011
        24
    c0011  
    OP
       2019-09-19 19:19:32 +08:00
    @zjlletian 不是直接启动 app 啊,现在的问题是桌面点击图标进入软件,软件根本就不知道有推送这回事啊
    HeiXiaoBai
        25
    HeiXiaoBai  
       2019-09-20 11:51:54 +08:00 via Android
    你是希望服务端通过通知将操作发给客户端执行吗?
    c0011
        26
    c0011  
    OP
       2019-09-20 11:56:58 +08:00
    @HeiXiaoBai 大概这个意思
    djs
        27
    djs  
       2019-09-23 09:44:31 +08:00
    @c0011 你都点进去了,那不是可以程序直接获取吗?还要这推送何用
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5041 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 09:37 · PVG 17:37 · LAX 02:37 · JFK 05:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.