Best way to bundle ~55MB of audio with app - android

I have an app I am developing that needs to include about 55MB of audio (mp3s) these are short files and about 1000 in total. Bundling these in the apps assets makes the compiled apkabout 60MB.
I want to upload this app to the play store but of cause its to big as it it.
So my questions is, before I start working on using the APK Expansion File system is there anyway I could compress the audio files so the apk fits in under the 50MB limit?
The audios current bit rate is 128kbps

I guess Its better if you can make a player for stream the audio from the internet just like youtube does for their android application to play video files on android phone.
Additionally you can give option to the user to select save the audio for next time play without internet download.
I think this is a good question and +1 from me

Related

Android Exoplayer caching m3u8 audio for offline support

I am creating a music application.
I have used Exoplayer V2.8.0, So far I have achieved to play, pause next, prev, shuffle, repeat all songs using controls in-app and also with notification.
But all of this works only in online mode.
Now I want to add offline support to this app and allow a user to download the song offline and play while they are offline.
Audio files we are getting are *.m3u8 files.
But my problem is user should not access those downloaded files outside of my app. I have tried using one approach but it gives the mp3 files downloaded and combined from the different segments of the m3u8 file.
Can anyone guide me or give me sample or tutorial on how can I download the segments only and at the time of playing I can use that segment and play audio offline?
There is one suggestion for you,
If you want to create an offline player with .m3u8 or any other file then after download saves your file into your package folder with some of the different formats. Then while using that convert that specific formatted to mp3 or other which will help out for offline music play.
You can use a local http proxy server (NanoHttpd). Start the server and point your ExoPlayer to 127.0.0.1 so you can monitor the requests. Cache the m3u8 playlist plus the downloaded files for the first time you see a request. Next time when your proxy detects the same request, just play the files from cache.

Streaming Audio from server to Android App

I am kind of stuck on my app design and wondering, if some of you experts, could point me in the right direction.
I am working an Android App that shows how to pronounce different English words.
When user clicks on a play button next to a word, corresponding audio file (prerecorded wav file) is played with Android media player. I have 2000 words and corresponding wav files (each file is between 1 to 2 seconds).
But the problem is, I can’t pack all 2000 audio files into APP, as it will make APP too big. I am wondering, what is the best way of having the audio files on the server somewhere, and when user clicks play button next to a word, my APP plays from server. Are there any other ways of doing this?
Do I need streaming server for this (it’s not live stream), if so would you please let me know some that host? Can I use Heroku?
Thanks for help
Srini
You do not need a streaming server for that. A simple web pages server will do the job. Just put all your files in (maybe via ftp) to the server in a directory that you now exactly. From there, you can use the MediaPlayer class of android to play those sounds in streaming with the appropriate link to the file.

Protecting Assets in Cordova/Phonegap Application

I am working on a cordova android application which will display images and videos.I have the images and videos in the assets folder.I want to protect my resources.I don't want anyone to copy the resources.I have googled for the same and didn't get any proper solution.How to protect files in assets?
Is there any way to encrypt and store videos in assets folder and decrypt it during run time?
My video files will be maximum of 10 MB each file and there are 50 videos in the whole application.
You can definitely do this with DRM - it won't stop someone copying the video files, but as they are encrypted they will not be able to play them back without the correct key.
The process is roughly:
your content is encrypted before it is streamed or downloaded
when the user wants to playback the content the app must request a key for the content from owner of the content or the 'rights authority' (a service which handles keys for content)
The DRM system on the device will securely encrypt the content and play it back using the key it obtained. The video will not be stored in clear format at any point.
Native Android DRM is explained here:
http://developer.android.com/reference/android/drm/package-summary.html
To use this with cordova I think you will have to create a Native plugin - I could not see any cordova DRM API. Alternatively, if you are able to stream the content using the new MPEG DASH format, then you could use a HTML5 video player which supports DRM, such as BitDASH (https://www.dash-player.com).
You need to be aware that all DRM and encryption systems are really just hurdles that make it harder to copy content - at the end of the day if you have a very high quality display and a very high quality camera to record the display, then no DRM protection will save you.

Create protection scheme for android audio player

everyone!
Me and my team are developing some audio books that we will sell through our android application and our users will also listen them using the in-app mp3 player. We want to find a method (paid or free) to be able to protect our mp3's so the user cannot copy them and play with their own player.
I am aware that someone that is determined can crack anything, but our user targets are not computer geeks, but regular people that want a product that works and occasionally might try to cheat the system
Do you know any system that is easy to implement and can meet our objectives ?
Thank you in advance.
Do you know any system that is easy to implement and can meet our objectives ?
Stream the files from your server (e.g., using RTSP), or store them in internal storage on the device. Those will stop "regular people that want a product that works and occasionally might try to cheat the system" from being able to access MP3 files, which you can then play back using MediaPlayer within your own app ("in-app mp3 player").

Securing Video in android

Im presently working on an android application which will allow the user to download video and audio content from a server and play them on the phone of the end user.
What I'm trying to do is to secure the audio and video. The files should not be accessible to other applications and the user must not be able to take them off the device and use them.
This is a shot in the dark but can i do this by storing the videos in theSQLLite database as blobs.
And also is it possible to play the videos in android if they are stored as blobs.
I wouldn't use blobs, they are only performant if the binary-files are 256KB or less.
I guess the only way to make the videos secure so the user can't use them is to stream them down from you'r server and deleting the buffer when the Application closes.
On a rootet Device, you have access to every directory, so you can't save the videos on the SDcard or the Phone-Memory.

Categories

Resources