Office Hours — Today, September 11

Thursday, September 6

Sep 11
9:40 AM
Mark M.
has entered the room
9:45 AM
Mark M.
turned on guest access
Mark M.
has entered the room
Mark M.
has left the room
Mark M.
has entered the room
Mark M.
has left the room
Dom
has entered the room
Dom
Hi Mark
Mark M.
howdy, Dom!
how can I help you today?
Dom
I was wondering, in ICS, are locations cached on the device anymore. (Formerly there was 200 wifi locations and 50 cell locations stored I think)
Mark M.
I have no idea, sorry
Dom
ok, no worries
9:50 AM
Dom
The reason I asked was becuase the location cache viewer in the Play store doesn't work on ICS anymore, which made me think perhaps google isn't storing this info on phone anymore
Mark M.
since they caught a bunch of flak for doing it in the first place, it would not surprise me if they stopped
or at least changed the conditions under which you can get to it
Dom
yeah, i agree, ok, thats all really I had to ask
chat to you again!
:)
Mark M.
OK
10:00 AM
Paul L.
has entered the room
Paul L.
Hello Mark
Mark M.
howdy, Paul!
how can I help you today?
Paul L.
does audio work? Can you hear me?
Mark M.
audio?
I am not aware that Campfire supports audio
Paul L.
lol, I hear a beep each time someone types. I was hoping I could talk. anyway...
Mark M.
regardless, I definitely cannot hear you, nor would I expect to
sorry, you're stuck with ASCII :-)
Paul L.
I have a main Activity with a TabHost. (this will take me a bit to type the whole thing)
then in the TabHost I have several tabs, each whose content comes from an activity started with an Intent.
I need to be able to programatically add and remove tabs, which I have working. but...
10:05 AM
Paul L.
when I remove a tab, to prevent memory leaks, I should call finish() in the Activity that was in the content of the removed tab. When I do so, the main activity closes.
How to destruct the activity that was in the tab w/o closing the main tab host activity?
Mark M.
first, activities-in-tabs has been deprecated for 18 months or so
when they deprecated ActivityGroup
Paul L.
yes, and I may look at other ways to do this project, but right now we have to use tabs
Mark M.
the point isn't the tabs, it's the nested activities
Paul L.
ok
Mark M.
again, it is activities-in-tabs that is deprecated
tunneling
has entered the room
Mark M.
as I have avoided activities-in-tabs like the plague for a long time (well before they were deprecated), I do not know any particular recommendation for cleanup after removing such a tab
(BTW, howdy, tunneling!)
tunneling
howdy!
Mark M.
however, I am not the least bit surprised that finish() finishes the TabActivity
the way activities-in-tabs "works" is that the content view is ripped out of the inner activity and moved to be owned by the TabActivity
various behaviors from the inner activity, as a result, will affect the TabActivity instead
rather than calling finish(), just make sure that you are cleaning up the stuff inside the tab as best you can
and really really really consider switching to another model
10:10 AM
Mark M.
(ViewPager with action bar tabs, ViewPager with PagerTabStrip, ViewPager with ViewPagerIndicator's tabs, just ordinary action bar tabs sans ViewPager, etc.)
Paul L.
suggestions for another model? We really want something that looks like traditional tabs.
Mark M.
I listed several
Dom
has left the room
Mark M.
there are also ways of using TabHost with views for the contents of the tabs (as shown in my book)
Paul L.
sorry, yes. our posts crossed. Good point - could use views
Mark M.
let me take a question from tunneling, and I'll swing back to you in a bit
tunneling: do you have a question?
OK
if either of you have a question, chime in
Paul L.
I think I'm good for now too Mark. Thanks.
10:15 AM
Paul L.
going back to work. Thanks again Mark. Have a good day.
Mark M.
you too!
Paul L.
has left the room
tunneling
sorry, had stepped away. i had a question, but I found where you had answered a similar question on stackoverflow. it's in regards to showing a spinner in the actionbar, and having tabbed navigation as well.
Mark M.
yeah, the default implementation of those are mutually exclusive
tunneling
wanted to use the spinner for major categories, and then swiping for filtering
10:20 AM
Mark M.
you could use the list navigation (Spinner) in the action bar, plus PagerTabStrip or something with a ViewPager for the tabs
tunneling
what had me confused is the documentation for wireframing (http://developer.android.com/training/desi…) seems to show both
the 'storylist'.
Mark M.
well, first, bear in mind that the people who wrote the design stuff didn't exactly spell out whether or not their designs are actually *possible*
there are plenty of suggestions that simply cannot be readily implemented
that being said, the look you see there could be what I suggested (list navigation in the action bar, plus a PagerTabStrip and ViewPager)
tunneling
ok, didn't know about the PagerTabStrip
Mark M.
yeah, they added that in a recent update to the Android Support package
there is also a tab indicator in Jake Wharton's ViewPagerIndicator library
Pavel A.
has entered the room
10:25 AM
Mark M.
howdy, Pavel!
Pavel: do you have a question?
Pavel A.
Simple one
Hellp
I'm new to OOP and Android.
What book you can recommend to obtain some base foundation of OOP
Mark M.
I learned OOP nearly two decades ago
whatever resources I used back then are long since out of date
any decent Java book should cover enough OOP for use in basic Android development
I am sorry that I do not have a more concrete recommendation for you
Pavel A.
Not a problem. Should I start java first?
Then go to android specific?
Gaurav B.
has entered the room
Gaurav B.
Hello
Mark M.
yes, I strongly recommend learning the basics of Java before getting into Android
Pavel A.
Ok, thank you, Mark.
Mark M.
(BTW, hello, Guarav!)
Gaurav B.
Sir I am a masters student In auburn university in Alabama
My adviser Dr. David Umphress suggested to take the subscription
Hello Mr. Mark
10:30 AM
Mark M.
Pavel: I have some Java topics you should learn here: http://commonsware.com/blog/2010/08/02/jav…
Guarav: thanks for subscribing!
but, do you have a specific question?
Gaurav B.
Yes . My master's thesis is based on assessing software process in android apps getting published in Google Play store
Is there any tool which I can use in order to assess the kind of software process followed by Android Application developers
Mark M.
what do you consider a "software process" to be?
Gaurav B.
Currently the strict mode has been introduced
Mark M.
(BTW, tunneling, if you have a follow-up question, chime in)
Pavel A.
Oh, I see, thank you, Mark! Now I know where to start. Bye-bye.
Gaurav B.
software process is kind of discipline which you follow while developing a software. Effort analysis, keeping a time log, keeping a check on the bugs which are there in the Android app.
Pavel A.
has left the room
Mark M.
Guarav: and what sort of "tool" would you expect to be able to "assess the kind of software process" *anyone* would use
?
a software process is something done in one's head
Gaurav B.
there is a rigorous testing procedure used by the App store for Iphone apps
Mark M.
you cannot look at a new building and determine if they used AutoCAD or hand-drawn blueprints in its construction, for example
10:35 AM
Mark M.
and that "rigorous testing procedure" has little to do with the "software process" followed by iOS developers
Gaurav B.
is there anything similar used by Android Play store for testing the authenticity of Android apps
Mark M.
no
at least, not up front
there is Bouncer, which does some automated scans for malware
Gaurav B.
where would you suggest me to start
Mark M.
but there is no known human intervention between when an app is uploaded to the Play Store and it is distributed
Gaurav B.
to at least assess the kind of software quality of the apps getting published in the Play store
Mark M.
how do you define "software quality"?
you toss these terms around like there is an industry standard definition
Gaurav B.
I understand. We can see the difference between android and Iphone apps
Android apps continously have problems
they hang or get closed suddenly
Mark M.
I am reasonably certain that there are buggy iOS apps as well
10:40 AM
Gaurav B.
In comparison there would be less
Mark M.
and your proof of this is... what, exactly?
(BTW, tunneling, if you have additional questions, chime in)
Gaurav B.
I do not have any proof only personal experience of two years
for example the simple app of temple run game used to continue hang on my galaxy s2 and galaxy tab but it used to run so smoothly on IPAD
So through my thesis
I want to discuss regarding all these issue
I wanted your guidance
tunneling
i have apps crash all the time on my iPad, but they just disappear versus letting me know that they have stopped
10:45 AM
Gaurav B.
I understand the flexibility which we get while developing android apps
Mark M.
Guarav: if you have questions regarding developing apps with the Android SDK, that is what the chat is for, and I can offer "guidance" on such topics
but I cannot provide guidance on unrelated topics like measuring "software process"
Gaurav B.
Sir I am developing an app for measuring the height of a device using the camera of the phone
tunneling
mark, the last time i was here we spoke a little bit about cleaning up threads
Mark M.
Guarav: wouldn't such an app have to make assumptions about the location of the camera on the device?
tunneling: I remember a bit of that discussion, yes
Gaurav B.
I completely understand your point also Mr. mark
tunneling
if I have a listview item, that runs off and tries to collect data, and then the User scrolls away, leaves the activity etc. what happens when i try to update a UI element? could that cause intermittent FC?
10:50 AM
Mark M.
tunneling: typically not, though it would depend a bit on what specifically you are doing and the actual exception that triggered the force-close
Guarav: the only way I can think of to use the camera to estimate device height would involve taking a picture of a ruler, and if you have a ruler, you may as well just measure the height directly :-)
Gaurav B.
Yes the app will have to make assumptions regarding the location of camera but how to use scaling in such an app
tunneling
so for example, i have list view with an icon on the left. i adjust the drawable based on a % value. I get the % value from a remote source, so I launch a thread to go off and collect the data when the listview's getView() is called.
Mark M.
Guarav: I do not know what you mean by "scaling" in this context
tunneling: what exception are you getting
?
Gaurav B.
To show scale or a ruler along with the camera when I try to use this app in order to measure the height of a device
tunneling
it just hit me that I may not be posting my updates to the UI thread
10:55 AM
Mark M.
tunneling: that should result in a fairly specific exception
Guarav: if you mean showing a scale alongside the camera preview, just put one adjacent to your SurfaceView
in terms of how to draw such a scale, that probably would need to be a custom widget
there is no Ruler widget in Android for creating that sort of UI, and I am unaware of any third-party libraries for it (though I have not been looking for one)
Gaurav B.
Are there any tutorials based on developing such a kind of widget
Mark M.
you might try to get away with an ImageView and a repeating background
I am sure that there are tutorials on it, but not in my book, as it would involve the 2D graphics API, which I have not covered
Gaurav B.
Ok I would look into 2D graphics API
and the tutorials with respect to that
Mark M.
that would be the Canvas class
11:00 AM
Gaurav B.
I will also look into using an ImageView
Mark M.
you would create an image for one segment of the ruler, and repeat that for as many segments as needed to fill the space
and that's a wrap for today's chat
the next one is Thursday 7:30pm Eastern
have a pleasant day, all!
Gaurav B.
Thanks for all your help sir.
Mark M.
has entered the room
Mark M.
has left the room
tunneling
has left the room
Gaurav B.
has left the room
Mark M.
turned off guest access

Thursday, September 6

 

Office Hours

People in this transcript

  • Dom
  • Gaurav Bhatnagar
  • Mark Murphy
  • Mark Murphy
  • Paul Levin
  • Pavel Avdeykin
  • tunneling