Flutter app size increased due to too many audios - java

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.

Related

Running services 'Google Play Services' uses alot of RAM

I made a mediaplayer in Android Studio which uses a Service to control playback.
I compared the ram usage with a mp3 player from the store and i noticed most mediaplayers stay below 200mb memory usage.
Mine also stays below 200mb memory but for some reason sometimes 'Google Play Services' shows up in the process list almost exceeding 100mb.
(Settings-> Developer options -> Running services -> My App)
'Google Play Services' uses 97mb and i'm not sure why this shows up.
P.S
I'm using Admob banners in my app so maybe that's the cause? Because i read somewhere banner ads are memory eaters.

APK size is too big because of audio files

I'm working on my own Ebook application. My book has a total of 15 chapters, so I have a list with 15 elements - each one is a string with all the chapter's text.
I also have 15 .ogg files that I paid a voice over talent to record. The size of my final APK is almost 97MB, where about 90MB of them are a result of my audio files.
What can I do in order to reduce the APK to 25MB or less and yet give my users the option to listen to the narration?
You should look into Google Play Dynamic Delivery with the Android App Bundle.
This allows to split your Android app in modules, some of which you could download on-demand at runtime.
Effectively, this would allow you to download the .ogg only when the user needs them, or pre-load them if you can predict which ones are going to be listened to next (e.g. if they have an order).

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

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?

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.

Most suitable file format for playing audio files in smart phones

I have a web app(jsp/servlets) which allows users to download audio files and play in mobile phones.For targeting a large audience, I wish to develop a j2me app for normal smart phones. My audio files are voice recordings and may run for around 50 minutes. Therefore a very light weight audio files should be available for users to download and play in my mobile app.J2ME app may reach audio files through http(as most phones support http than rtsp).My questions are
1.What is the most suitable audio file format which will run in more smart mobile phones(Nokia,SonyErricsson,Motoroal etc) and most light weight for downloading? (As I know mp3 is good,but are more phones support for mp3?)
2. How I can encode big audio files in servlets(Open source Codecs and those encoded audio files must be play in j2me app:- Manager.createPlayer(url) easily, any sample code or sources please)
My aim is to allow users to download around 5mb files which may run around 50 minutes.I don't whether it is possible or not. if any one knows,please let me know answers for my problems.
The Manager class allows you to test if mp3 is supported in the device. Most recent JavaME devices do, but you should check anyway as the only audio format guaranteed to be supported is wav.
As for the best, in your case the best is the fastest to transfer, I guess. You should create the file with the minimum acceptable quality possible (e.g.: mono instead of stereo, low bitrate instead of high, etc). Since you are working with voice instead of music, you don't really need 44.1 kHz stereo CD quality.
EDIT:
However, I don't think you can stream audio in JavaME over HTTP. The Player.prefetch method will try to download the entire file before playing, and 50 MB is just too much for memory constrained devices like JavaME ones. You have to use RSTP if your device supports it; or use the DataSource version of the createPlayer method, and implement a DataSource to return a regular InputStream from an HTTP connection to your file.

Categories