I am newish to Android, so please be patient with me! I am building an application in which I need to be able to allow users to record audio and take photographs in order to add entries to the app - entries will consist of multiple audio files and a single image. I need to be able to allow the user to select an entry so that they will be able to view the image and play the audio files.
What would the best way to go about this be? Should I look into storing the image and audio related to that image in a database, or is there a better way of doing this? Any advice/resources would be appreciated!
Thanks,
Daniel
You should store the audio and photos to sd-card as it is designed to save larger files. But if you want to group these audios and images, you can use database for it. Create a simple table which holds entry_id(Group id) with type(Audio,image), name and their file_path on sd-card. In this way you can keep track of your audio and images which are grouped to-gether.
Related
I'm not good at English, so I'm sorry if there are any mistakes in the expression.
I want to Object detection application on Android.
Here is how the app works:
Take some videos for which you want to perform object detection
Select a video from the taken videos
Detect specify object and get that coodinates
To develop avobe app,I have some videos for vertification.
Here is my question. Which folder should I put the vertification videos?
For now, I put the videos in raw folder.
But,I am creating an app assuming that the videos were taken with a camera. If so, should it be in the same place as if it were taken by the camera? and, which folder should the videos be placed in?
I'm new to android development.
Could anyone give me some advice? Thank you.
As you are new to Android development I am going to explain in detail.
First you have the videos for verification. You should put those videos in raw folder. But what if the size of those videos is too large? That means the size of your APK will also increase which is not a good thing if you want to upload your app on google play store. In this case, you can store those videos on your own server, and when user installs your app download those videos from the server.
Now let's come to the second question: Where should I put the videos taken with the camera?
You can put these videos in any of the following paths.
context.getFilesDir();
or
context.getExternalFilesDir(null);
These paths are on which you can store the camera-shooted videos and do any processing on them. If you want to know the difference between these two paths that's another topic. You can learn about them here.
I am developing a digital media app using Google's flutter framework which contains songs, movies and etc. The main focus is, these media content should be accessible only through the app and not by outside methods (eg: media players, file browsers).
Eg: A music file which was downloaded through the app should only be played within the app and not by any media player. In that case, there should be an encryption method which should be used to lock these files from outside world.
In this case, bigger files such as Movies should also be taken into consideration. The size of a file can be anywhere between few kbs to 2-3 GBs.
What should be the better approach when solving this problem?
Is it to
Store everything in a database after encrypting the bytes?
Encrypt the entire file and still keep them in the form of "file"?
The downloaded data should also be able to be consumed quickly once the user requested for it. And once the consume is done, the file should be locked again from the rest of the world.
I am not sure if this topic is too broad but somehow I would appreciate it if anyone could provide me with something to start off.
Thank you.
I want to get list of audio files from server that includes title, artist, album and cover art of that files and play audio file when user click on it in that list.
On the server we have a folder in the form of directory browsing.
enter image description here
In the music folder I want to show folders in form of folder and I want to play audios by choosing. If necessary, we can change the server because our team has prepared it.
Can anyone help me?
First of all, do you have your own server or service where you are going to make that call from or are you in search of a public server with these details? If public, I would suggest going over to www.programmableweb.com and search for Music API.
Once you found it, I would suggest looking at Retrofit as this can be used in android to retrieve data from an API easily.
I have lots of images and video, so I cannot store in internal storage.
I want to store it in external storage and I don't want to show this images and video to user. It can not be copy when it connected to USB.
I already tried to encrypt a video and images, but it takes to much time to decrypt a video and it is not played directly. This solution is told by so many people on stack overflow but it is not feasible for me.
I tried this solution,
so please give me the another solution if it is possible.
Thanks in advance.
Include an empty file named .nomedia in your external files directory (note the dot prefix in the filename). This will prevent Android's media scanner from reading your media files and including them in apps like Gallery or Music. for example , you store your images and video in sdcard/yourappname/
then put .nomedia file in sdcard/yourappname/.nomedia
And then other application can not read your media files
i am developing one android application. it download videos from server and store it in mobile.
i want to store those video in secure manner.(deny the user from copying. or deny them from viewing the video directly from sdcard)
i found two ways to solve the problem.
1)Store the video's inside the application.
2)Encrypt the entire video
but facing some problem in implementing solution
i)first solution found suitable. but i am fearing that. if we store too much video inside the application .it would become bulkier.and fore the user to uninstall.
ii)but in second solution. i did not find any correct way to do so.
so please help me to solve the problem.
This is kind of suggestion :
To store the videos you must have created some folder on SDCARD, so you can hide the folder by putting the "." in front of the name while creating it. on top of this you can encrypt the video file using AES algorithm so it can not be viewed, if copied outside the android it will not be view able. but from your application you can decry-pt the file and view it.
Definitively, you must encrypt the media and that's quite simple. What is more difficult is to play the media, because MediaPlayer only accepts clear contents. A basic way would be to convert an encrypted file to a decrypted one, just for the time of the playing session. A better approach is to build a stream from the file, decrypt that stream and feed it to the player. The hard point is to have a local http server to serve the stream.