apk-expansion-files

Why does my “content://” URI return a null InputStream, even though I can read from the ZipResourceFile object?

ε祈祈猫儿з 提交于 2021-01-29 05:10:40
问题 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 stick to "getAPKExpansionZipFile()" But when I try to retrieve my files using the "content://" API, I am getting a null InputStream. (I need the URI to satisfy the APIs of media players.) This is for an Android app targeting API 26. In the past I was able to get the content provider working. But I've broken something.

Why does my “content://” URI return a null InputStream, even though I can read from the ZipResourceFile object?

只谈情不闲聊 提交于 2021-01-29 05:10:19
问题 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 stick to "getAPKExpansionZipFile()" But when I try to retrieve my files using the "content://" API, I am getting a null InputStream. (I need the URI to satisfy the APIs of media players.) This is for an Android app targeting API 26. In the past I was able to get the content provider working. But I've broken something.

Loading SoundPool with audio from APK Expansion file

久未见 提交于 2020-01-25 03:46:15
问题 In the documentation it says: If you're using your expansion files to store media files, a ZIP file still allows you to use Android media playback calls that provide offset and length controls (such as MediaPlayer.setDataSource() and SoundPool.load()). I have 10 small .ogg files and I want to use SoundPool.load (FileDescriptor fd, long offset, long length, int priority) to load these audio files. I've written some code, but when I run it I get error message: "Unable to load sample: (null)" ,

Accessing to files inside obb expansion file

徘徊边缘 提交于 2020-01-20 02:25:37
问题 I'm following all official expansion files guides, but i can't find it. I'm unable to access the contained obb file i need. I need 6 audio files (80Mb) that i "stored" (uncompressed) in a zip file and renamed as 'main.2001.test.expansion.proj.obb' and stored in '/mnt/sdcard/Android/obb/test.expansion.proj/' I'll try to access to the files String mainFileName = Helpers.getExpansionAPKFileName(this,true,2001); if(!Helpers.doesFileExist(this, mainFileName, 27959282L, false)) { //download } else

can mount unencrypted obb but with encrypted error 21

倾然丶 夕夏残阳落幕 提交于 2020-01-13 18:40:32
问题 This is not related with kitkat bug, i'm testing in 4.4.2 I can mount without problems the obb file, the problem is when try to do the same with encrypted obb. I'm using jobb in windows like this: jobb -d my_folder -o exp.obb -k pwd -pn com.example.name -pv 1 The only thing i changed to load encrypted obb file is this: stgMgr.mountObb(mObbPath, null, new mOnObbStateChangeListener) stgMgr.mountObb(mObbPath, pwd, new mOnObbStateChangeListener) it's not a permissions problem. So, why i cant

Android expansion file

半腔热情 提交于 2020-01-11 03:30:32
问题 I am trying to do an application which contain ~80mo of PNG (It's an offline app so I have to store them on the phone). The application works perfectly in local but I can't upload an apk > 50mo. So I am trying to implement an expansion file which will contain all my PNGs. So I use this simple command on Linux: _zip_ -0 _main.1.com.ctai.irisst.zip_ *_.png_ on my /res/drawable-mdpi to create my expansion file and then put it manually to /Android/data/com.ctai.irisst/ Then, I use this code to

Expansion file download sample not showing full progress

家住魔仙堡 提交于 2020-01-01 19:52:08
问题 Currently I am preparing a demo for including Expansion File into a developed project. I have followed this Tutorial. After a lot of struggle I am able to run the demo application but having issues in displaying progress for downloaded data. I have uploaded obb file on play store which is 1,060,024 bytes and on disk size is 1,060,864 bytes . following is code snippet where I think problem can be. private static final XAPKFile[] xAPKS = { new XAPKFile(true,6,1060024L) }; void

OBB file are not Extract Error is “XAPK file Validation Failed”

我怕爱的太早我们不能终老 提交于 2020-01-01 19:12:32
问题 I implemented apk expansion successfully and OBB file downloaded at Storage->Android->Obb->PackageName->main.1.com.packagename.obb But when i go to extract i am getting issue is "Not a Zip archive". ZipResourceFile zrf = new ZipResourceFile(fileName); public ZipResourceFile(String zipFileName) throws IOException { addPatchFile(zipFileName); } void addPatchFile(String zipFileName) throws IOException { File file = new File(zipFileName); RandomAccessFile f = new RandomAccessFile(file, "r"); long

App Expansion download not working

回眸只為那壹抹淺笑 提交于 2019-12-24 21:24:00
问题 I have an apk with an extension file. I am using the OBB zipped file as is. I succeeded to upload it to google play, and when downloading, the extension file is downloaded automatically. automatic download is working fine. The OBB manual download is not working at all. I followed google developer page to import downloader_library & zip_file & also license_library. https://developer.android.com/google/play/expansion-files.html My steps: 1-Import modules : downloader library, zip_file and

Where to upload Expansion File on market?

我的梦境 提交于 2019-12-24 13:19:56
问题 I have created expansion file with "main.1.packagename.obb" name after searching on the internet. But I can not find any option on developer account to upload that file. If anyone can show me screenshot of market that where to upload that file or how to thats appreciated. I can only find this in my account. Can you please send me any link or screenshot where it actually shows how to upload. Here is the screen which shows after upload, where is the link to upload expansion file?? 回答1: I have