Tape is a collection of queue-related classes for Android and Java by Square, Inc. We'll show you how to create tasks that can be paused and resumed later if the application crashes, connectivity is lost or even if the battery is drained out.
2. What is the problem?
• Application is uploading files on our server
but Internet connection is gone or the
phone is suddenly turned off
!
What to do?
• Can we continue?
• Where to continue?
• How to save our progress?
3. Using Square tape
• Collection of queue-related classes for
Android and Java
• File-based FIFO.
• Created by Square, Inc.
4. What do you need
• Add it to build.gradle
compile 'com.squareup:tape:1.2.+'
• Create 4 java classes and 1 interface:
1. GsonConverter
2. TapeCallback
3. Tape task
4. TapeTaskQueue
5. TapeService