V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
paparika
V2EX  ›  Android

如何高效实现本地目录与文件的扫描

  •  
  •   paparika · Jul 12, 2017 · 13224 views
    This topic created in 3223 days ago, the information mentioned may be changed or developed.
    像 es 文件浏览器,网易云云音乐扫描归类本地文件体验都比较不错,好奇是怎么做到的。
    目前能想到的是利用多线程,native code 加快速度,如果 v 友有具体实现推荐就更好了。
    另外就是像 MX 播放器等软件,一旦有新的视频拷贝到手机,马上就在主界面目录出现了,这个是怎么做到的?
    3 replies    2017-07-12 16:42:02 +08:00
    XiaoFaye
        1
    XiaoFaye  
       Jul 12, 2017
    C++直接调用系统级 API ?
    paparika
        2
    paparika  
    OP
       Jul 12, 2017
    @XiaoFaye c/c++ 调 linux 的 file 相关接口吧
    yttyhf2006
        3
    yttyhf2006  
       Jul 12, 2017
    keyword: Android MediaProvider
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1386 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 17:15 · PVG 01:15 · LAX 10:15 · JFK 13:15
    ♥ Do have faith in what you're doing.