Create Music Player app in Sketchware
To create a Music Player app in sketchware, follow the steps given below.
1. Create a new project in Sketchware.
2. In VIEW area on main.xml, add a ListView listview1 with height wrap_content, and weight 1. Add a SeekBar seekbar1, an ImageView imageview1, and three TextViews textview1, textview2, and textview3, as shown in the image below.
3. Create a CustomView mycustom.xml and add a TextView textview1, and an ImageView imageview1 in it. For listview1 select mycustom.xml as it's customView.
4. Add a MediaPlayer component mp, a Shared Preferences component sp:sp and a Timer component timer.
5. Create six More Blocks MPcreate(pos), MPstart, and MPpause for the MediaPlayer and searchFolders, getFileList in [filePath] and extra.
6. Add three number variables n, r and songPosition, and five String variables currentfile, songMinutes, songSeconds, folder, folderName.
Also add a List String folderList, List String fileList and a List Map allmusic.
7. In onCreate event, use blocks as shown in image below.
Here we perform following actions:
i. Make imageview1 and progressbar1 GONE.
ii. Set songPosition to -1.
iii. If the shared preferences key "allsongs" is empty, call the AsyncTask GetSongsTask using following code:
(new GetSongsTask()).execute();
iv. If the shared preferences key "allsongs" is not empty, get all data from shared preferences sp key "allsongs" and convert to List Map allmusic. Display the ListMap allmusic in listview1.
8. In listview1 onBindCustomView event, use blocks as shown in image below.
Here we get the file names of mp3 files in List Map allmusic and display them in textview1 of CustomView.
9. In more block MPcreate(pos), use blocks as shown in image below.
Here we perform following actions:
i. Set String currentfile to file path of song at pos in List Map allmusic.
ii. Get name of song from currentfile and display it in textview3.
iii. Make imageview1 VISIBLE.
iv. Set songPosition to pos.
v. Create MediaPlayer for currentfile using following code:
mp = MediaPlayer.create(getApplicationContext(), Uri.fromFile(new java.io.File(currentfile)));
vi. Set OnCompletionListener for the MediaPlayer using following code:
mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener(){
public void onCompletion(MediaPlayer theMediaPlayer){
vii. On completion of song, reset and release the MediaPlayer, increase songPosition by 1, then create MediaPlayer for the new songPosition and start the MediaPlayer.
viii. Close MediaPlayer OnCompletionListener using following code:
}
});
ix. Set Seekbar max to song duration.
x. Display song duration in textview2.
10. In more block MPstart, use blocks as shown in image below.
Here we perform following actions:
i. Start playing the song using block MediaPlayer start.
ii. Display pause image in imageview1.
iii. Use a TimerTask, and every 400ms set progress of seekbar1 to current duration of song, and display current duration of song in textview1.
11. In more block MPpause, use blocks as shown in image below.
Here we perform following actions:
i. Cancel the Timer.
ii. Pause the MediaPlayer.
iii. Display play image in imageview1.
12. In the event listview1 onItemClicked, use blocks as shown in image below.
Here we perform following actions:
i. If songPosition is -1, create MediaPlayer for the song at the position of ListView clicked, and start playing the song.
ii. If songPosition is same as the position of ListView clicked, pause the song if it is playing and play the song if it is paused.
iii. If the position of ListView clicked is different from songPosition,
a. if any song is playing then pause the song,
b. reset MediaPlayer,
c. release song from the MediaPlayer,
d. Create MediaPlayer for the song at position of ListView clicked, and
e. Start playing the song.
13. In the event seekbar1 onStopTrackingTouch, use blocks as shown in image below.
Here if songPosition is not -1, play song from the duration selected on seekbar
14. In the event imageview1 onClick, use blocks as shown in image below.
Here we pause the song if it is playing and play the song if it is paused.
15. In the event imageview2 onClick, use call the AsyncTask GetSongsTask using following code:
(new GetSongsTask()).execute();
16. In the onPause or onStop event use blocks as shown in image below.
Here if songPosition is not -1, and if MediaPlayer is playing, then pause the song.
**IMPORTANT**
If this step is causing errors or crashes, skip this step. Also if you want to continue playing song in background, skip this step.
17. In the More Block extra, use codes and blocks as shown below.
Here we perform following actions:
i. Define a new class AsyncTask GetSongsTask.
}
private class GetSongsTask extends AsyncTask<Void, Void, Void> {
@Override
protected void onPreExecute() {
ii. In onPreExecute, make imageview2 GONE and progressbar1 VISIBLE.
iii. Use following code:
}
@Override
protected Void doInBackground(Void... path) {
iv. In doInBackground method, set number r to 0, clear allmusic, clear folderList.
Then use getFileList in [filePath] block to get path of all songs from external storage to ListMap allmusic.
After that convert ListMap allmusic to Json String and save it in shared preferences using key "allsongs".
v. Use following code for onProgressUpdate and onPostExecute methods.
return null;
}
@Override
protected void onProgressUpdate(Void... values) {
}
@Override
protected void onPostExecute(Void param){
vi. In onPostExecute, make imageview2 VISIBLE and progressbar1 GONE. Display ListMap allmusic in listview1. Toast number of songs added.
vii. Use following code:
}
18. Define More Block getFileList in [filePath] using blocks as shown in image below.
19. Define More Block searchFolders using blocks as shown in image below.
20. Save and Run the project. The Music Player app is ready.
Download music player Sketchware project data: http://sketchware.io/import.jsp?id=Gj1y
1. Create a new project in Sketchware.
2. In VIEW area on main.xml, add a ListView listview1 with height wrap_content, and weight 1. Add a SeekBar seekbar1, an ImageView imageview1, and three TextViews textview1, textview2, and textview3, as shown in the image below.
4. Add a MediaPlayer component mp, a Shared Preferences component sp:sp and a Timer component timer.
5. Create six More Blocks MPcreate(pos), MPstart, and MPpause for the MediaPlayer and searchFolders, getFileList in [filePath] and extra.
Also add a List String folderList, List String fileList and a List Map allmusic.
7. In onCreate event, use blocks as shown in image below.
i. Make imageview1 and progressbar1 GONE.
ii. Set songPosition to -1.
iii. If the shared preferences key "allsongs" is empty, call the AsyncTask GetSongsTask using following code:
(new GetSongsTask()).execute();
iv. If the shared preferences key "allsongs" is not empty, get all data from shared preferences sp key "allsongs" and convert to List Map allmusic. Display the ListMap allmusic in listview1.
8. In listview1 onBindCustomView event, use blocks as shown in image below.
Here we get the file names of mp3 files in List Map allmusic and display them in textview1 of CustomView.
9. In more block MPcreate(pos), use blocks as shown in image below.
i. Set String currentfile to file path of song at pos in List Map allmusic.
ii. Get name of song from currentfile and display it in textview3.
iii. Make imageview1 VISIBLE.
iv. Set songPosition to pos.
v. Create MediaPlayer for currentfile using following code:
mp = MediaPlayer.create(getApplicationContext(), Uri.fromFile(new java.io.File(currentfile)));
vi. Set OnCompletionListener for the MediaPlayer using following code:
mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener(){
public void onCompletion(MediaPlayer theMediaPlayer){
vii. On completion of song, reset and release the MediaPlayer, increase songPosition by 1, then create MediaPlayer for the new songPosition and start the MediaPlayer.
viii. Close MediaPlayer OnCompletionListener using following code:
}
});
ix. Set Seekbar max to song duration.
x. Display song duration in textview2.
10. In more block MPstart, use blocks as shown in image below.
Here we perform following actions:
i. Start playing the song using block MediaPlayer start.
ii. Display pause image in imageview1.
iii. Use a TimerTask, and every 400ms set progress of seekbar1 to current duration of song, and display current duration of song in textview1.
11. In more block MPpause, use blocks as shown in image below.
Here we perform following actions:
i. Cancel the Timer.
ii. Pause the MediaPlayer.
iii. Display play image in imageview1.
12. In the event listview1 onItemClicked, use blocks as shown in image below.
Here we perform following actions:
i. If songPosition is -1, create MediaPlayer for the song at the position of ListView clicked, and start playing the song.
ii. If songPosition is same as the position of ListView clicked, pause the song if it is playing and play the song if it is paused.
iii. If the position of ListView clicked is different from songPosition,
a. if any song is playing then pause the song,
b. reset MediaPlayer,
c. release song from the MediaPlayer,
d. Create MediaPlayer for the song at position of ListView clicked, and
e. Start playing the song.
13. In the event seekbar1 onStopTrackingTouch, use blocks as shown in image below.
14. In the event imageview1 onClick, use blocks as shown in image below.
Here we pause the song if it is playing and play the song if it is paused.
15. In the event imageview2 onClick, use call the AsyncTask GetSongsTask using following code:
(new GetSongsTask()).execute();
16. In the onPause or onStop event use blocks as shown in image below.
**IMPORTANT**
If this step is causing errors or crashes, skip this step. Also if you want to continue playing song in background, skip this step.
17. In the More Block extra, use codes and blocks as shown below.
Here we perform following actions:
i. Define a new class AsyncTask GetSongsTask.
}
private class GetSongsTask extends AsyncTask<Void, Void, Void> {
@Override
protected void onPreExecute() {
ii. In onPreExecute, make imageview2 GONE and progressbar1 VISIBLE.
iii. Use following code:
}
@Override
protected Void doInBackground(Void... path) {
iv. In doInBackground method, set number r to 0, clear allmusic, clear folderList.
Then use getFileList in [filePath] block to get path of all songs from external storage to ListMap allmusic.
After that convert ListMap allmusic to Json String and save it in shared preferences using key "allsongs".
v. Use following code for onProgressUpdate and onPostExecute methods.
return null;
}
@Override
protected void onProgressUpdate(Void... values) {
}
@Override
protected void onPostExecute(Void param){
vi. In onPostExecute, make imageview2 VISIBLE and progressbar1 GONE. Display ListMap allmusic in listview1. Toast number of songs added.
vii. Use following code:
}
18. Define More Block getFileList in [filePath] using blocks as shown in image below.
Download music player Sketchware project data: http://sketchware.io/import.jsp?id=Gj1y
I like u guy, u are a constant uploader,smart
ReplyDeletepls can I have your WhatsApp num I have a lot to ask u
This comment has been removed by the author.
DeleteHow can someone make a referral system with Sketchware
ReplyDeleteHello sir.
ReplyDeleteHow can i add next button in my music player
Add an image for next. In its Event OnClick, set songPosition to songPosition + 1, MPCreate(songPosition);
DeleteMPStart
Java code :
songPosition = songPosition + 1, or, if it's doesn't work ( assignementOperator Expression ),
songPosition = + 1;
_MPCreate(songPosition);
_MPStart();
Y como se puede sin usar codigos sino usar blockes
DeleteHelp me sir :
ReplyDeleteI can't create . In make my apk like your music player .
Here errors >>
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.media.MediaPlayer.isPlaying()' on a null object reference
at com.my.newproject28.MainActivity$3.onClick(MainActivity.java:170)
at android.view.View.performClick(View.java:5647)
at android.view.View$PerformClick.run(View.java:22465)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6394)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
This means the app executed MediaPlayer isPlaying before MediaPlayer create.
DeleteIt means no song is selected and you clicked a View which makes reference to the song which is playing.
then how to overcome it?
Delete1. ERROR in /storage/emulated/0/.sketchware/mysc/ 604/app/src/main/java/com/kicau/mania/ MainActivity.java (at line 306) mp-MediaPlayer.create(getApplicationContext0, Uri.fromFile(new java.io.File(currentfile); mp cannot be resolved to a variable 1 problem (1 error)
ReplyDeletewhat to fix ..
Thanks..
Change 'mp' to your MediaPlayer component name.
Delete..(component name)..= MediaPlayer.create(.....
Yessss..
Deletesuccessful ... but there are still a few flaws ... first. if 1 song ends, why can't the playr play the next song ... second. why does the song stop when the cellphone opens another application ... can this application still run when the phone opens another application ..
Come on, friend, develop this application ... I'm already passionate about this.
This comment has been removed by the author.
Deleteyou are smart my brother can you please make a tutorial on how to make a private chat app for example if many users are online I can chose one to private chat with the person.
ReplyDeletePls bro make video how to add video player in sketchware
ReplyDeleteHey buddy, you do not know how to read the metadata of that file? that of artist, genre, cover, etc. I would like to add that to the app ...
ReplyDeleteThank you
Help me please :(
ReplyDeletejava.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.media.MediaPlayer.isPlaying()' on a null object reference
at com.my.newproject28.MainActivity$3.onClick(MainActivity.java:170)
at android.view.View.performClick(View.java:5647)
at android.view.View$PerformClick.run(View.java:22465)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6394)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
There was probably a problem for onClick events.
DeleteHow to create
ReplyDeleteMPcreate(pos),
Go to event, select More Blocks and click the plus sign to create a new one. Name it MPcreate, change the variable from Boolean to number. In the next field, name your Variable pos and click the Add button to the right, then click the Add button on the bottom. Now when you go to add logic to anything if you go to More Blocks you will have the purple block Moderate with the empty space to put another block in.
DeleteThank
DeleteTHANKS BRO YOU HELP ME A LOT
DeleteThis comment has been removed by the author.
ReplyDelete1. error in /storage/emulated/0/.sketchware/mysc/619/app/src/main/java/com/my/newproject/mainActivity.java(at line 241)
ReplyDeletemp=MediaPlayer.creatr(getApplicationContext{), Uri.fromFile(new java.io.file(currentfile)))
--------------
this method creatr(Context, Uri) is undefined for the tipe of MediaPlayer
--------------
1 problem (1 error)
please help me
It should be 'create'.
DeleteChange 'creatr' to ''create'.
How to create MPcreate(pos),?
ReplyDeleteI have a error. This error is image invisible , don't exit and no read song.Why?
ReplyDeleteHow to next song ?
ReplyDeletePleace help
ReplyDeleteHow to add auto next play all song when clicked listview
How to add auto next play all song when clicked listview
ReplyDeleteI like this,
ReplyDeleteThanx
saya tidak bisa menemukan 6 more block, bantu saya menemukan ke 6 more block tersebut,
ReplyDeletemore block itu dibuat sendiri Gan, jadi memang tidak tersedia dari awal, Klik tab "Even" lalu klik tanda tambah untuk membuatnya.
DeleteSaya sukses membuatnya. Tapi kenapa saat app mau di buka " aplikasi telah berhenti" mohon bantuannya
ReplyDeleteHi bro
ReplyDeleteAt step 15 how can i add AsyncTask getsongTask on event imageview2onclick
Please help me. It keeps saying "0 Songs Added" even when I downloaded a music.
ReplyDeleteI also have a question - how do you get songs in your SD card?
Put the song in any specific folder and then get it from the folder by specifying folder name in the block codes.
Deleteon Android N, this method can't read SD cards, which only reads shared internal storage
Deletei've same problem, 0 song added, android 9, how to fix?thx
DeleteHow did you create this block(getFileList in)
ReplyDeleteI have problem with new version of sketchware i dont get (lenght of list ) block can you tell me what is this block name in last version
ReplyDelete1. ERROR in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/
ReplyDeletemehediproduction/music/mehedi/MainActivity.java (at line 337)
mp MediaPlayer.create(getApplicationContext0, Uri.fromFile(new
java.io.File(currentfile)):
mp cannot be resolved to a variable
2. ERROR in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/
mehediproduction/music/mehedi/MainActivity.java (at line 339)
mp.setOnCompletionListener(new Media Player.OnCompletionListener0
mp cannot be resolved
2 problems (2 errors)
Bro,How to fix it.
This comment has been removed by the author.
DeleteN°1 : Change "0" after "Context" by "()",
DeleteN°2 : Change "mp" by your MediaPlayer Component.
And, I forgot, for N°2, change "0" by "()".
DeleteThis code get with me a an error
ReplyDelete(new GetSongsTask()).execute();
It's maybe in the MoreBlock "extra".
DeleteI have error saying error while extracting dolnBackground please help me
DeleteMore errors. Please solve this. 😣
ReplyDeleteWhat are you errors ?
DeleteMy app is not working. Error Dialog box is appearing when I open the app.
ReplyDeleteSens me the screenshot to cleona.sd@gmail.com.
Deleteerror in /storage/emulated/0/.sketchware/mysc/601/app
DeleteAn error occured
ReplyDeleteJava.lang.RuntimeException:
unable to pause activity......
Show me your program in "onPause" to cleona.sd@gmail.com.
ReplyDeleteI am solve this problem but not show any song in my app and also not show play & pause buttom help me please.....
DeleteHello,
ReplyDeleteI like your post. Bur there shall be some improvement . I prefer to have a notification and Control music from notification. I use KWGT which show the music playing in home screen. Help me to do so.
On start I get an error with '(new GetSongsTask()).execute();'. I want to build my own music player app and use this example as a ground template to build on.
ReplyDeleteWould be nice if someone could help me with this issue.
Error log:
1. ERROR in /storage/emulated/Ol.sketchware/mysc/ 613/app/src/main/java/com/tj/musicplayertest1/ MainActivity.java (at line 180)
(new GetSongsTask()).execute();
^^^^^^^^^^^
GetSongsTask cannot be resolved to a type
2. ERROR in /storage/emu|ated/0/.sketchware/mysc/ 613/app/src/main/java/com/tj/musicplayertest1/ MainActivity.java (at line 190)
(new GetSongsTask()).execute();
^^^^^^^^^^^^^^^
GetSongsTask cannot be resolved to a type
Check at extra more block...there should found a mistake...
DeleteSir my player is not load any song only seek baar iis running
ReplyDeleteWhy in my app the list of music duplicate?
ReplyDeleteA Give Me 8 Errors For That :(
ReplyDeleteHelp Me I'm Need Help!
DeleteAmazing article, Which you have shared about the music player. This article is very interesting and I liked to read it. If anyone looking to free music player online, then visit at trending.
ReplyDeleteHi...can i ask the fuction of button for looping the song?please
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteMe too pls help
DeletePlease can you help me with this problem
ReplyDelete1. ERROR in /storage/emulated/0/.sketchware/
mysc/605/app/src/main/java/com/my/newproject/
MainActivity.java (at line 148)
(new GetSongsTask)).execute():
AAAAAAAAAAAA
GetSongsTask cannot be resolved to a type
2. ERROR in /storage/emulated/0/.sketchware/
mysc/605/app/src/main/java/com/my/newproject/
MainActivityjava (at line 190)
(new GetsongsTask0).execute(0
GetSongsTask cannot be resolved to a type
2 problems (2 errors))
AAAAAAAAAAAA
You should write
DeleteGetSongsTask()
I did but same result...
ReplyDeletePlzz help.
my app is working fine. but when last song is over app close automatically
ReplyDeleteI have the same problem. But I can help you 😆. In "_MPCreate(pos)", after songPosition = songPosition + 1, do this :
Deleteif(songPosition > length of(allmusics 🎵)) then
_MPCreate(0);
_MPStart();
else
_MPCreate(songPosition);
_MPStart();
👍
Thanks bro I got the logic...
DeleteWhy this app didn't work in old Android versions like 5.0 it says Asynk task error
ReplyDeletePlease help me... when i build the app no errors but wen start i got this error and end application
ReplyDeleteAn error occured
java.lang.RuntimeException: An error
occured while executing dolnBackground()
at android.os.AsyncTask
$3.done(AsyncTask.java:304)
at
java.util.concurrent.FutureTask.finishComp
letion(Future Task.java:355)
at
java.util.concurrent.FutureTask.setExcepti
on(FutureTask.java:222)
at
java.util.concurrent. Future Task.run(FutureT
ask.java:242)
at android.os.AsyncTask$ Serial Executor
$1.run(AsyncTask.java:231)
at
java.util.concurrent.ThreadPool Executor.ru
nWorker(ThreadPool Executor.java:1112)
at
java.util.concurrent.Thread PoolExecutor
$Worker.run(Thread PoolExecutorjava:
587)
at java.lang.Thread.run(Thread. java:818)
END APPLICATION
Show me 📩 your extra, getFileList(path) and searchFloders, to cleona.sd@gmail.com.
DeletePlease help. I followed every single step carefully. And luckily the app was successfully installed as there is no java syntax error. But when entering app, it is loading for about 1 min showing seekbar and all and shuts down immediately and reopens again automatically, with a blank screen. Please advise. Thanks
ReplyDeleteTry changing the folder to your music folder
DeleteHello sanjeev, please my app is created with no errors but when I launch it, it displays no songs from phone directory. Please help me
ReplyDeletesame problem me
DeleteOk I get the whole thing, but me what is the type of the moreblock
ReplyDeleteAre the moreblocks all numbers? Please specify each
Sir here is a problem,
ReplyDeleteHow to resolve?
(new GetSongsTask()).execute();
^^^^^^^^^^^^
Such a great information you have provided here. Get the best collection of Tv show series at the one place at starwarsnewsnet.com.
ReplyDeleteThis also my problem
ReplyDeleteErrors:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.media.MediaPlayer.isPlaying()' on a null object reference
at com.my.newproject28.MainActivity$3.onClick(MainActivity.java:170)
at android.view.View.performClick(View.java:5647)
at android.view.View$PerformClick.run(View.java:22465)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6394)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
How to make this update the songlist when a song is deleted or renamed or a new song is added?
ReplyDeleteI want to add an auto update feature.. when a new song is added or a song is removed or renamed.. the list will be updated. Is it possible? Help me pls
ReplyDeleteHello, I would like to appreciate your work. It’s a great platform got to learn a lot. Your data is really worthy. Thank you so much. Keep it up!
ReplyDeletePlaybox App For Android
Playbox Download Android
Bro I get error but I did like you did
ReplyDeleteplease sir help me.
ReplyDeleteAn error occured java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.media.MediaPla yer.isPlaying()' on a null object reference at com.my.newproject10.MainActivity $3.onClick(MainActivity.java:169) at android.view.View.performClick(View java:5273) at android.view.View $PerformClick.run(View.java:21315) at android.os.Handler.handleCallback( Handler.java:743) at android.os .Handler.dispatchMessag e(Handler.java:95) at android.os.Looper.loop(Looper.java: 150)at android.app.ActivityThread.main(Act ivityThread.java:5665) at java.lang.reflect.Method.invoke(Nati ve Method) at com.android.internal.os.Zygotelnit $MethodAndArgsCaller.run(Zygoteln it.java:822) at com.android.internal.os.Zygotelnit.m ain(Zygotelnit.java:712)
mp = MediaPlayer.create(getApplicationContext(), Uri.fromFile(new java.io.File(currentfile)));
ReplyDeletesir this code is error help me friend
What's your error when running the app ? If you want to show me screenshots, send me then to cleona.sd@gmail.com.
DeleteIf you wish to do that to earn massive cash quick, select merchandise which have massive markets. For instance, you possibly can select to focus on the burden loss business as a result of it is likely one of the areas that's all the time looked for by many on the web. If you want to learn more about this topic please visit onlineconvertfree.com
ReplyDeleteTutorial sketchware Indonesia klik di sini
ReplyDeleteIt says error on compilation
ReplyDelete"newjava.io cannot be resolved"
Please help me
1. ERROR in /storage/emulated/0/.sketchware/mysc/603/app/src/ main / java / com / my / newproject3 / MainActivity.java (at line 159) (new GetSongsTask ()). Run (); AAAAAAA The method Execute () is undefined for the type MainActivity.GetSongsTask 2. ERROR in /storage/emulated/0/.sketchware/mysc/603/app/src/ main / java / com / my / newproject3 / MainActivity.java ( at line 201) (new GetSongsTask ()). Run (); AAAAAAA The method Execute () is undefined for the type MainActivity.GetSongsTask 2 problems (2 errors)
ReplyDeletehelp me please
Really Great work Man, Thanks for your long list, this saved me a lot of time to find those Blog Commenting submission sitesmusic player online
ReplyDeleteHello Sir
ReplyDeleteI have created a Music App and used the coding as shown in this article.
When I click on the "Run" button, it doesn't compile the app instead return to main windows.
How can I resolve this issue
hi
ReplyDeletei need the script for the boton next in my music app . Please!
Thanks sir have compiled as instructed and boooooom i have a media player
ReplyDeleteأنا مبتدئ وأريد شرح مشاريع بسيطه حتى اتعلم بالتدريج شكراً
ReplyDeleteUpdated it today. In getFileList more block, if get at n of filelist contains .(dot) then do nothing, else check if it is a folder. It will prevent crashes seen at the beginning.
ReplyDeleteHi there I successfully managed to create my own app but 0 songs are added. How can I fix this?
ReplyDeleteDownload the project and try:
Deletehttp://sketchware.io/import.jsp?id=Gj1y
1. ERROR in /storage/emulated/0/.sketchware/
Deletemysc/602/app/src/main/java/com/my/newproject/
MainActivity.java (at line 240)
mp = MediaPlayer.create(getApplicationContext(),
Uri.fromFile(new java.io.File(currentfile)));
currentfile cannot be resolved to a variable
1 problem (1 error)
Please how do I resolve this
Deletemp = MediaPlayer.create(getApplicationContext(), Uri.fromFile(new java.io.File(currentfile)));
It's showing error
check the spelling of 'currentfile' maybe you used camel case
DeleteCould you make an official guide or PDF?
ReplyDeleteAnd why not let sketchware go open source?
Now a days there are lots of app for music also. as we provide Music Store Cleveland Ohio at affordable prices. for more info visit our website.
ReplyDeleteThe project I downloaded is crashing why
ReplyDeleteThanks! You are the best!
ReplyDeleteWhy does the Music Application always stop on its own when I open other applications (duration 4 minutes - 5 minutes)? even though I didn't activate onPause & onStop.
ReplyDeleteIt's very useful blog post with inforamtive and insightful content and i had good experience with this information.I have gone through CRS Info Solutions Home which really nice. Learn more details About Us of CRS info solutions. Here you can see the Courses CRS Info Solutions full list. Find Student Registration page and register now. Go through Blog post of crs info solutions. I just read these Reviews of crs really great. You can now Contact Us of crs info solutions. You enroll for Pega Training at crs info solutions.
ReplyDeleteHello there i have a problemi with creating this app everytime i press build project it always says [ Fail to generate resource table for split ", /Storage/sdcard0. Sketchware/libs/android. Support.compat.
ReplyDelete/support_v7_appcompat/27.0.2/res/value/value.xml:1430error:Error:No resources found that matches the given name (at'android:colorBackgroundCacheHint'withValue
'@color/abc_background_cache_hint_selector_material_dark').,]
Hello there i have a problemi with creating this app everytime i press build project it always says [ Fail to generate resource table for split ", /Storage/sdcard0. Sketchware/libs/android. Support.compat.
ReplyDelete/support_v7_appcompat/27.0.2/res/value/value.xml:1430error:Error:No resources found that matches the given name (at'android:colorBackgroundCacheHint'withValue
'@color/abc_background_cache_hint_selector_material_dark').,]
Pls sir how do I make my app match all screen sizes??
ReplyDeleteIts a great pleasure reading your post.Its full of informationFree Online Music Player
ReplyDelete----------
ReplyDelete1. ERROR in /storage/emulated/0/.sketchware/mysc/616/app/src/main/java/com/my/newproject3/PlaymusicActivity.java (at line 282)
listview3.setAdapter(new Listview3Adapter(allmusic));
^^^^^^^^^^^^^^^^
Listview3Adapter cannot be resolved to a type
----------
1 problem (1 error)
I want help with this please help
DeleteSir please give the project data plzzzzzzz the data you given had expired
ReplyDeleteIf u are on YouTube please tell me i have to learn from u sir plzzzpl whatsapp it channel name at 7830917726 Plzz Plzz
ReplyDeletethanks
ReplyDelete----------
ReplyDelete1. WARNING in /storage/emulated/0/.sketchware/mysc/608/app/src/main/java/id/jaloxy/musiclife/MainActivity.java (at line 182)
(new GetSongsTask()).execute();
^^^^^^^^^
The method execute(Void...) from the type AsyncTask is deprecated
----------
2. WARNING in /storage/emulated/0/.sketchware/mysc/608/app/src/main/java/id/jaloxy/musiclife/MainActivity.java (at line 192)
(new GetSongsTask()).execute();
^^^^^^^^^
The method execute(Void...) from the type AsyncTask is deprecated
----------
3. ERROR in /storage/emulated/0/.sketchware/mysc/608/app/src/main/java/id/jaloxy/musiclife/MainActivity.java (at line 237)
mp = MediaPlayer.create(getApplicationContext(), Uri.fromFile(new java.io.File(currentfile)));
^^^^^^^^^^^
currentfile cannot be resolved to a variable
----------
4. WARNING in /storage/emulated/0/.sketchware/mysc/608/app/src/main/java/id/jaloxy/musiclife/MainActivity.java (at line 312)
private class GetSongsTask extends AsyncTask {
^^^^^^^^^^^^
The constructor AsyncTask() is deprecated
----------
5. WARNING in /storage/emulated/0/.sketchware/mysc/608/app/src/main/java/id/jaloxy/musiclife/MainActivity.java (at line 312)
private class GetSongsTask extends AsyncTask {
^^^^^^^^^
The type AsyncTask is deprecated
----------
----------
6. WARNING in /storage/emulated/0/.sketchware/mysc/608/app/src/main/java/id/jaloxy/musiclife/FileUtil.java (at line 217)
return Environment.getExternalStorageDirectory().getAbsolutePath();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The method getExternalStorageDirectory() from the type Environment is deprecated
----------
7. WARNING in /storage/emulated/0/.sketchware/mysc/608/app/src/main/java/id/jaloxy/musiclife/FileUtil.java (at line 225)
return Environment.getExternalStoragePublicDirectory(type).getAbsolutePath();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The method getExternalStoragePublicDirectory(String) from the type Environment is deprecated
----------
8. WARNING in /storage/emulated/0/.sketchware/mysc/608/app/src/main/java/id/jaloxy/musiclife/FileUtil.java (at line 237)
path = Environment.getExternalStorageDirectory() + "/" + split[1];
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The method getExternalStorageDirectory() from the type Environment is deprecated
----------
9. WARNING in /storage/emulated/0/.sketchware/mysc/608/app/src/main/java/id/jaloxy/musiclife/FileUtil.java (at line 292)
final String column = MediaStore.Images.Media.DATA;
^^^^
The field MediaStore.MediaColumns.DATA is deprecated
----------
9 problems (1 error, 8 warnings)
Please can you make a video on how to create a background remover app🙏
ReplyDeleteGood day sir
ReplyDeleteYour three videos on how to create a music app are made up of different codes I'm really confused🤷🤦
Hello Sir, I don't understand why it is the number of 1000/60 in there.Please tell me the caculation
ReplyDeleteHello please I'm getting this error
ReplyDeleteInvalid list operation
: invalid index 0, size is 0
Please what version was used in creating this app
ReplyDeleteGreat Article Image Processing Projects Deep Learning Projects for Final Year JavaScript Training in Chennai JavaScript Training in Chennai The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training Project Centers in Chennai
ReplyDelete9. ERROR in /storage/emulated/0/.sketchware/mysc/637/app/src/main/java/com/my/newproject15/MainActivity.java (at line 299)
ReplyDelete_getFileList(FileUtil.getExternalStorageDir().concat("/"));
^^^^^^^^^^^^
The method _getFileList(String) is undefined for the type MainActivity.GetSongsTask
----------
10. ERROR in /storage/emulated/0/.sketchware/mysc/637/app/src/main/java/com/my/newproject15/MainActivity.java (at line 317)
public void _getFileList in (final String _filePath) {
^^^^^^^^^^^^
Syntax error, insert ";" to complete FieldDeclaration
----------
11. ERROR in /storage/emulated/0/.sketchware/mysc/637/app/src/main/java/com/my/newproject15/MainActivity.java (at line 317)
public void _getFileList in (final String _filePath) {
^^^^^^^^^^^^
void is an invalid type for the variable _getFileList
----------
12. ERROR in /storage/emulated/0/.sketchware/mysc/637/app/src/main/java/com/my/newproject15/MainActivity.java (at line 317)
public void _getFileList in (final String _filePath) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Return type for the method is missing
----------
----------
6. ERROR in /storage/emulated/0/.sketchware/mysc/637/app/src/main/java/com/my/newproject15/MainActivity.java (at line 278)
ReplyDelete_getFileList(folderList.get((int)(r - 1)));
^^^^^^^^^^^^
The method _getFileList(String) is undefined for the type MainActivity