Rotation proof songs downloading app with AsyncTask

In this post we are going to make a simple yet beautiful Rotation proof songs downloading app with AsyncTask. What do i mean by Rotation proof? As we know when user rotate the screen our activity is destroyed and recreated and this will cause our downloading to stop if user rotate the screen. This tutorial is a little complicated so i recommend you to read this tutorial first

  1. JSON parsing in android using PHP and MySqli
  2. Working with internal storage – Android 2016

If you are a intermediate and have knowledge of AsyncTask, Fragments and Storage so move forward

Rotation proof songs downloading app with AsyncTask – App Demo

Project structure

project structure for rotation proof songs downloading app with asynctask

strings.xml

Add songs url & songs name to string resource file
[xml]

DownloadAppAsyncTask

Khu Te Bar
Take Your Sandals Off
Saturday Saturday
Honedo Batiya
Don\’t Look At Me
Proper Patola
Dj Waley Babu
Fateh
Baagi Jatt
Yaar, 17
Chull


http://h.saavncdn.com/191/SONY_886445480191_01_008.mp3
http://h.saavncdn.com/191/SONY_886445480191_01_005.mp3
http://h.saavncdn.com/191/SONY_886445480191_01_002.mp3
http://h.saavncdn.com/191/SONY_886445480191_01_009.mp3
http://h.saavncdn.com/191/SONY_886445480191_01_003.mp3
http://h.saavncdn.com/191/SONY_886445480191_01_001.mp3
http://h.saavncdn.com/191/SONY_886445480191_01_004.mp3
http://h.saavncdn.com/191/SONY_886445480191_01_010.mp3
http://h.saavncdn.com/191/SONY_886445480191_01_010.mp3
http://h.saavncdn.com/191/SONY_886445480191_01_007.mp3
http://h.saavncdn.com/191/SONY_886445480191_01_006.mp3


[/xml]

activity_main.xml

[xml]


Leave a Reply

Your email address will not be published. Required fields are marked *