Office Hours — Today, June 27

Tuesday, June 25

Mark M.
has entered the room
Mark M.
turned on guest access
Jun 27
9:15 AM
Leora
has entered the room
Leora
Hiya Mark!
9:20 AM
Mark M.
whoops, sorry -- hello, Leora!
I apologize for any delay there
how can I help you today?
Leora
no prob
sec going back to privacy
how are you Mark?
Mark M.
OK, and you?
Leora
not bad, i have a side freelance project i talked to you about a couple of months ago
so 2 things on this
first FYI it's a rewrite, last updated 4 years ago and even then it was just emergency bug fixes
so, first of all i restructured the project for AS
9:25 AM
Leora
but one thing to keep in mind that i can't change the fact that the lite and full versions are 2 different package names
Mark M.
OK
Leora
so the thing with this app - a toddler card game - it has heavy resources - supports 17 languages, each gameboard has 12 cards, each card has 5-6 different mp3's - in each language
Mark M.
oof
I hope those MP3s are small
Leora
the lite version has 2 different gamboards, the full has 6...so 300 something mp3's for each language in full
yeah they're pretty small, like 9-10k each. it's just saying 'cat' or 'bell' in the language
the original (current in store apk) is 350MB!
so i have a few choices. organize the languages in their separate raw folders, and hopefully with dynamic delivery this will work
or make each language a library...
9:30 AM
Leora
i mean most parents will not want all the languages
what do you think?
Mark M.
personally, I would focus first on just trying find ways to get the audio size down
for example, you could run an experiment: make a list of all the words, and make a single MP3 recording of you reading each of those words in sequence
see how big that file is compared to the sum of all the individual MP3 files
if the single file is significantly smaller, you could try using that one file, and seeking to the correct millisecond offset to play that one word, stopping playback after a particular duration
this would be the audio equivalent of a sprite file for images, where you pack all the images into a single image file and use the pieces as needed
Leora
i would think that would be resource-consuming
oh i didn't know
Mark M.
it's just one thought
Leora
would i be able to join all the files together though?
Mark M.
I'm sure there are desktop tools for that
Leora
i don't know 17 languages yet. i'm impressed with myself that i know 2±
!
ok
9:35 AM
Mark M.
basically, shrinking the data requirements in general benefits everyone
Leora
and what do you think of the split apk/dynamic delivery/library ideas?
Mark M.
I am not a fan of app bundles, but that is because I am security nut -- for the purposes of a flashcard app for toddlers, they should be fnie
er, fine
if you organize the MP3s by locale in raw resources, I would expect the app bundles to be able to handle them the same way they handle string resources by locale
I can't guarantee that they do, as I have not run that particular experiment, but it seems likely
Leora
exactly
Mark M.
the advantage of app bundles is that the user does not have to get involved
Leora
i hope it is simple as it seems - that when i change the locale, the language will download automatically
Mark M.
right
Leora
yes i hope so
Mark M.
I assume that the "library" approach means you would have the user download a ZIP file or something containing the MP3s for a language
Leora
yes
Mark M.
that implies that the user has connectivity when they first run the app, which may or may not be the case
with app bundles, they should get their current locale(s) downloaded at the point of installation
Leora
i guess i would check for device default for first install
and then manage it through SplitInstallManagerFactory
yeah, good point, maybe for first install i could only have english as default
Mark M.
I have not used that, so I cannot really comment on it
9:40 AM
Leora
ok, one sec i want to remember my 2nd question - i've been at my 'regular job' a few days and need to remember exactly
oh yes
because the app has 2 packages (boooo), if a user buys the full version, i can't smoothly convert him to full
they will simply receive the full version and have to uninstall the free on their own right?
i'm trying to think of a way to work around this.
also complicated cause now the app owner wants me to add the option of a subscription
Mark M.
yes, though you could point out "hey, you are running the full app and no longer need the free one! would you like to uninstall it?" when they launch the full app
Leora
true
so if someone unsubscribes from the full then....?
Mark M.
I don't know what "unsubscribes" would mean in this case
Leora
i guess they would reinstall the free
to cancel subscription
Mark M.
I have not worked with Play Store subscriptions, or even used one as a user, so I have no idea how those work, sorry
Leora
ok no prob
Mark M.
I assume that the full app at the moment is a traditional pay-up-front paid app
Leora
at the moment yes
9:45 AM
Leora
i'm sorry i forgot about another q i have regarding flavors
is it ok?
Mark M.
go right ahead!
Leora
thank you:
i'm a bit confused how to structure them....
at the moment i made a main, full, lite, and even 2 - another full version with different content
in the past, the full and lite and 2 inherited from the main
so i thought, so as not to duplicate resources in lite and full,
to put the resources in the main, and have full and lite take them from main
OR just have the java classes in main, and have full take resources from lite and full
Mark M.
I do not know how that second one would work
Leora
if the first option the 2 app would have to override the main resources
Mark M.
if there is a fairly clean separation between the different sets of resources, and there is a simple set of rules for combining them for a given flavor, you might consider putting the resources in library modules
9:50 AM
Mark M.
then, have a flavor depend on the right set of library modules to pull in the necessary resources
Leora
then that would cancel the app bundle idea
Mark M.
I don't think so
app bundles certainly allow you to use library modules
Leora
oh i didn't think of that
Mark M.
a library module is no different than any other dependency, other than it happens to be in source form in your project
Leora
i only know of putting for example raw-en, raw-he, etc
Mark M.
besides, things like Instant Run depend a lot on specially-constructed library modules
right, but I assume that you need some amount of language separation for all of those flavors
Leora
i would looooove for my local proj to ignore compiling resources til i need them. it's hard to run when they are all in the editor
Mark M.
I do not know enough about your flavors and your resources to give you a specific solution -- I am merely mentioning that library modules is another tool in your toolbox
Leora
ok, thanks so much for the support
10:00 AM
Mark M.
OK, that's a wrap for today's chat
as usual, the transcript will be posted to https://commonsware.com/office-hours/ shortly
the next chat is Tuesday at 7:30pm US Eastern
have a pleasant day!
Leora
has left the room
Mark M.
turned off guest access

Tuesday, June 25

 

Office Hours

People in this transcript

  • Leora
  • Mark Murphy