Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
プログラムで音楽キャッシュを消去する必要があります。1 つの方法は、com.htc.music などのアプリケーションのコンテキストを取得し、次に getCacheDir を取得して削除することですが、その方法はわかりません。2 番目のオプションは、ファイル変数をパス data/data/com.htc.music/cache にマップし、サブディレクトリを削除することですが、うまくいきません。あなたはなにか考えはありますか?
データをアプリケーションデータに保存していますか?その場合は、アクティビティで削除できます。YourActivity.this.deleteFile(filename);