Feb 10 | 7:25 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Feb 10 | 7:40 PM |
Venkat | has entered the room |
Venkat |
Good day Mark
|
Mark M. |
hello, Venkat
|
Mark M. |
how can I help you today?
|
Venkat |
Tutorial #6 - adding a library: you look at adding compiled jars
|
Venkat |
However I need to add .java files thats what the installation nodes for https://github.com/quemb/QMBForm say
|
Venkat |
add the complete folder to my android studio project
|
Mark M. |
yes, I see that in the Installation section of the README
|
Feb 10 | 7:45 PM |
Venkat |
But I try, I get compilation errors that the package is not found
|
Venkat |
would you be having similar step by step instructions as in tutorial , but for adding the source of a library?
|
Mark M. |
no, sorry
|
Johnny | has entered the room |
Mark M. |
but it's not that difficult
|
Mark M. |
(BTW, hello, Johnny -- I will be with you shortly!0
|
Mark M. |
...er, shortly!)
|
Johnny |
Hi Mark
|
Johnny |
No worries
|
Mark M. |
Venkat: when you downloaded and set up the library, did you modify your settings.gradle file and your build.gradle file of your app to reflect the library?
|
Venkat |
settings.gradle - yes
|
Venkat |
build.gradle - what do I need to do?
|
Mark M. |
your app module's build.gradle file would need a compile project(:...) line in the dependencies closure
|
Mark M. |
where ... is replaced by the location of the library module
|
Venkat |
ok, thanks ... will give it a try
|
Mark M. |
so, for example, if your project root has your app in app/ and this library in qbform/
|
Mark M. |
your settings.gradle would have :app and :qbform
|
Mark M. |
and your app'
|
Mark M. |
and your app's build.gradle would have compile project(':qbform')
|
Venkat |
thank you!
|
Mark M. |
my CWAC libraries are mostly set up this way
|
Venkat |
ok
|
Mark M. |
so if you peek at the Gradle files for a library like https://github.com/commonsguy/cwac-richedit you will see how they get connected
|
Feb 10 | 7:50 PM |
Mark M. |
and with that, let me take a question from Johnny, and I will be back with you shortly
|
Mark M. |
Johnny: your turn! do you have a question?
|
Johnny |
View paste
|
Mark M. |
Android does not strictly follow MVC, MVP, MVVM, etc.
|
Mark M. |
you'll find various blog posts and such that describe how to shoehorn Android into those sorts of GUI architectures
|
Mark M. |
personally, I don't get too hung up on any of them
|
Mark M. |
again, mostly because Android's not a specific fit for any
|
Mark M. |
I tend to think in terms of MVC, in part because that's the only one of those GUI architectures that I have ever used
|
Mark M. |
that's not to say that MVP, MVVM, etc. are bad, or worse for Android -- I'm just not familiar with the nuances
|
Johnny |
I see, thanks. How would you structure your project for unit testing?
|
Mark M. |
well, I'm certainly a fan of Android Studio/Gradle for Android's project structure, where the test code can go in the androidTest/ sourceset
|
Mark M. |
beyond that, I'm not a big fan of scripted GUI testing, so I usually focus on model-level stuff
|
Feb 10 | 7:55 PM |
Mark M. |
my guess is that these answers aren't helping you much :-)
|
Johnny |
Thank you! One last question if you wouldn't mind. I've only become aware of these concepts but would you recommend we use dependency injection and functional reactive programming for Android programming?
|
Mark M. |
there are lots of DI fans
|
Mark M. |
it's one of those things I never really got into in pre-Android Java development
|
Johnny |
Haha it's giving me a general direction of where I should focus my energy :)
|
Mark M. |
and so I personally haven't used it
|
Mark M. |
RxJava is "the new black", and frankly I haven't figured out what all the fuss is about
|
Mark M. |
I'm happy with event buses
|
Mark M. |
but, again, there are power developers (e.g., anyone who works at Square) who swear by both of them
|
Johnny |
Yes I was thinking of using Otto for my new project
|
Mark M. |
I'm more of a greenrobot EvenBus fan, personally, just because I like the more flexible threading options
|
Mark M. |
but Otto is cool
|
Mark M. |
either are better than LocalBroadcastManager, in terms of verbosity
|
Mark M. |
let me take another question from Venkat, and I will be back with you in a bit
|
Feb 10 | 8:00 PM |
Mark M. |
Venkat: your turn! do you have another question?
|
Johnny |
Thanks Mark for your help, that's all from me :)
|
Venkat |
That fixed the compile errors, thank you!
|
Johnny | has left the room |
Mark M. |
it would certainly be easier if that library were available as an AAR artifact from a repository
|
Mark M. |
but, I'm glad that you got it going
|
Venkat |
Thats all from me
|
Venkat | has left the room |
Feb 10 | 8:30 PM |
Mark M. | turned off guest access |