Apr 9 | 7:20 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Apr 9 | 7:30 PM |
sudokai | has entered the room |
Mark M. |
hello, sudokai!
|
Mark M. |
how can I help you today?
|
sudokai |
Hi Mark!
|
Apr 9 | 7:35 PM |
sudokai |
I'm using Android Studio and can't access my app's internal storage directory
|
sudokai |
Using the Device File Explorer
|
sudokai |
Has this ever happened to you?
|
Mark M. |
are you building a debug or a release build?
|
sudokai |
I think it's a debug build
|
Mark M. |
you can't view internal storage for release builds on hardware, which is why I asked
|
Mark M. |
is this on a device or emulator that you are having trouble?
|
sudokai |
Real device
|
sudokai |
I'm getting a permissions error
|
sudokai |
run-as: /data has wrong owner: 0/1000, not 1000
|
Mark M. |
are you able to see any of internal storage? or, what specifically are you doing that is triggering that error?
|
sudokai |
I'm going through the Explore Android book and I just wanted to take a peek inside the directory
|
sudokai |
But I'm not able to
|
Mark M. |
OK, but, what did you click on (or right-click on, or something) that caused that error to display?
|
sudokai |
For apps that I installed through Play Store, I get "run-as: package not debuggable: com.discord"
|
Mark M. |
right, and that's a release build
|
sudokai |
But for the todo app, I get "run-as: /data has wrong owner: 0/1000, not 1000"
|
Apr 9 | 7:40 PM |
sudokai |
So, I get to see data/data
|
sudokai |
and the list of apps
|
sudokai |
Then I double click on com.commonsware.todo
|
sudokai |
And I see this error
|
Mark M. |
OK, that's new
|
Mark M. |
it shows up in the same place as the "run-as: package not debuggable" message?
|
sudokai |
I've tried both Android studio 3.6.2 and 4.0 beta, same thing on both IDEs
|
sudokai |
Yes, exactly!
|
sudokai |
Red text
|
Mark M. |
what is the device?
|
sudokai |
A Huawei Mate 20 (Android 10)
|
sudokai |
I know, one of the worst OEM manufacturers
|
Mark M. |
yeah, I was going to say something like that
|
sudokai |
Maybe it's related to some update of theirs
|
Mark M. |
if I had to guess, it's a device issue
|
Mark M. |
they also used to have this screwy system where you needed to get an account on one of their servers to be able to enable USB debugging
|
Mark M. |
if that's still the case, it may be that this problem is a side-effect of that system
|
sudokai |
I used to be able to see the files when connecting the same device to a Linux workstation
|
Mark M. |
that's interesting -- what OS are you trying now?
|
sudokai |
But now everyone is quarantined and from my home macbook, it doesn't work
|
Mark M. |
hmmm... I would have expected similar results there
|
Mark M. |
had you said "Windows", there might be a driver issue
|
Apr 9 | 7:45 PM |
sudokai |
Again, they might have changed the behavior in a recent OS update, but I'm not really sure because they update the phone overnight and sometimes you don't see any update notifications
|
Mark M. |
yuck
|
sudokai |
It's all done transparently
|
Mark M. |
there's a difference between "transparently" and "behind your back" :-)
|
sudokai |
I saw a single Stackoverflow questions with the exact problem
|
sudokai |
But no answers
|
sudokai |
from February 2020
|
sudokai |
You've never seen this before, have you?
|
Mark M. |
no
|
Mark M. |
now, I happen to run Linux
|
sudokai |
Well, I'll definitely check again with Linux when I get to go to the office
|
Mark M. |
and I don't test on Huawei hardware other than Nexus models they made (6P, IIRC)
|
sudokai |
I did manage to get WiFi debugging working on this device though :)
|
Mark M. |
well, that's a plus
|
Mark M. |
though that does raise a question: have you tried your scenario with a USB cable, or only over WiFi?
|
sudokai |
I tried it with a USB cable
|
sudokai |
Yes, because the new modern phones don't have a headphone jack, only the usb c connector
|
Mark M. |
OK -- the WiFi debugging was just unusual enough that I figured it was worth checking
|
sudokai |
So it was annoying not being able to use your headphones when your phone was plugged in for debugging
|
Apr 9 | 7:50 PM |
Mark M. |
in my case, I've acquired a lot of hardware, so my "daily driver" device isn't the one I usually test with
|
Mark M. |
(unless I need a test with that specific model)
|
sudokai |
What kind of devices do you test on usually?
|
sudokai |
Manufacturers? Android versions?
|
Mark M. |
usually a Pixel for day-to-day stuff
|
Mark M. |
and I have a lineup of Samsungs, LGs, and Nokia when I want to try other scenarios (OS version, screen dimensions, etc.)
|
Mark M. |
but, overall, I have ~60 devices
|
sudokai |
Anything unusual you've seen? Like oh, I always need to test with a Samsung phone because of X
|
sudokai |
Oh wow
|
sudokai |
That's a looot!
|
Mark M. |
I can't say that I have categories of problems that I need to test on certain manufacturers' hardware
|
Mark M. |
but, for example, one of my Nokia devices is an Android One device
|
Mark M. |
and a couple have notches or pinholes for the front-facing camera
|
sudokai |
You must have spent a fortune acquiring them
|
Mark M. |
yes, but they are business expenses, so...
|
sudokai |
Oh, notches!
|
Mark M. |
it used to be that I was acquiring hardware specifically to test cameras, back when I maintained camera libraries
|
Mark M. |
since I got out of that, more of my purchases have been for those specific sorts of hardware things, in case I needed them
|
Apr 9 | 7:55 PM |
Mark M. |
so, a recent purchase was a Samsung Galaxy A50, as it has an in-screen fingerprint reader
|
sudokai |
So before releasing an app, you go through all those devices?
|
Mark M. |
well, I don't release apps personally too much -- my client has that job
|
Mark M. |
(for whoever my consulting client is at the time)
|
Mark M. |
most of the testing is actually for the books and blog posts and stuff
|
Mark M. |
but, I will try my clients' apps on different hardware where I anticipate problems
|
Mark M. |
or, for variety
|
sudokai |
I finished Explore Android. Very nice book.
|
Mark M. |
thanks!
|
sudokai |
I like your iterative style.
|
Mark M. |
that book (and its predecessors) is a pain to maintain
|
sudokai |
Also, I don't CTRL C and CTRL V. Rather I type the code in.
|
sudokai |
Old school.
|
sudokai |
:)
|
Mark M. |
perfectly reasonable
|
sudokai |
I find that it really helps
|
sudokai |
I've looked for different learning materials
|
sudokai |
and books like Explore Android are the ones that suit me best. Iterate and then incrementally understand the process, while doing something end to end.
|
sudokai |
I find most video lessons very slow and not even well explained.
|
Mark M. |
I've had that sort of step-by-step materials for a long time, mostly stemming from when I teach Android app development live
|
sudokai |
I'm all the time like, just show me an example. I can read code!
|
Apr 9 | 8:00 PM |
Mark M. |
on the other hand, there are lots of developers today who would not dream of reading a programming book
|
Mark M. |
different people have different approaches that they prefer
|
sudokai |
I also like the fact that you use the latest libraries and techniques
|
Mark M. |
yeah, I'm updating *Exploring Android* now for Android Studio 3.6
|
sudokai |
There's nothing more offputting imo, than getting the sample and spending at least 30 min trying to fix all the compilation problems
|
sudokai |
I saw that Udacity is still teaching RecyclerView with the Android Support Library
|
sudokai |
All Java, no Kotlin
|
Mark M. |
those sorts of training videos are *really* a pain to maintain
|
Mark M. |
which is why a lot of places don't do it
|
sudokai |
That's something that really irks me. Like, I'm learning and what I'm learning is already deprecated.
|
sudokai |
Did you see they are changing the onActivityResult stuff?
|
Mark M. |
you mean with the ActivityResult class (or whatever it's called -- I forget the name)
|
sudokai |
no the callback
|
sudokai |
there's a new way to do it, but it hasn't made it into stable yet
|
Mark M. |
there's a whole family of ActivityResult* classes
|
sudokai |
but the docs have been changed
|
sudokai | |
Apr 9 | 8:05 PM |
sudokai |
"While the underlying startActivityForResult() and onActivityResult() APIs are available on the Activity class on all API levels, it is strongly recommended to use the Activity Result APIs introduced in AndroidX Activity 1.2.0-alpha02 and Fragment 1.3.0-alpha02."
|
Mark M. |
yeah, Gogole advocating alpha libraries grates on my nerves
|
Mark M. |
(er, "Google", not "Gogole")
|
sudokai |
Well, I like the new way :)
|
Mark M. |
oh, it's almost certainly an improvement
|
Mark M. |
at the same time, newcomers shouldn't be using alpha-grade Google code
|
sudokai |
Yeah, they are also promoting the heck out of the Firebase beta libraries
|
sudokai |
Even sent a newsletter
|
sudokai |
Btw, back to the topic of phone manufacturers for a moment, you know these manufacturers, like Huawei, that kill background apps... Anything you can do about it as a developer?
|
sudokai |
It seems like there's nothing you can do.
|
Mark M. |
other than drown your sorrows in your beverage of choice, AFAIK, there is little that you can do
|
Mark M. |
I've gotten to the point of trying to steer developers away from background processing
|
sudokai |
They kill your app when the screen is off for a few minutes
|
sudokai |
Foreground services, whatever
|
sudokai |
They don't care.
|
Apr 9 | 8:10 PM |
Mark M. |
yeah, they got on a serious battery-savings kick ~3 years ago
|
Mark M. |
and that's when all those sorts of things started in
|
Mark M. |
based on all the reports I've seen
|
sudokai |
I really wish Google would do something about this.
|
sudokai |
Because users always blame the app makers.
|
Mark M. |
I wouldn't rule out Google trying to constrain how bad this gets, but I wouldn't count on it, either
|
sudokai |
I know it's a lot of work to maintain the books, but man, The Busy Coder's Guide is a life-saver
|
Apr 9 | 8:15 PM |
Mark M. |
it has a lot of depth, though for core stuff it's starting to show its age
|
sudokai |
Do you plan to migrate more stuff over there to Elements of Jetpack?
|
Mark M. |
not much
|
Mark M. |
I want *Elements of Android Jetpack* to remain a reasonable size
|
Mark M. |
so, there's lots of things in *The Busy Coder's Guide* that are unlikely to get revisited
|
sudokai |
I mean, I really like the fact that you can find almost anything there
|
Mark M. |
part of the problem is that I can't spend time on the books the way that I used to
|
sudokai |
Oh that's a shame!
|
Mark M. |
writing *The Busy Coder's Guide* and teaching classes was literally my full time (plus) job
|
Mark M. |
however, book sales have fallen off, and corporate training has as well
|
Mark M. |
so, I do more consulting and similar sorts of contract work
|
Mark M. |
which leaves less time for the books
|
sudokai |
I'm sorry to hear that. As I said before, maybe charge more?
|
sudokai |
I see all sorts of subscription sites that charge 20 dollars per month
|
Apr 9 | 8:20 PM |
sudokai |
For those video lessons we talked about before. Udacity's nanodegrees? Way more expensive.
|
Mark M. |
at this point, particularly for a book-centric offering, I don't think I can charge anywhere near those prices
|
Mark M. |
the difference between the early years and now is partly the change in format (more videos) and partly the fact that Android has matured a lot so there's a ton of blog posts and stuff
|
sudokai |
I mean, take any Manning book, they are not even updated or mantained once released
|
sudokai |
They charge you 50 bucks
|
sudokai |
Same with OReilly
|
sudokai |
Few video courses are worth it
|
sudokai |
I took the beginner Android course on RayWenderlich. 2.5h of videos and they teach you to make a single activity with one button and onRestoreInstanceState for rotations.
|
Mark M. |
that's... slow
|
sudokai |
Well, the Udacity courses are not any better
|
Apr 9 | 8:25 PM |
sudokai |
Tbh, I think there's a big hole in the Android training market
|
sudokai |
I see way more quality stuff for web development
|
Mark M. |
yes, though I haven't figured out a pricing and delivery model that I like, other than classic corporate on-site training
|
Mark M. |
and that particular segment may take ages to recover from COVID-19
|
sudokai |
In webdev, the golden standard of video training is Laracasts by Jeffrey Way.
|
sudokai |
Jeffrey Way absolutely nails it and he has years and years of content.
|
sudokai |
But nothing even close to that for Android.
|
sudokai |
That's how I actually ended up finding your books.
|
Mark M. |
through Laracasts?
|
sudokai |
No no, I mean
|
sudokai |
I exhausted my search and still couldn't find anything
|
sudokai |
Then I saw your books and I thought, well, who knows if they are okay, but 20 dollars is really cheap so what the hell
|
sudokai |
:D
|
sudokai |
Turned out to be top quality
|
Mark M. |
thanks!
|
Apr 9 | 8:30 PM |
Mark M. |
tell your friends!
|
Mark M. |
:-)
|
sudokai |
Okay, sure!
|
sudokai |
I think people are afraid of books
|
sudokai |
Because 1. there are a lot of words
|
sudokai |
2. A lot of them, if not most, are outdated
|
sudokai |
I've been burned so many times by Manning and OReilly
|
sudokai |
Elasticsearch in Action. The day the book came out, none of the sample code worked.
|
sudokai |
Because weeks before, a major version of Elasticsearch had been relesed.
|
Mark M. |
classic print publishing lead times are a problem
|
sudokai |
I think Explore Android is the sweet spot.
|
sudokai |
For learning.
|
sudokai |
Then The Busy Guide for reference.
|
sudokai |
Like I need to work with NFC. Okay, I got a chapter on that.
|
Mark M. |
that chapter hopefully holds up, but I probably have not touched it in 5 years
|
sudokai |
Well, I don't mind sending you emails if I find anything out of date.
|
Mark M. |
on the whole, consider *The Busy Coder's Guide* to be something to set you in a direction to go, but there may be some adjustments needed
|
Apr 9 | 8:35 PM |
Mark M. |
though in NFC, the only thing I can think of is that Android Beam got dropped
|
Mark M. |
so the APIs that I discuss should still be fairly relevant
|
sudokai |
btw, I think there's another instance of the same errata I sent you a while back
|
sudokai |
Towards the end of Explore Android
|
sudokai |
viewLifecycleOwner
|
sudokai |
Do you remember?
|
Mark M. |
I remember you pointing out a bug where I missed using it
|
sudokai |
I'll try to find the exact page
|
sudokai |
Yes, so there's another place
|
sudokai |
Where instead of using viewLifecycleOwner, you use this
|
Mark M. |
OK, I'll keep an eye out for it as I go through the current round of revisions
|
Mark M. |
the problem is that "this" compiles so nicely... :-)
|
sudokai |
Well, I get a nice red lint error
|
sudokai |
Anyway, I think I gtg. Talk to you next time Mark! I'll try to find this page on the book.
|
Mark M. |
thanks!
|
Mark M. |
and have a pleasant day!
|
sudokai |
You too!
|
sudokai | has left the room |
Mark M. | turned off guest access |