kammaii / baguni

Second Korean app project
0 stars 0 forks source link

the idea of playing audio #10

Open kammaii opened 4 years ago

kammaii commented 4 years ago

There are audios like below.

  1. Lesson 1) word - able to collect 2) sentence 3) dialog

  2. Reading 1) article 2) word - able to collect

And, there are 3 ways to download files on Firebase

  1. byte[]
  2. file download
  3. get url https://firebase.google.com/docs/storage/android/download-files?authuser=0

PROBLEM: I realized that playing audio after getting url is really slow on mobile. So I changed the way of downloading to 'byte[]'. I think it's faster but still slow and sometimes the app was killed because of the frequent requests for downloading. Therefore I'm considering 'file download'. But it would too heavy if I always download audios. (it's about more than 3MB per lesson)

MY IDEA: So I'm considering 'file download' only for 'word' and 'byte[]' for others. Because a user can collect words and can play many times I think it would be better to store in the device.