Why Does My "content://" Uri Return A Null Inputstream, Even Though I Can Read From The Zipresourcefile Object?
I'm setting up Google's APEZProvider to read .PNGs (compressed) and .MP3s (not compressed) from an APK Expansion zip file. File retrieval works just fine if I avoid the URI, and s
Solution 1:
Answer : I needed to change my ZIP file so that it was built with no compression, using
zip -Z store
A big clue was when I realized that Android could get an input stream from the compressed .PNG, but not asset file descriptor.
The documentation hints at this requirement but the truth is a bit elusive. I mistakenly interpretated its advice to mean that you only need to avoid compression when dealing with playback media with offsets and duration, like songs and movies. But it turns out that compression can interfere with retrieving graphics files, too.
Post a Comment for "Why Does My "content://" Uri Return A Null Inputstream, Even Though I Can Read From The Zipresourcefile Object?"