simple application having multi-threading with syncronization between the threads.
1- one thread download sound files from the Internet, and it must have progress notification
2- Play the sound files one by one in the background
3- main thread do some activities and control the operation of the other threads.
1- Complete Source Code is required: must compile as eclipse or Android Studio project.
2- No third party library; no compiled library; no ads; no back doors
3- Compatible with all android versions starting from version 2.2.
An application that when started plays mp3 files (giving directions to the user). These files are stored in the SDcard (not embedded in application). The list of these files are stored in a text file (XML or better flat text file). After finishing the play back of the sound files it starts a speech recognition processes. (I can provide the code for that part if it is difficult to do). After recognizing what the user said, it does the following:-
• It checks the local SDcard for a file (it creates a folder in the SDcard for the app In the first run), if it is found, it continue looking for the next files. If it is not found, it downloads it from a remote server (to be given and specified in the settings). Once it finds or download up to five consecutive files stored in the SD Card, it trigger the play back of these files sequentially. It continue downloading the rest of the files while the sound is being played back.
• While playing each file, the app simply displays a message on the screen saying that the file name “XXX” is being played back.
• Once all the sound files (requested by the user) are played back, the process starts from the beginning.
Let’s have an example.
Let’s say that in the file server (a simple web server) having a structured directory having sound files for many artists. But each artist has a number not a name: 01, 02, 03, etc. Each artist has several sound files named 01.mp3, 02.mp3, …, 10.mp3, 11.mp3, etc. Files are stored on the server like this:-
Example: myserver/01/02.mp3; for the second sound file for the first artist.
We have three sound files (Directions), which are stored in the SDcard. Their names are stored in a text File (not static in the program), named directions.txt.
Format of directions.txt is as follows:-
Directions File name Content recorded in the direction files
File1.mp3 What is the number of the artist
File2.mp3 What is the number of the first sound file
File3.mp3 What is the number of the second sound file
… May be other commands
The App reads all the direction file names, and then:-
1- It plays back the first direction file,
2- then the speech recognition part is triggered, the user says the number, the app recognizes the number and stores it in a variable: artistNum
3- It plays back the second direction file,
4- then the speech recognition part is triggered, the user says the number, the app recognizes the number and stores it in a variable: fromNum
5- It plays back the third direction file,
6- then the speech recognition part is triggered, the user says the number, the app recognizes the number and stores it in a variable: toNum
Once done, now every this is ready to call the download thread. The details are as follows:-
1- it checks the SDCard to see if the folder artistNum is already created or not, if not it creates it.
2- In a loop of variable SoundFile from fromNum to toNum, if a file name SoundFile.mp3 does not exists in the artistNum, it downloads it from the server and stores it in that folder. If the file already downloaded before, it simply increment the counter to check the next file.
3- Once there are 5 files downloaded; it does two things:-
• First: it call another thread (PlaySoundFileThread) to start playing the files sequentially from the beginning fromNum, once the current file is played back, it increments the counter and plays the next file
• Second: it continues downloading the rest of the files until reaching the last requested file toNum
If the download speed is slow, it is possible that the PlaySoundFileThread finish playing back the files before downloading the next file. In this case, the PlaySoundFileThread has to wait until the download thread has 5 new files completely downloaded and after that, it triggers the PlaySoundFileThread to continue playing back the files.
Note: do not care about the accuracy of the speech recognition part or how to separate the numbers of text. Assume that once called, and the user says something, it will return a number.
Contact Details: -
21 freelancers are bidding on average $191 for this job
Hello...Would you can just click on discuss button and start chat with me..Would you like,Discuss project with [url removed, login to view] can negotiate about price,time and work. ... Let me do it......I am software engineer....Thank you..
I have considerable experience working on multithreading and multimedia on an Android app. Have developed a media downloader and uploader and progress bar for upload/downloader. Contact me for further details.