Question: 7. Create an inner class in MainActivity called Catimages that extends AsyncTask*String, Integer, Strings to download the cat pictures. The class will need a Bitmap

 7. Create an inner class in MainActivity called Catimages that extends

7. Create an inner class in MainActivity called Catimages that extends AsyncTask*String, Integer, Strings to download the cat pictures. The class will need a Bitmap variable to store the current cat picture. 8. Inside the doinBackground of the AsyncTask, use an infinite loop ( while(true) ( ) to endlessly cycle through cat pictures. You will need to query https://cataas.com/cat?json=true to get your random cat picture. Use the "id" in the JSON payload to check if an image file with that name already exists on the device. If it does, you'll want to set the ImageView to use that local cat

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!