Office Hours — Today, October 8

Tuesday, October 6

Mark M.
has entered the room
Mark M.
turned on guest access
Oct 8
7:30 PM
Tad F.
has entered the room
7:35 PM
Tad F.
Hi Mark!
Mark M.
hello, Tad!
(sorry if there was a delay there -- I was distracted)
how can I help you today?
Tad F.
NP! Have a question for you about dynamically changing the title of my main screen fragment.
I'm using the navigation components, so I believe it takes the value from the android:label value of the associated nav_host.xml file.
I saw your post last year about defining more than one attribute, but my need is a bit different
Mark M.
'cause I was just gonna link to that :-)
Tad F.
Basically, I want to be able to show the "long version" of my app name on devices that can handle it, and shorter one on devices that can't.
Wow that's really impressive how fast you can reference that link
How do you do that?
Mark M.
in SO, in the top bar, there's your avatar and reputation score
if you click that, it takes you to your profile... and fills in the search field to search your stuff
so, in my case, it pre-fills in user:115145
Tad F.
good to know!
Mark M.
seriously handy for me to look up my past posts
but, anyway, back to your problem...
Tad F.
I'll bet - you must have in excess of 10k
7:40 PM
Mark M.
I haven't looked into this much since that post, as I haven't had a need for the Navigation component with my clients, and my book samples aren't that complex
Tad F.
Yeah - so in keeping with the navigation components approach, how can I dynamically change it?
Mark M.
but, unless you pass another argument with the preferred title bar, I think you're stuck with manual overrides in code
Tad F.
Just doing a setTitle then?
I'm ok with that what's the safe place to do it - onCreateView?
Mark M.
yeah, though timing could get tricky, to ensure you come in after whatever Nav does
to be honest, off the cuff, I'm not certain
give me a minute to look up some stuff
Tad F.
Another timing issue <sigh>. My app is a great case for how to juggle timing issues :). I've got webRTC going, pubnub signalling going, all sorts of stuff that can send events at any time causing changes in the app behavior. Amazing how this stuff starts to compound after a while.
Mark M.
you can try onCreateView(), though I suspect that Nav comes in after that
OnDestinationChangedListener might work, but that's for the whole NavController
Tad F.
But setTitle is ultimately what I need to be dealing with, just at the right time, correct?
Mark M.
yes
assuming that you're using an action bar or Toolbar
Tad F.
Yep
7:45 PM
Tad F.
Btw - I'm targeting 21 or greater, seems that catches the bulk at this point, agree?
I was thinking of upping that to 23 (~85%), any opinion?
Mark M.
21 is like 95% or so -- unless you're specifically targeting "emerging markets", you're probably fine
if you're comfortable with 23, and your target audience isn't pre-disposed to older/cheaper devices, that's probably reasonable
Tad F.
Not specifically, but there will be some users. Screen size on those devices will be an issue anyway, even if the app worked so...
I mean the kind of devices running even 21 in emerging markets
Mark M.
well, nothing much new should be shipping with either 5.0 or 6.0 at this point
Tad F.
In those markets my biggest issue is bandwidth anyway
Mark M.
yeah, that too is an issue
Tad F.
And connectivity drops - I've spent a *lot of time* coding for network issues, et al, but still its an issue
7:50 PM
Tad F.
What are your thoughts on Room these days - should it be the standard for new apps?
Mark M.
if you are using SQLite, Room or SQLDelight are the two leading options nowadays
Tad F.
Is it mature enough to handle scale?
Mark M.
scale in terms of... what?
Tad F.
Users
sorry -transactions
Mark M.
how many users use a single phone? :-)
Tad F.
on the device
Mark M.
that's going to be more limited by SQLite than the wrapper around it, AFAIK
SQLDelight is better if you want to think in terms of SQL, as it generates code from your SQL statements
Room is better if you want to think in terms of objects, as it generates SQL from your classes
Tad F.
Room for me.
If/and when Realm doesn't do it for me
Still so far, I'm pretty pleased with it
I also really curious whether Flutter will end up sticking around, and Realm doesn't support it.
Mark M.
Flutter isn't likely to vanish, though I'm also not certain how much bigger it will get
7:55 PM
Tad F.
Yeah - I have talked with some of the senior directors of engineering at fairly well known companies that have offices where I am and they are still sticking to native Android and native iOS development.
Mark M.
in 2 years, I expect Jetpack Compose for Android/desktop/Web(?) and native iOS UI, using Kotlin/Multiplatform for common code, will be a contender
Tad F.
Do you think Android wear has hit a plateau? Is it even relevant?
Mark M.
"plateau" is a pretty good term for it
8:00 PM
Mark M.
another killer app for the wearable form factor could change the dynamic
Tad F.
I mean, what devices are actually supporting it?
I know samsung has something.
Mark M.
actually, theirs are mostly Tizen IIRC
Tad F.
But anything else?
Mark M.
I haven't shopped for one recently, so while I see various brands (e.g., Fossil) mentioned in Android-related posts, I don't have a current lineup
Tad F.
I've been trying to break into roku and firestick with my app - its tough.
Apple seems to have cornered these other device types
Mark M.
"firestick" meaning Amazon Fire TV Stick?
Tad F.
y
My target recipient audience is the elderly and mentally infrim
infirm
so the UI experience and what they have to do to enjoy it is critical
And most know how to operate a TV
most shy away from smart phones, social media, etc.
too complicated
But I've been trying to make the app for a "digital frame" (i.e. android tablet) super simple
TV is a natural progression
8:05 PM
Mark M.
TV also has the advantage of being based on a remote
I'm under the impression that motor control skills are a problem with touchscreens and the elderly, even with UIs designed for accessibility
Tad F.
I read a hilarious article about what comcast went through when they were beta testing their voice controlled remote.
Yes to the motor skills issue
but even more - just the "connecting the dots" problem of what you have to do to get what you want.
Regional language/slang comes into play in a big way, depending on the decade we are talking about.
'Shoot a photo' - big no-no
for example
Anyway - as always, thanks so much for what you offer to the Android community - I'm gonna sign off now.
8:10 PM
Mark M.
happy to help!
and, have a pleasant evening!
8:20 PM
Tad F.
has left the room
8:25 PM
Mark M.
turned off guest access

Tuesday, October 6

 

Office Hours

People in this transcript

  • Mark Murphy
  • Tad Frysinger