Creating an application that overwrite lock and unlock sound on Android - android

I want to create an application that is able to override the lock.ogg and unlock.ogg for Android phone without needing to root your phone. But I don't know how to code these properly nor if it's possible programmatically on Android Studio
Here's my basic idea:
Perform file searching to obtain all the ogg files stored in the phone.
When user has confirmed the sound, the app will copy the file (so that the original file's name is not overwritten), then rename the copied file to lock.ogg/unlock.ogg.
The problem for me is that other than implementing the ogg explorer, I also have to code the destination of the new ogg file to /system/media/audio/ui/ to overwrite the previous lock and unlock sound.
Is this possible using Android Studio?
I'm a newbie on Android Studio.

Related

Where is this file located on device?

I'm using the react-native-camera module in order to record video. After it records it gives me the uri of the location of the .mp4 video as:
file:///data/user/0/com.cassette_code/cache/Camera/a608b09c-e572-4056-9927-c0e8988cd254.mp4
I don't know where this is located. I recorded this on an android phone. Could someone tell me where I can access it, or if I can specify the location where the video should be stored in my project directory? I looked through the phone's storage, but I don't see com.cassette_code. I'm running it through my phone using USB debugging, so that might be why. But where would it be?
open your file manager in your android phone then select internal storage then android file then data file and finally select your app file
You may have to install something like ES File Explorer, then find the file using that app. Most built in file browsers can't see the application files

accessing your app saved files and be able to view it through your app in android studio

Good day people. I'd just like to ask if its possible to view my saved files (i.e audio or text files) from my device's external storage, which is where I wanted my recorded speech to be saved into, through my app? Like when I press a button (i.e button to access your app's gallery), it will let you to access your app's directory and be able to see the saved files in there. I'm new to android development, and I use android studio for developing hence I'm in need of your help. Thank you in advanced.

Android app consisting of Sound Effects - how to copy files?

I wanted to create an app that consists mostly of sound effects - imagine a theme of sound effects.
The UI of the app would reflect the general theme and consist of buttons like "Copy sounds to device" and "Delete copied sounds from device"
Once the app has copied the sounds to the device, I would like to make the MediaScanner aware of the new files.
Problem: With the limits on the SDcard, how is it possible for a non-system app to copy the files to the sdcard or even delete them ?
Whilst working on this feature, I discovered :
1)getExternalStorageDirectory() is useless on new versions of Android
2) the Media Scanner is unable to access the folder supplied by getExternalFilesDir()
Solution
Copy files to a public folder obtained with getExternalStoragePublicDirectory()
https://developer.android.com/reference/android/os/Environment.html#getExternalStoragePublicDirectory(java.lang.String)

Why does android allow delete a file that being used .....?

Why does android allow delete a file, although it is being used by another application?
For example: I have a mp3 file on sdcard, I use mp3 player to play it, and then I open a File Manager app and browse to that file; delete it successfully.
If on windows, a message will be displayed and we can't do that.
Why does the android operating system not?
I don't know the principle of file management on android os.
Does anyone have document about it? Help me please!
Going with the information from here (similar query to yours), linux file deletion only removes the pointers to the file until the last process using that file is complete. At this point the contents of the file are freed.
What this means is that the following should not work:
Play an MP3 file from the SDcard.
Open up file manager app and delete said MP3 file.
After MP3 file finishes, attempt to play it again.

auto m3u creation

I am looking for a solution to automatically create .m3u playlists for each music folder in my sdcard so that the music player can play music by folders. I had written a simple VB.Net app in the past that does exactly the above but apparently, it has to be run from Windows. Since I have no Java nor Android developing experience I found it quite hard to try to write a similar app that can be run directly from the phone. In a few words, the app does the following:
1) Searches the SD and lists all folders that contain 2 or more .mp3 files (just for user verification)
2) Creates in every listed folder above, a .m3u file that simply lists line-by-line all the mp3 files that exist in the specific folder.
Is there such an app or could someone spare some time and give me some rough instructions on how to create it in Eclipse 3.5.2 environment? (device used: Motorola Droid/Milestone, Android 2.1) I don't care about any graphics or complex UI, just a script to execute the above procedure that would give every "playlist-supporting" music player in Android, the precious ability to play music by folders. I know it is too much to ask but just in case!
Thanx in advance.
because I can download new songs and in general modify the existing collection from my phone where there is noneed to connect to a pc. also I may connect my phone to any pc and transfer new music folders and it may be the case where the remote pc doesnot have the vb runtime essentials on order to run my app, so running it from the phone offers far greater flexibility.

Categories

Resources