Office Hours — Today, November 29

Sunday, November 24

Nov 29
7:20 PM
Mark M.
has entered the room
Mark M.
turned on guest access
7:45 PM
Pao
has entered the room
Mark M.
hello, Pao!
how can I help you today?
Pao
Hi Mark, I have 2 questions. The first one is the difference about `test` and `androidTest` in an android project. I know these can be used for unit testing but do I need to have duplicated tests for a certain class that should exists in both directories?
Mark M.
most of the time, you test one app class either using instrumented tests (androidTest/) or unit tests (test/)
sometimes, though, while you would prefer to test the app class with unit tests (as they run faster), some features of the app class are too tightly tied to Android
in that case, you might wind up testing different parts of the app class in androidTest/ and test/
however, you should not need *duplicated* tests
Pao
Ohhhh. I see, so basically the test requires android stuff it goes to `androidTest/` and I don't need to do it in `test/`. I get it now. Thanks!
7:50 PM
Pao
Is it storing the API keys in Android Native Module good enough layer for an additional protection of API keys?
Btw, that's my second question :)
Mark M.
storing API keys in NDK code (C/C++) does virtually nothing to help secure them
anybody talented enough to want to get your API keys will be talented enough to get to them regardless of where in the APK that they reside
Pao
Okay, so additional effort will be useless. Since, there's no bullet proof solution to it.
Mark M.
the NDK trick isn't even a decent "speed bump" to slow people down
let alone a bulletproof solution
Pao
I thought storing the API keys in NDK will have another layer of protection
Mark M.
it does, but that layer is not very good and IMHO is not worth the headache
in general, there is no bulletproof solution, unless the provider of the API offers one
7:55 PM
Pao
I see. Thanks Mark! That's all for me today :)
Have a great day or night! Thank you for the answers
Mark M.
OK, sounds good!
you're welcome!
Pao
has left the room
8:10 PM
Joel
has entered the room
Mark M.
hello, Joel!
how can I help you today?
8:15 PM
Joel
hi, Im actually the person who posted about how to build mobile app in object oriented way in commonsware community
Mark M.
OK -- hi!
Joel
what im having problem about is the fact that i dont know where to start in terms of starting to visualize the components in mobile app
Mark M.
for your very first Android app, I would start by thinking about what screens you want, and then work your way inwards from there
right now, I recommend that your top priority be to learn how Android works
Joel
for example if within a normal software application, i will just need to draw class diagram and identify what are the necessary classes and objects to determine how program works
8:20 PM
Joel
but as for mobile app im quite clueless on it
Mark M.
I have not seen anyone create a class diagram in 20 years or so
I guess some people still do that
Joel
could you just maybe describe a general way as to how people normally work their way up in mobile app development
cause im trying to get a job by my own through self learning so i will need to develop a prototype in proving my ability
Mark M.
well, you have access to some books, through the Warescription -- you could read *Elements of Android Jetpack* (a traditional programming guide) or *Exploring Android* (a set of tutorials to help you build an app)
in terms of "proving my ability", worry about that later
right now, focus on learning how Android works, by creating "throwaway" apps, ones that require no real design work
as you gain some experience with the Android framework and the requirements it imposes, things like that YouTube video on Android architecture will start to make a bit more sense
Joel
does the book you mentioned using Java language
Mark M.
and then you can start to work out how you preferred software design approaches fit modern Android architectures
*Elements of Android Jetpack* shows both Java and Kotlin for the vast majority of the book, with a couple of chapters purely showing Kotlin
*Exploring Android* uses Kotlin
8:25 PM
Joel
what does the android jetpack includes
Mark M.
Jetpack is a "brand" that Google is applying to a lot of existing technology and some new stuff: https://developer.android.com/jetpack
of those, the things that nearly all developers use include: AppCompat, Test, Lifecycles, LiveData, ViewModel, Permissions, Fragment, and Layout
(all of which pre-date the "Jetpack" branding)
some of the other things listed on that page, like data binding, navigation, Room, and WorkManager, are popular but are not needed by every app
8:30 PM
Joel
so mobile app design is very different from other software in terms of design approach?
Mark M.
I would phrase it more as: software design fills in the gaps between the platform, the architecture, and the business requirements
as such, software design needs to take the platform and architecture into account
you would not design a Web service the same way that you would design a mobile app
*elements* of OO design techniques may be valid for both cases, but the way those elements get applied may differ
that is all the time that I have for today
Joel
could you provide an example on that?
Mark M.
the chat transcript will be posted to https://commonsware.com/office-hours/ shortly
and the next chat is scheduled for tomorrow at 8:30am US Eastern (so, 12 hours from now)
have a pleasant day!
Joel
ok thx
Joel
has left the room
Mark M.
turned off guest access

Sunday, November 24

 

Office Hours

People in this transcript

  • Joel
  • Mark Murphy
  • Pao