qw30716
V2EX  ›  Android

Android 在内部存储不足的时候是否有方法可以监听到?

  •  
  •   qw30716 · Jul 1, 2019 · 13910 views
    This topic created in 2709 days ago, the information mentioned may be changed or developed.

    想监听 Android 内部存储大小变化,不知道有没有对应 api 或者方法

    5 replies  •  2019-07-02 09:36:30 +08:00
    nicevar
    nicevar
    Jul 1, 2019
    1
    这还要什么监听, 自己检测剩余可用空间就行了
    yukiww233
    yukiww233
    Jul 1, 2019
    2
    Intent.ACTION_DEVICE_STORAGE_LOW
    qw30716
    qw30716
    OP
    Jul 2, 2019
    3
    @nicevar 我是想在磁盘满的时候,给用户一个提示
    qw30716
    qw30716
    OP
    Jul 2, 2019
    4
    @yukiww233 这个好像 Android O 后不能收到了吧
    shucc
    shucc
    Jul 2, 2019
    5
    如果广播监听不了了,可以自己后台跑个定时查询下吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2325 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 13:48 · PVG 21:48 · LAX 05:48 · JFK 08:48
    ♥ Do have faith in what you're doing.