Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Infinum Android Talks #05 - Square tape

1.198 visualizaciones

Publicado el

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.

Publicado en: Tecnología
  • Sé el primero en comentar

Infinum Android Talks #05 - Square tape

  1. 1. Square Tape Ivan Kocijan
  2. 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. 3. Using Square tape • Collection of queue-related classes for Android and Java • File-based FIFO. • Created by Square, Inc.
  4. 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
  5. 5. GsonConverter • Convert objects to and from JSON so that they can be written on disk in human readable format
  6. 6. TapeCallback • Interface which we will use to indicate that task is successfully finished and can be removed from Queue
  7. 7. TapeTask • Task which will be added to Queue for execution
  8. 8. TapeTaskQueue • Queue which holds our tasks • It will take care of serialization and deserialization of our tasks
  9. 9. TapeService • It will start when there are tasks in our Queue and end when Queue is empty or there was an error
  10. 10. Find out more • http://square.github.io/tape/
  11. 11. Questions? ?

×