Jun 30 | 3:55 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Jun 30 | 4:00 PM |
Tad F. | has entered the room |
Mark M. |
hello, Tad!
|
Mark M. |
how can I help you today?
|
Tad F. |
Hello
|
Tad F. |
Well, you did give an answer to my question about the SAF - I still find it hard to believe they gave us everything in that framework to customize filters for file inclusion (including virtual files), but there is no way to tie this back to what the app requested in the intent that fires off the File Picker to begin with.
|
Tad F. |
Seems kind of backwards to me.
|
Mark M. |
think of a DocumentsProvider as being more like a filesystem driver
|
Tad F. |
If I choose to only want to see image/* files, how does it make sense to the user to see all file types in the list?
|
Mark M. |
that is up to the consumer of the document data, not the provider
|
Tad F. |
The built in document providers must be doing something - because if I just use the stock standard providers and I request just a specific mime type, that is all that I see.
|
Jun 30 | 4:05 PM |
Mark M. |
what specifically do you mean by "I request just a specific mime type"?
|
Mark M. |
if you mean ACTION_OPEN_DOCUMENT, the filtering is done in the consumer (the activity that responds to that Intent)
|
Tad F. |
I'm trying to mimic that behavior in my own custom documentsprovider
|
Tad F. |
Can you expand on your comment about a filesystem driver?
|
Jun 30 | 4:10 PM |
Mark M. |
filesystem drivers do not need to know the intentions of the software that is looking to use files on a filesystem
|
Mark M. |
they need to be able to enumerate the files, including directory traversals and whatnot
|
Tad F. |
I guess what is confusing to me is that if I simply use the stock standard document provider via the stock standard file picker i.e.:
|
Mark M. |
and they need to be able to return data (file content) and metadata (filename, timestamps, size, etc.)
|
Tad F. |
intent.setType("video/*")
|
Tad F. |
and startActivityForResult(intent, <my return code>)
|
Tad F. |
Then I get the File Picker that only shows me video files.
|
Tad F. |
So somehow this request is getting passed to the default provider.
|
Mark M. |
that is because the file picker is filtering out the results to only show you video files
|
Tad F. |
used by the File Picker
|
Tad F. |
It isn't the document provider that the picker uses that is doing the filtering?
|
Mark M. |
no
|
Mark M. |
now, DocumentsProvider does have a hook for searches
|
Tad F. |
Well it has hooks for building the cursor full of rows that represent all the documents you want shown in the picker
|
Mark M. |
no it does not
|
Tad F. |
At least, that's what I thought was going on - in all the examples I read through, the result of the query methods are to add rows to a cursor that gets returned.
|
Mark M. |
it has hooks for building a Cursor representing information about a document or a document tree
|
Tad F. |
The picker isn't then navigating hat cursor to show the results?
|
Mark M. |
it is, and then it is filtering things as it goes
|
Tad F. |
doesn't then method queryChildDocuments exist solely to give a list of document results to the picker?
|
Tad F. |
Then you are saying the picker does the filtering...
|
Mark M. |
correct
|
Tad F. |
OK well something isn't working....
|
Tad F. |
Mostly likely me -
|
Tad F. |
because I am definitely calling the picker with specific mime types only to be chosen,
|
Tad F. |
it is using my provider
|
Tad F. |
but not filtering out the unnecessary files.
|
Jun 30 | 4:15 PM |
Tad F. |
That's why I thought I had to do it in the provider
|
Mark M. |
perhaps there is something wrong in the data that you are returning, that is preventing the normal behavior
|
Mark M. |
for example, perhaps you are not supplying the MIME types in the appropriate place in the appropriate Cursor
|
Mark M. |
frankly, the DocumentsProvider API is dreadful
|
Tad F. |
I'm using the sample from Ian, and also android-StorageProvider-master from Git as samples
|
Tad F. |
So my projection is the stock standard (including the column for mime type)
|
Mark M. |
that does not necessarily mean that you are filling in the MIME type into the Cursor
|
Tad F. |
How does the picker decide whether a row should be filtered out, do you know?
|
Mark M. |
and I have no idea if that would give the behavior that you are seeing
|
Mark M. |
for video/*, presumably it looks at the MIME type
|
Tad F. |
Is it comparing the mime type that I passed in the intent to the mime type in the that column for each row?
|
Mark M. |
presumably
|
Tad F. |
i.e.the string values?
|
Tad F. |
that would make sense.
|
Mark M. |
the code for that UI should be in the AOSP somewhere, if you wanted to go hunting for it
|
Tad F. |
Yes, right I should look for it and check.
|
Tad F. |
Also check that I'm matching those two things.
|
Tad F. |
OR I should say, that those things are matching.
|
Mark M. |
you could write instrumented tests that use DocumentFile to examine what your DocumentsProvider is returning
|
Tad F. |
Yes.
|
Jun 30 | 4:20 PM |
Tad F. |
I have a couple other tests written I can modify to check for this, good idea.
|
Tad F. |
Btw - how often each month do you hold these office hours?
|
Mark M. |
three times a week
|
Tad F. |
Really great idea.
|
Mark M. |
the nine-year anniversary of the chats comes up in November :-)
|
Tad F. |
And is your biz model to perform consulting? Custom app development? Paid speaker?
|
Mark M. |
book subscriptions, training, and consulting
|
Tad F. |
Training == similar to Big Nerd Ranch?
|
Mark M. |
yes, though I haven't had an opportunity to do public training in some time
|
Mark M. |
mostly, its private training for firms that are spinning a team up on Android
|
Mark M. |
I work in tandem with Opersys on that -- they offer training for firms looking to develop Android hardware
|
Tad F. |
I see. I'm asking because while I am doing some Android work on my own on the side (veteran of several startups), I work for a large software company that has Android teams in various stages of expertise.
|
Mark M. |
the "various stages of expertise" part is fairly typical
|
Tad F. |
And it is always good to know the "experts" that have experience jump starting groups, projects, deep dive into specific areas, etc.
|
Jun 30 | 4:25 PM |
Tad F. |
And you are east coast?
|
Tad F. |
based
|
Mark M. |
yes
|
Tad F. |
What do you think of the emphasis on Kotlin? Google's planned response to the risk of staying with Java? Is it worth shifting to?
|
Mark M. |
Kotlin is a fine example of the Gibsonian "the future is here, it's just not evenly distributed" line
|
Tad F. |
heh.
|
Tad F. |
Same with Flutter
|
Mark M. |
so, in Silicon Valley, for example, Kotlin appears fairly dominant
|
Mark M. |
but that's not the case globally
|
Tad F. |
I get you
|
Mark M. |
I'm in the process of revamping my books and training to be more Jetpack-centric
|
Mark M. |
along the way, the introductory material will be both Java and Kotlin
|
Mark M. |
intermediate/advanced material will be Kotlin
|
Tad F. |
The cynical side of me figured they saw the appellate reversal coming a year back and they needed to figure out a way to not be so dependent on Java.
|
Mark M. |
that's possibly a bit of the calculus, though we're using Kotlin/JVM for Android app development presently
|
Mark M. |
it's theoretically possible that they could offer some Kotlin/Native alternative in the future
|
Tad F. |
Have you played around with Realm at all?
|
Mark M. |
very lightly
|
Tad F. |
The backend of this project I'm working on uses it.
|
Jun 30 | 4:30 PM |
Mark M. |
that's interesting -- I've only used it on the Android side
|
Tad F. |
I envisioned a need for very fast event messaging to peer groups, their approach seems to do that well.
|
Tad F. |
I'm using it for the local Android DB now, with the mindset of moving that to a centralized server in the future.
|
Tad F. |
This is an app to allow people to more easily share info/media between closed groups on various devices.
|
Tad F. |
and the messaging is to notify the group when someone has made a change or uploaded something interesting.
|
Mark M. |
OK
|
Tad F. |
It's interesting, very light, and very fast.
|
Tad F. |
Have you worked at all with Possible Mobile, here in Denver?
|
Mark M. |
not directly
|
Mark M. |
I've met Dave Smith, formerly of Possible Mobile (by acquisition), before he headed to Google
|
Tad F. |
They mentioned you at the last meetup I went to recently, which is why I ended up subscribing.
|
Mark M. |
ah, I've been sponsoring Denver Droids for a couple of years
|
Mark M. |
and have delivered a couple of presentations by remote to them
|
Tad F. |
Yeah, its a fun group
|
Tad F. |
I've been really interested in various aspects of media with Java for a long time.
|
Jun 30 | 4:35 PM |
Tad F. |
And those guys do some interesting stuff with it...
|
Mark M. |
media gets pretty darned complicated, once you get past the simple stuff
|
Mark M. |
particularly on Android
|
Tad F. |
Yeah it really does - we had a startup called "Cinegistics", and our product "Cineshot" which was a software stack (Java/C++/Pixel SHaders) that replaced about a dozen pieces of hardware routinely used by the movie industry on set.
|
Tad F. |
It was really fun - we got to present it with James Gosling at a JavaOne during his "Toy Show" session.
|
Tad F. |
So when I first started with Android I was trying to replicate some of it.
|
Tad F. |
Quickly found lots of issues in the platform, but it was still lots of fun.
|
Mark M. |
issues? in Android?!? inconceivable!
|
Mark M. |
(Narrator: it was not inconceivable)
|
Tad F. |
I did some iOS work before diving into Android (not a ton, just a taste), and the one huge difference is developing with 2-4 platforms in mind instead of 20!
|
Mark M. |
in that standpoint, it's a bit more like Windows, where the hardware and drivers are rather variable
|
Tad F. |
Which reminds me - what kind of setup do you recommend for testing across all the various hardware platforms, even if you have a relatively sane number of platforms you are targeting?
|
Jun 30 | 4:40 PM |
Tad F. |
Say 21 and above, but you want to cover 80% of the hardware market
|
Mark M. |
um, that's a bit difficult to answer in the abstract
|
Mark M. |
that's probably a few thousand device models... and you won't be in position to test on them all
|
Tad F. |
There are various companies out there (including Google) that claim to virtualize all this, but I haven't used them (yet).
|
Tad F. |
"all this" meaning some sane subset.
|
Mark M. |
in terms of what: aim for a mix of OS versions, major manufacturers, and screen sizes
|
Mark M. |
personally, I do most of my testing locally, on actual hardware
|
Tad F. |
Big room with dozens of handsets and tablets, or...?
|
Tad F. |
And do you have an automated deployment to them set up? Using what?
|
Mark M. |
I don't usually test on dozens, bearing in mind that I'm an adviser, more so than somebody who ships lots of apps
|
Mark M. |
I *have* dozens, but they're more for testing specific problem areas
|
Tad F. |
Possible has the "big room" approach, and they spent a lot of time on their devops pipeline to get it streamlines.
|
Mark M. |
I don't have an automated setup, though https://openstf.io/ seems interesting
|
Tad F. |
streamlined.
|
Mark M. |
the test servers are fine, but the more your app is hardware-focused, the less useful they become
|
Tad F. |
It takes a lot of effort to get that whole process of commit/build/deploy/run tests/capture results -> across lots of hardware, done well.
|
Mark M. |
yes
|
Tad F. |
Particularly when updates come several times a year across all the devices.
|
Jun 30 | 4:45 PM |
Tad F. |
What are your favorite examples of apps where you believe they really did it right under the covers?
|
Tad F. |
Or maybe even where you know they did it right under the covers...
|
Mark M. |
beats the heck out of me
|
Tad F. |
:)
|
Mark M. |
I probably use Android less than most experts
|
Mark M. |
so for example, today, outside of playing back an audiobook for a short while this morning, I haven't looked at my phone
|
Mark M. |
(here referring to my personal "daily driver" device)
|
Tad F. |
Interesting - are you working on any apps yourself at this point?
|
Mark M. |
for a consulting client, yes
|
Tad F. |
OK - well I've been pestering you probably for longer than I should have, my good luck and your bad fortune that I was the only one to show. :)
|
Tad F. |
Thanks for you input!
|
Mark M. |
the chat rooms vary in popularity, depends on the day and luck of the draw
|
Mark M. |
you are very welcome!
|
Tad F. | has left the room |
Jun 30 | 5:00 PM |
Mark M. | turned off guest access |