Office Hours — Today, May 14

Thursday, May 12

May 14
3:55 PM
Mark M.
has entered the room
Mark M.
turned on guest access
4:00 PM
Steve S.
has entered the room
Steve S.
Hi Mark how are you!
Mark M.
hello, Steve!
sorry for the delay
how can I help you?
Steve S.
I was asking you about remote logging last time and wanted to follow up on something you said.
Mark M.
yup, I remember
4:05 PM
Mark M.
you're creating a coffee maker killbot, IIRC :-)
Steve S.
You mentioned using an analytics framework as another option, and I thought I might have given it short shrift, so I wanted to ask a couple of questions about that approach.
Exactly!
Mark M.
there are worse ways to go, I guess
(referring to being killed by a coffee maker, not referring to analytics)
Steve S.
Are there analytics frameworks that we could use to get data from the app in an arbitrary format (e.g. csv)?
Mark M.
well, most people use some hosted analytics service
Steve S.
ok.
Mark M.
personally, I don't use them, but if they don't support some form of data export, that would stun me
I seem to recall that there's a couple of open source analytics servers, so you could host your own
then, even if the server itself does not offer an export facility, you can probably cook one up by hitting the database directly
I mentioned analytics simply because those APIs are designed around event counts
and so they might be more amenable to your situation than would trying to get the data out of logs
but, it all depends on what Crashlytics offers in terms of custom log access compared to whatever you would use for analytics
Steve S.
Right. And my assumption was that we would want to use those frameworks if we wanted them to do the analytics for us. But we want to do the analytics ourselves, so need to get the raw data.
Mark M.
well, the real solution there is to have your own Web service, but we discussed that
4:10 PM
Mark M.
one of the open source analytics options may work for you
hmmm... I thought that there was a second one, but I'm not seeing it on the Android Arsenal...
Steve S.
Great. For this particular project, we need to something up and running ASAP that is minimally invasive (i.e. requires adding as little code as possible). That's why I'm thinking in terms of Crashlytics + a logging library rather than using a web service (that will come later).
Mark M.
yup, understood
perhaps more important than finding a better solution than logging is having a clear vision for how you are going to eventually migrate from logging to some new solution
basically, try not to paint yourself into a corner with your initial implementation
such that you find that you're stuck with the logging solution until the end of time
Steve S.
Sure, I understand. I will check out analytics frameworks including the one you mentioned to see if those might be helpful.
Mark M.
I'm not a big analytics guy, which is why I can't say "oh, just use X, it'll fit your needs exactly"
I'm reasonably certain that it is a closer match to your needs than is logging, but whether there is something that meets all your criteria is another matter
Steve S.
That makes sense. It sounds like it's worth taking a look as it might be another possibility.
4:15 PM
Steve S.
I don't really have anything further to ask at this point. Thank you for your help!
4:15 PM
Mark M.
you're welcome
Steve S.
Have a nice afternoon1
Mark M.
you too! (or whatever unit of day is suitable for your location)
Steve S.
has left the room
4:35 PM
yacire.elrhomari@gmail.com
has entered the room
yacire.elrhomari@gmail.com
Hi Mark
Mark M.
hello!
how can I help you?
4:40 PM
yacire.elrhomari@gmail.com
I need your help, i have a question about the overflow menu. I want to change the background color when i click on an item but my code doesn't work. I have a link where i explained better the issue on stackOverflow
Mark M.
I am not sure that I can help you, but if you post a link here, I can look at the question
yacire.elrhomari@gmail.com
Thanks
Mark M.
what resource is represented by your second XML file?
4:45 PM
yacire.elrhomari@gmail.com
I have a selector balise with two item in my drawable file
Mark M.
you mention the term "balise"
however, there is nothing named "balise" in your style resources
in your first XML file (with the style resources), are you referring to the second XML file? if so, where?
yacire.elrhomari@gmail.com
sorry, it french word, its tag. I have a selector tag in my xml file, but on Stack there is a problem with the <selector> tag
Yes, here: <item name="popupMenuStyle">@style/background_action_menu_overflow_textcolor</item>
View paste
and here:  <style name="background_action_menu_overflow_textcolor" parent="Widget.AppCompat.Light.PopupMenu.Overflow">

    <item name="android:popupBackground">@drawable/background_action_menu_overflow_textcolor</item>
</style>
4:50 PM
Mark M.
are you sure that you should be using android:popupBackground? usually with appcompat-v7, there is no android: prefix
for example, is that how Widget.AppCompat.Light.PopupMenu.Overflow defines the popup background?
yacire.elrhomari@gmail.com
Yes, otherwise i have this error if i use <item name=popupBackground .../> : Error:(44, 5) No resource found that matches the given name: attr 'popupBackground'.
Mark M.
looking at the styles.xml in appcompat-v7, I do not see that Widget.AppCompat.Light.PopupMenu.Overflow uses android:popupBackground
oh, no, wait, it is getting that from Widget.AppCompat.ListPopupWindow, I think
yacire.elrhomari@gmail.com
I check
Mark M.
<item name="android:popupBackground">@drawable/abc_popup_background_mtrl_mult</item>
yacire.elrhomari@gmail.com
ok
4:55 PM
Mark M.
interestingly, @drawable/abc_popup_background_mtrl_mult seems to be a PNG file
yacire.elrhomari@gmail.com
Yes, so i need to give a reference to a png file to <item name:android:popupBackground.../> ??
Mark M.
not necessarily
yacire.elrhomari@gmail.com
ok
Mark M.
try changing android:popupBackground to just be your color
rather than the <selector>
it may be that the state is not changing the way you think it is, which is why the <selector> is not triggering your expected color
yacire.elrhomari@gmail.com
I tested it, the background color change, but i want the background color change when i click on text button in overflow menu
yes i don't understand how it works
Mark M.
since the overflow is a ListPopupMenu, you might research how to change the color the way you want on a ListPopupMenu, then try adjusting your style that way
I have not played around with ListPopupMenu much myself
but, if I were in your situation, that is where I would start looking
5:00 PM
yacire.elrhomari@gmail.com
ok thanks a lot
i will see that way
Mark M.
that is the end of today's office hours chat
the transcript will be posted to https://commonsware.com/office-hours/ shortly
the next chat is Monday, at 4pm US Eastern
have a pleasant day!
yacire.elrhomari@gmail.com
ok, bye :)
yacire.elrhomari@gmail.com
has left the room
Mark M.
turned off guest access

Thursday, May 12

 

Office Hours

People in this transcript

  • Mark Murphy
  • Steve S.
  • yacire.elrhomari@gmail.com