I just built an app for Android using Unity3D. The app weighs 200mb. During testing I used to build a single apk which always worked. Now that I uploaded it on PlayStore, I had to use Unity's built in split feature which creates an apk and an obb file.
My problem is that now the app isn't working. It seems like the obb file isn't being loaded properly and the app doesn't find the files.
I have some assets in StreamingAssets folder which are loaded dynamically and the app doesn't seem to be able to find these along with the other scenes.
What I did to try to fix this with no success:
Added READ_EXTERNAL_STORAGE permissions
Added WRITE_EXTERNAL_STORAGE permissions
Added a plugin to force permissions dialog Unity Android Permissions
Set to false unityplayer.SkipPermissionsDialog in the android manifest
Added GooglePlayObbDownloader in my project but it seems to crash the app because of the missing License. (I can't retrieve the license)
What am I doing wrong?
I had a working app, then I enabled Split Application Binary in Player Settings > Publishing Settings and it stopped working. Disabling the feature, the app works but can't upload it on Google Play as it has a 100MB file limit.
You mentioned using UniWebView. The documentation recommends placing your web files in the Assets/Plugins/Android/assets/ folder.
If you are using "Split Application Binary" for Android build (obb files), you should not put your local HTML files under StreamingAssets folder. Instead, you need to put them to Assets/Plugins/Android/assets/ and then you can use the same way as you did for normal streaming assets resource to load it from the new location.
https://docs.uniwebview.com/guide/loading-local-files.html#using-split-application-binary.
Unfortunately this will simply move the files from the .obb to the .apk file, which might push you over the 100mb limit again.
Related
I have a question about the file accessing process from the asset folder of android which uses play asset delivery. I have done setup with the play asset delivery for deploying my android application as the size of the app is more than 150Mb.
I followed the google documentation for setting up the play asset delivery module - install_time_asset pack module and moved my asset files to the file structure given below:
Below is the code structure I followed for accessing the files.
Earlier I was not able to access the file in the install_time_asset_pack assets- install_time1.txt so I change the setting from edit configuration to run app from bundle instead of the APK.
From this setting, I am able to access the asset folder files from both main assets and install pack assets.
Now I published the app to Google play console internal testing module for closed testing and downloaded the application from the play store application but during testing that application, I was not able to access the files from assets, what could be the possible reasons for that misbehavior?
I found the answer to this question as I was optimizing the apk size I have added the minifyEnabled true which is causing the problem at runtime as it removes a few object classes to reduce the apk size.
After removing this flag, the downloaded apk is running fine now.
My app is developed in react-native and the third party app provider are charging to implement the code for deep-linking.Though they have shared the .APK file with me.Through some videos & google search,I have learned that I will be able to do it by myself.I want to add deep-linking code in the AndroidManifest.xml file but how to open .apk in Android Studio and how to generate .apk file again once the changes are complete after testing on virtual device.
If you think that there will be issues by approaching through .APK file or its not the best way/standard process to achieve this ,then,please suggest me that what I need to ask them to share with me so that it can be imported in Android Studio without any issues and I can do some coding & test it and again generate .apk file to upload it on Google Play Store.
I'm pretty sure you will not be able to do that, you will have to access the source code to do the changes.
I'm trying to find a way to create an apk file to extract files to certain path while installing to use these files in my main app.
In other words I need to add expansion files to my main app by installing another apk that won't be displayed in the launcher.
And play store expansion files is not an option.
What you need is an Expansion file configured as a patch.
This question has some info about it, but you should go to the official documentation about how to download an expansion file after installing your main application.
I read this Steps to create APK expansion file,
run SampleDownloaderActivity and get: "Download failed because the resources could not be found"
How to create a Test Project (simple project >50MB with big pics) and then upload it on Google Play and testing APK Expansion Files?
This is rather late, but I'm currently doing it this way...
I'm following these instructions found here:
https://support.google.com/googleplay/android-developer/answer/2481797?hl=en
There is a lot more information here: http://developer.android.com/google/play/expansion-files.html
You will have to upload the APK and publish the application to test the expansion files.
Use the ALPHA option so that the application is not visible to everyone.
After the application is published you can test your expansion file correctly. If you are planning a paid application, instead of paying just upload your APK from Eclipse or Android Studio directly.
As for your error. You will have to make sure you "publish" and that the application is visible in the play store before you will have access to the expansion files for testing.
I have also read in many other posts that you may test expansion files while in draft mode.
This is now FALSE. explained here https://support.google.com/googleplay/android-developer/answer/6062777?hl=en
Each and every android application is bundled as an apk file. When an apk file is installed different entites (files) of the application are stored in different parts of the system. For example i have found that real player stores its files in the following places of the android file system
/data/data/com.real.RealPlayer
/data/app/com.real.RealPlayer-1.apk
/data/dalvik-cache/data#app#com.real.RealPlayer-1.apk#classes.dex
/data/system/packages.list
/data/system/packages.xml
/data/data/com.sec.android.app.twlauncher/databases/launcher.db
How can i do this for every installed application on my phone/emulator?? Is it the right way to parse apk file and find the places where all the parts of the app are stored?? Any ideas?
On normal non-rooted phones an application can see only its own files, due to security restrictions.