Office Hours — Today, July 13

Yesterday, July 12

Jul 13
3:50 PM
Mark M.
has entered the room
Mark M.
turned on guest access
3:55 PM
Ron
has entered the room
Mark M.
hello, Ron!
how can I help you today?
Ron
View paste
Hello, 
We want to implement obfuscation with ProGuard in our Android Studio project but we don't want to implement minify 

yet. Is this possible?
Mark M.
hmmm... usually, people want to do the opposite...
-dontshrink should do what you want, though
Ron
We are more worried about someone reverse engineering our product at this point.
4:00 PM
Ron
Okay, I'll try that tonight, also...
We brought over a ProGuard.cfg file from another Eclipse based project but it blew up with LOTS of errors/warnings? We did some research on the errors/warnings and decided that the minify was too complicated for us to attempt to use at this point.
Mark M.
um, for anyone with any talent, ProGuard is not going to help with blocking reverse-engineering
Ron
Yeah we are aware of that but it satisfies our management for now.
Mark M.
ha!
ok
Ron
View paste
We have read documentation that indicates we can use provided default ProGuard files that come with the SDK but we 

recently opened the file up and looked at it and it said it was no longer used. Where can we find definitive info on 

what is required to implement ProGuard? (There seems to be a lot of misinformation on the 'net!)
Mark M.
that will cover the integration of ProGuard into the build process
Ron
View paste

We will play with this tonight and will most likely have additional questions tomorrow night!
Mark M.
OK
Ron
That's all for today, thanks again!
Mark M.
you
you're welcome!
Ron
has left the room
Steve S.
has entered the room
Mark M.
hello, Steve!
Steve S.
Hi, Mark!
Mark M.
how can I help you today?
Steve S.
Let me paste my question:
I'm starting a new project that has a lot of resources and am trying to figure out a good way to organize them - e.g. using folders, plugins, or naming conventions. Is there anything in your book about this? Do you have any suggestions or recommendations?
Mark M.
well, you cannot use folders, other than for their official use in organizing by type (layout, drawable, etc.) and qualfiers (e.g., -v21, -xxhdpi)
Steve S.
Ok
Mark M.
in particular, you cannot have sub-folders in a resource folder
so, you cannot have res/layout-sw600dp/foo/
naming conventions is fairly common, particularly prefixes to control how they sort
I'm not sure what plugins might offer here
4:05 PM
Steve S.
There's a grouping pugin that I've seen recommended, but it depends on prefixes anyway.
Mark M.
I'm guessing that you mean one like this: http://android-arsenal.com/details/1/2201
Steve S.
Yes, that's the one.
Mark M.
AFAIK, that's about the best that you can do
other than to sit back and ponder whether you should have so many resources :-)
Steve S.
Good question. To some extent it's out of my control since it's based on someone else's design.
Mark M.
ah
Steve S.
One thing that I have done is to use includes with layouts to try to make them more modular. Maybe I should try to limit my use of includes?
4:10 PM
Mark M.
that depends on whether they are being reused
busting up a single-use layout into five single-use layouts isn't something that I would do
OTOH, breaking out a layout that will appear in several other layouts makes sense
Steve S.
Ok. I'll take another look at that since a lot of them are single-use layouts. That may be one way to improve how I'm dealing with resources.
Regarding the use of names and prefixes, are there any conventions that it would be good for me to follow?
Mark M.
AFAIK, it's mostly "whatever feels good"
Steve S.
OK.
Mark M.
so, you might organize by activity, by major functional area, etc.
Steve S.
Are there any projects you could point me to that I could use as models?
Mark M.
not really
I haven't spent time looking over larger open source projects
Steve S.
Ok.
Mark M.
and smaller ones don't usually have the issue
you might see how Google approaches their various AOSP apps
4:15 PM
Steve S.
Great. I'll take a look.
Mark M.
when I look at those apps, I am usually focused on some specific thing, not looking at "the big picture" of stuff like resource organization
Steve S.
I'll follow up on your suggestions.
Any further tips or ideas?
Mark M.
um, wear sunscreen?
I don't have anything general, though I'm up for more specific questions
4:20 PM
Steve S.
The main thing I'm going to do now is to see about combining my single-use layouts into larger ones. My concern about that was that they become unwieldy, but it sounds like breaking them up into more manageable sizes has the downside of making the files harder to organize and keep track of.
Mark M.
yes
you need to decide which pain is less painful
Steve S.
Right, Thanks so much! I appreciate your hep.
*help
Mark M.
happy to be useful!
Steve S.
Have a good rest of the day!
Mark M.
you too!
Steve S.
has left the room
4:30 PM
ndrocchietto_ivano
has entered the room
Mark M.
hello, Ivano!
how can I help you today?
ndrocchietto_ivano
Hello Mark,
one min that I select which question I would like to ask you today
View paste
here it is! When I hope the call of a method to the API( in better words, when I see the Android SDK class of a method) sometimes I see: throw new RuntimeException("Stub!");
Mark M.
I am not sure what "hope the call of a method" means
throw new RuntimeException("Stub!") is the implementation of every Android SDK method in the android.jar file that you are compiling against
ndrocchietto_ivano
hope=open*
Mark M.
at runtime, you are linking to the real android.jar that has the real method implementation
what are you using for your IDE?
ndrocchietto_ivano
AS
2.1
4:35 PM
ndrocchietto_ivano
Ah maybe I see. is a kind of Context. the real method implementation will be made depending by my program
Mark M.
if you have the source code downloaded in the SDK Manager for whatever API level you are using for your compileSdkVersion, you should be able to see the real implementation
what you are getting right now is a decompiled implementation from your local android.jar
ndrocchietto_ivano
ah OK
you know really a lot of stuff. Thanks
Mark M.
happy to help
ndrocchietto_ivano
have a nice afternoon further!
Mark M.
thanks! have a nice, um, whatever time period is relevant for you! (evening?)
ndrocchietto_ivano
evening, I am afraid will skip the next two appointments, that in Amsterdam will be 1:30 am and are working day, but speak with you soon next Thursday indeed
Mark M.
OK
4:55 PM
Mark M.
that is a wrap for today's chat
the transcript will be posted to https://commonsware.com/office-hours/ shortly
the next chat is tomorrow at 7:30pm US Eastern
have a pleasant day!
5:00 PM
ndrocchietto_ivano
thanks
ndrocchietto_ivano
has left the room
Mark M.
turned off guest access

Yesterday, July 12

 

Office Hours

People in this transcript

  • Mark Murphy
  • ndrocchietto_ivano
  • Ron
  • Steve S