Oct 8 | 7:20 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Oct 8 | 7:30 PM |
Ed | has entered the room |
Mark M. |
hello, Ed!
|
Mark M. |
how can I help you today?
|
Ed |
Hi Mark! Good evening
|
Ed |
I always feel like I bug you... :-). but thanks for your time
|
Oct 8 | 7:35 PM |
Ed |
so I have a legacy Android app
|
Ed |
mykeystore2.keystore is in the legacy folder for the app
|
Ed |
but I don't know any of the passwords... am I SOL ?
|
Mark M. |
um, perhaps
|
Ed |
worse case... I make a new file and legacy users will have to delete the old app to install the new app correct ?
|
Mark M. |
not exactly
|
Mark M. |
you would not be able to publish the app under the same application ID
|
Ed |
I have full access to the legacy PlayStore Account
|
Mark M. |
so the users could have both apps installed at the same time
|
Ed |
management wants to have this show up as an 'upgrade'
|
Mark M. |
that's not possible without the keystore password
|
Mark M. |
an upgrade requires the same signing key and the same application ID
|
Mark M. |
you have the latter, not the former
|
Ed |
perfect! I'll break the good news tomorrow. :-)
|
Mark M. |
I have heard of people trying to brute-force the password -- not sure how well that works
|
Ed |
good to know
|
Ed |
I have a LiveData question for you....
|
Mark M. |
and, if it is a matter of somebody knowing the password and not being willing to give it to you, you can always use a $5 wrench: https://www.xkcd.com/538/
|
Mark M. |
(note: this may be illegal in some jurisdictions)
|
Oct 8 | 7:40 PM |
Ed |
the developer had all of this on his laptop... and the rookie deleted his user account when he got his machine
|
Ed |
I literally went dumpster diving
|
Mark M. |
ummm... no backups?
|
Ed |
then had to reverse engineer the APK from the Google Play Store to get the legacy code
|
Mark M. |
oboy
|
Ed |
the git repot was from 2015
|
Ed |
the APK version was 2017
|
Ed |
I was able to get it all working...
|
Ed |
know maybe you know why my URI versus File issue wasn't as big a deal to me... as it was to you? :-)
|
Mark M. |
because it's going to fail on a variety of devices
|
Ed |
thanks for that extra e-mail... and URI Retrofit patch... I'll be using it in 2020... I have an iOS app to ship after this is done
|
Mark M. |
no problem
|
Ed |
I actually have it working on Android 10 and all other API devices
|
Ed |
with a minor change
|
Mark M. |
not for any possible Uri, and I'm not certain where you get the Uri values from
|
Ed |
View paste
|
Mark M. |
that's you supplying Uri values to another app
|
Mark M. |
my concern was your attempts to convert a Uri to a filesystem path
|
Oct 8 | 7:45 PM |
Ed |
View paste
|
Mark M. |
that's fine, other than the unreliability of ACTION_IMAGE_CAPTURE implementations
|
Ed |
android:requestLegacyExternalStorage="true"
|
Mark M. |
you wouldn't need that for FileProvider
|
Ed |
I agree, I'm moving it to CameraX next year... just trying to put that fire out
|
Mark M. |
hopefully the fire wasn't in the aforementioned dumpster
|
Ed |
lol
|
Ed |
I have a LiveData question for you... if you have time
|
Mark M. |
I have > 40 minutes!
|
Mark M. |
plenty o' time!
|
Ed |
nice!
|
Ed |
so I have 3 values that I want to persist
|
Ed |
across app use
|
Ed |
so when you load the options panel... it remembers your last values
|
Mark M. |
by "app use", do you mean multiple processes over time?
|
Ed |
it can 'default' on launch and then persists during the launch window....
|
Ed |
it's a printing app
|
Mark M. |
so far, this sounds like SharedPreferences or something along those lines
|
Ed |
so as you send multiple docs... keep the same settings..... for each item to print...
|
Ed |
that's what I was thinking... because it wasn't working the way I wanted it to
|
Ed |
LiveData gets reset every time
|
Oct 8 | 7:50 PM |
Ed |
Android changed the preferences lately
|
Mark M. |
LiveData is a lifecycle-aware in-memory data holder with an observer system -- it's not a persistent data store
|
Ed |
but I just needed it to remember state across the lifecycle of a single Activity
|
Ed |
I have an Activity that launches another Activity
|
Mark M. |
OK, then I misunderstood your requirements
|
Ed |
it's three variables
|
Mark M. |
so, Activity A has some data, and you want to be able to repeatedly launch Activity B, do stuff there, finish Activity B, and return to Activity A and still have your data?
|
Ed |
yes
|
Ed |
and in A Activity I do this...
|
Ed |
View paste
|
Ed |
and the B intent is launched like this...
|
Ed |
View paste
|
Mark M. |
so long as this is all the same process, your viewmodel should be a reasonable in-memory vehicle for holding your Activity A data (whether you use LiveData or not in the viewmodel)
|
Mark M. |
however, you mentioned ACTION_IMAGE_CAPTURE -- if you start a third-party app, and yours moves to the background, your process might be terminated while in the background
|
Ed |
good point, I'm going to ditch the LiveData
|
Oct 8 | 7:55 PM |
Ed |
there is no rotation for this screen and it's an Activity
|
Mark M. |
there are other types of configuration changes beyond rotation
|
Ed |
true, but I'm hoping if I have a small static object that I pass around I will be OK
|
Mark M. |
if by static you mean a static field, watch out for memory leaks, and that won't help if your process gets terminated
|
Ed |
while Kotlin gives you the neat 'singleton' feature... I'm still stuck in Java for this app
|
Ed |
it's a static pojo
|
Ed |
and the getter... if null creates a new with the default value
|
Mark M. |
if you mean a singleton lazy-created POJO, watch out for memory leaks, and that won't help if your process gets terminated
|
Ed |
by memory leaks you basically mean... making sure I null references to it for Activity objects going away correct?
|
Mark M. |
or, say, having a List<ReallyBigPieceOfData> and keep adding to the list
|
Ed |
if I do shared preferences doesn't that just persist to the AppBundle file system?
|
Ed |
that seems to be the best thing to do...
|
Mark M. |
I'm not sure where AppBundle comes into play, but SharedPreferences are stored on the filesystem
|
Oct 8 | 8:00 PM |
Mark M. |
so, if you want your data to survive for weeks (e.g., return visits to print), that's a reasonable choice for small data
|
Ed |
in my naive... mind... the APK/App bundle are all part of the file system for the app on the device
|
Mark M. |
yes, though the APK is stored in a different part of the filesystem
|
Ed |
I'm glad you write books. :-)
|
Mark M. |
well, my poetry sucks, so...
|
Ed |
but the short and to the point sarcasm is excellent
|
Ed |
just this week... I read. "this sucks"
|
Ed |
lol
|
Mark M. |
yeah, well, I try to keep it light in spots -- programming books can get awfully boring
|
Ed |
I agree
|
Ed |
the thing I like about your books... compared to BigNerdRanch
|
Ed |
you allow me to use your material as a reference, with small, concise and to the point examples
|
Oct 8 | 8:05 PM |
Ed |
so I can pull it apart, break it, put it back together again... and understand how it flows
|
Ed |
BigNerdRanch forces me to make coding changes to ALL the chapters BEFORE... the current assignment... and then diff that... just to see the small item and the relationships
|
Ed |
great for learning... sucks for reference
|
Mark M. |
that's a bit more like my *Exploring Android*, or the tutorial chapters in *The Busy Coder's Guide to Android Development*
|
Mark M. |
that approach has its place, but it's not ideal for all scenarios
|
Ed |
did you watch the fireside chat for Google IO this year?
|
Mark M. |
yes, a few months back
|
Ed |
when the guy asked the question about wearables...
|
Ed |
I was laughing so hard I almost spilled my coffee
|
Ed |
he should have dropped the mic before walking away
|
Mark M. |
sorry, I forget that one -- I'll have to rewatch it sometime
|
Oct 8 | 8:10 PM |
Ed | |
Ed |
26:14
|
Ed |
guy basically pointed out that 'wearables' wasn't mentioned at all by anyone.... at GoogleIO
|
Ed |
and nobody on the stage was from that group either
|
Ed |
it's like they've dropped that entire product
|
Mark M. |
yeah, they like throwing platforms at the wall and seeing what sticks
|
Mark M. |
WearOS, didn't stick that well
|
Mark M. |
Android Auto, doing OK
|
Mark M. |
TV, given three tries, they're muddling along
|
Ed |
part of me thinks Flutter.IO is Google trying to put a fire under the Android folks...
|
Ed |
maybe I'm wrong
|
Mark M. |
there may be an element of that
|
Oct 8 | 8:15 PM |
Ed |
the Android TV piece has it's core feature as mining data of what people watch and feeding it back to the TV manufacturers
|
Mark M. |
yes, though TV manufacturers with their own smart TV environments do the same thing
|
Ed |
that is too good of a revenue stream to not continue
|
Ed |
Mark thanks being my lighthouse on the storm sea... :-)
|
Mark M. |
um, you're welcome!
|
Mark M. |
BTW, watch out for the rocks
|
Ed |
if you have a long commute you should listen to Ed Snowden's Permanent Record on Audible.com... good one to listen to
|
Ed |
lol
|
Mark M. |
ah, didn't realize that was out in audiobook form
|
Ed |
cheers and have a great evening!
|
Mark M. |
you too!
|
Oct 8 | 8:30 PM |
Ed | has left the room |
Mark M. | turned off guest access |