download to Android app's assets directory

后端 未结 1 1598
礼貌的吻别
礼貌的吻别 2021-01-15 16:01

Is it possible to download files to an Android app\'s asset\'s directory?

I have some files under the app\'s assets directory that could potentially be updated at a

相关标签:
1条回答
  • 2021-01-15 16:40

    You cannot update assets. Full stop.

    What you can do instead is unpack assets to internal memory or SD card and update them there.. I do that more or less in my android-menu-navigator: http://code.google.com/p/android-menu-navigator where I have menu of the simple menu-navigation based application. I can use the menu either from assets:

    http://code.google.com/p/android-menu-navigator/source/browse/src/pl/polidea/navigator/retrievers/AssetMenuRetriever.java

    (the test menu is here: http://code.google.com/p/android-menu-navigator/source/browse/#hg%2Fassets%2Ftestmenu )

    or from downloaded menu:

    http://code.google.com/p/android-menu-navigator/source/browse/src/pl/polidea/navigator/retrievers/RemoteZipMenuRetriever.java

    Both are actually unpacking the menu and storing it on SD card.

    0 讨论(0)
提交回复
热议问题