vjnjc
V2EX  ›  Android

[android 开发] 求问怎么制作一个返回 application 的 notification

  •  
  •   vjnjc · Mar 16, 2017 · 12345 views
    This topic created in 3347 days ago, the information mentioned may be changed or developed.
    一直想实现一个这样的功能,点击 notification 回到程序最近一次打开的界面,就跟在手机桌面点击程序图标一样。

    要实现这样的功能的话,需要 build 一个返回 application 的 intent ,但常见的 intent 是打开某个 activity 或者是打开某个意图( share , browser, etc...),请问一下有没有一个 intent 能够返回 application 的吗?
    3 replies    2017-03-20 10:25:16 +08:00
    twoyuan
        2
    twoyuan  
       Mar 16, 2017
    一楼+1 ,创建一个和 Launcher 里入口图标相同的 intent 作为点击通知的 intent 就可以了
    vjnjc
        3
    vjnjc  
    OP
       Mar 20, 2017
    @xingda920813 多谢建议。 这个方法唯一不好的是会有界面切换的留白,其他应该都挺好用的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4256 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 153ms · UTC 10:11 · PVG 18:11 · LAX 03:11 · JFK 06:11
    ♥ Do have faith in what you're doing.