Where do I add large amounts of resources to android project? - java

I am making my first app for android on android studio
I have to include a bunch of Gifs with my app to be displayed at different times
Gifs are total 500mb at the moment and I am going to have to add more soon, so there will be over 1 gig of gifs
At the moment i have dumped all my gifs into the res/drawable folder and i access them using R.id.gifname and display them in a gifImageView.
When i generate a signed APK with android studio the APK size is around 500mb which I've looked up and seen is far too large for google play
My question is whether or not I am taking the right approach to storing all this data in my application and whether or not an uploaded bundle will separate data in the res folder from the code in the APK. Is my approach alright or should I be placing all my gifs somewhere else in android studio?

Related

Flutter app size increased due to too many audios

I am working on a Flutter application and I have more than 100 sounds that users can play for educational purposes.
I am not using any server or Firebase. Every audio is almost 1 MB. With that assets folder size will be more than 100 and app size will increase too.
Can I store all the audio in the SQLite Database? Is there any other way?
You can compress your audio files using the flutter_sound package, it'll help you to decrease the size of your audio files, and don't forget to run flutter clean before compiling your app, unless your app size will be more than that size that you expect to be.

Where should I store images for my android app? How to store and retrieve those images?

The app is an online app. And the size of my app (.apk) is already over 85mb. I want to store the images I am using on "some" server, instead of drawable folder. The problem is I don't know the particular server, and how do I store and retrieve the those images?
The app is written in java language.
It's an app to locate charging station for electric vehicle.
So, please give me some "servers" on which I can store images, and use them as and when reguired.

How to save Images and Videos in Android 11?

I am creating an app that will save images and videos in a separate folder. If folder exists it will save in that if not exist, then it will create one and save the images & videos.
It can be done in android 10 and below, but I cannot do so in Android 11.
I am new in development, so any help would be appreciated.

Android Studio: How to download expansion files and upload to Google play

My app is finished and ready to upload! The problem is it's 432Mb. Google play says my app can't be over 100Mb and I should use an expansion file. I have a general idea of what that is, but feel free to break it down. What I need from you is steps on how to get my expansion files and upload it with my APK to Google play. I'm working with 5 mp3 files at 83MB each.

How can I open an image saved within the app with the android gallery?

I have a little problem with an app I'm designing. I need to be able to open a high-res image (stored in the assets folder of the project), with the android gallery. I have tried many things, like put it in the drawables folder and retrieving the Uri (which gives Out of Memory error). I need to be able to have that high-res image without any type of compression because the user will need to zoom in a lot.
Any idea is welcome, thank you everyone in advance!
You have to copy your image from assets folder to external memory for the Gallery app being able to display it.
The android application is have a strict restriction of using dynamic memory, it is 16 mb. So if image is larger then at least 15mb trying to load it into memory will undoubtedly encouner with OutOfMemory error.
Use this library https://github.com/davemorrissey/subsampling-scale-image-view , which is designed, as it seems, exactely for your needs. As follows from description, the main concept is to load large images partially, just a part for current displaing.

Categories