Mar 24 | 7:55 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Mar 24 | 8:00 PM |
scottt | has entered the room |
Mark M. |
howdy, scottt
|
scottt |
hello, who r u tonight?
|
Mark M. |
?
|
scottt |
ihow
|
scottt |
how
|
scottt |
doh!
|
Mark M. |
ah
|
Mark M. |
OK, though the hotel Internet is out, so I'm on a tether
|
Mark M. |
how can I help you today?
|
Mar 24 | 8:05 PM |
Julius | has entered the room |
scottt |
well, i'm realizing i dont quite understand the implications and trade-offs of setting target and min sdk
|
Mark M. |
OK
|
Mark M. |
(btw, howdy, Julius)
|
scottt |
i saw some confilicting things about what hey do
|
Mark M. |
targetSdkVersion has minimal effect AFAIK until API level 11 (a.k.a. Honeycomb)
|
scottt |
but it looks like minSdk is easy -- what's the lowest device version that will run your app
|
Mark M. |
right
|
Mark M. |
targetSdkVersion is "what version of Android was I thinking of when I wrote this code"
|
Mark M. |
and, for Honeycomb, a targetSdkVersion of 11 will mean you want to enable the HC look and feel
|
Mark M. |
Julius: do you have a question?
|
Mar 24 | 8:10 PM |
scottt |
ok
|
Mar 24 | 8:10 PM |
Mike R. | has entered the room |
scottt |
i was considering the answers here: http://stackoverflow.com/questions/4568267…
|
Mark M. |
howdy, Mike R
|
Julius |
hi yes
|
Mike R. |
Hi Mark
|
scottt |
it appears theres the idea that it might effect compatibility mode or it might be so that you could not conditional code paths
|
Julius | has left the room |
scottt |
jump in julious and mike
|
Mike R. |
the floor is open?
|
scottt |
"could not" = "could run"
|
Mark M. |
scottt: there definitely is some forward-compatibility support that targetSdkVersion could affect
|
Will T. | has entered the room |
Mark M. |
however, it should not affect conditional code paths
|
Mark M. |
Mike: hold on one moment
|
Will T. |
Hi
|
scottt |
ok, thx
|
Mark M. |
Mike: go ahead
|
Mark M. |
(howdy, Will)
|
Mike R. |
ok. working on a new release of our app.
|
Mike R. |
Want to test how the new release will function when existing users upgrade
|
Mike R. |
but, can't just download existing release from Market and try to run the upgrade against it - different signatures.
|
Mike R. |
is there a way to test how an app in the Market will upgrade?
|
Mark M. |
different signatures?
|
Mar 24 | 8:15 PM |
Mark M. |
you should be testing with the signature you're going to really use
|
Mike R. |
ok. how do I sign with the production keystore and install on the device?
|
Mark M. |
the same way you did it the first time
|
Mike R. |
when I did it the first time, i used the debug keystore
|
Mark M. |
not on the Market, you didn't
|
Mike R. |
ok. I signed with the production key and uploaded the app to the Market.
|
Mark M. |
Market will not accept debug keystores
|
Mark M. |
right
|
Mark M. |
so sign the new version with the production key
|
Mark M. |
in terms of testing the upgrade, I'd download it from a Web site
|
Mike R. |
ok. So now we're into Eclipse territory?
|
Mark M. |
you can either use Eclipse or not use Eclipse for the signing, AFAIK
|
Mark M. |
in terms of downloading the signed APK from a Web site, Eclipse would not be directly involved
|
Mike R. |
ok. i know 2 ways to install an app on a device.
First, download from Market. Second, build and run in Eclipse. Is
there another way?
|
Mark M. |
tons
|
Mar 24 | 8:20 PM |
Mark M. |
download it from a Web site configured with the proper MIME type
|
Mark M. |
copy it to external storage and install it using a file manager (e.g., Astro)
|
Mike R. |
i suppose this is in your book
|
Mark M. |
possibly in the Production chapter of the Advanced Android book, I forget
|
Mark M. |
I'd go the download route
|
Mike R. |
i'll check it out. That probably answers my question about distributing to beta testers.
|
Mark M. |
but external storage, or an email attachment (with the right MIME type), are also valid options
|
Mike R. |
thanks mark
|
Mark M. |
a related easy solution is to toss it in a Dropbox
|
Mark M. |
Dropbox and Amazon S3 are already pre-configured with the APK MIME type
|
Mark M. |
Will: do you have a question?
|
Mike R. | has left the room |
Will T. |
I am having a problem getting a listview to
display its items in a tabhost when I use an AsyncTask to load the data
into the listview. I'm using TabHost.TabContentFactory. The
onPostExecute method calls a handler in my TabActivity to refresh the
underlying adapter. I'm doing something dumb but can't figure it out.
What should I be watching out for?
|
Will T. |
i had too much time...:)
|
Mark M. |
well, I don't really have any idea what you should be "watching out for"
|
Mark M. |
what exactly are your symptoms?
|
Mark M. |
"a problem" isn't much for me to go on
|
Julius | has entered the room |
Will T. |
The splash screen shows and then the expected
indeterminate progress dialog. Then my tabs show up but nothing displays
in the list
|
Mark M. |
oK
|
Will T. |
at startup..
|
Mark M. |
have you used breakpoints or Log.d() calls to see what of your onPostExecute() logic is getting called?
|
Mar 24 | 8:25 PM |
Will T. |
onPostExecute is getting called and so is the handler it calls
|
Will T. |
the progress dialog does not go away after my last change, but that is a result of the last attempt
|
Mark M. |
not sure why you're bothering with a Handler here, since onPostExecute() is being called on the main application thread
|
Will T. |
i've tried it both ways...
|
Mark M. |
but regardless, there's not a lot I can tell you
|
Will T. |
At first the tabcontentfactory was in a separate class
|
Mark M. |
either your data is not getting to the Adapter, or
the Adapter is not attached to an AdapterView, or the AdapterView is
not on the screen
|
Will T. |
is there a way for me to tell which of those might be the cause of my problem?
|
Mark M. |
the latter you would determine via Hierarchy View
|
Mark M. |
the first two by standard debugging
|
Will T. |
never used it...
|
Will T. |
I'm fairly sure the first two are good, according to my debugging...
|
Julius |
(hi again)
|
Mark M. |
Julius: want to try your question again?
|
Julius |
Hi, yes, I'm having all sorts of trouble changing
the style of tabs. I can change the text colour based on state
(selector) and also the background of the tab, however I don't know how
to change the bottom of the tabs. Do you know where I might find out
about this?
|
Mark M. |
if you mean that grey strip at the bottom, I haven't a clue
|
Julius |
yeah it's driving me up the wall :)
|
Mark M. |
I made a suggestion once regarding it on StackOverflow and was told it didn't work
|
Mar 24 | 8:30 PM |
Julius |
I'm going to try making a view and putting an ImageView at the bottom I think
|
Julius |
thank you
|
Mark M. |
My suggestion was the android:tabStripEnabled attribute on TabWidget, IIRC
|
Mark M. |
scottt: got another question?
|
scottt |
not at the moment
|
Mark M. |
OK
|
Mark M. |
Will: do you have another question?
|
Will T. |
I'm playing with hierarchy viewer, may ask more later...
|
Will T. |
Thanks!
|
Mark M. |
if anyone comes up with a question, chime in
|
Julius | has left the room |
Mar 24 | 8:35 PM |
scottt |
what's the recommended way to determine min sdk req'd (other than trial-and-error)? is there a tool to assist?
|
Mark M. |
scottt: not really
|
Mar 24 | 8:40 PM |
Mark M. |
you can temporarily see where you are using newer
APIs by dropping your build target to a lower level and seeing where you
fail the compile
|
Mark M. |
that will give you some idea of places that are more likely to need testing
|
scottt |
ok thx
|
Mar 24 | 8:45 PM |
Will T. |
Is it ok if I post some code about my problem?
|
Mark M. |
I would recommend you post it to a paste site like gist.github.com
|
Mark M. |
then post the link here
|
Will T. |
The relevant pieces are about 20 lines...
|
Mar 24 | 8:50 PM |
Mark M. |
code just sometimes gets messed up when pasted inline in the chat
|
Will T. |
looking at gist...
|
Mar 24 | 8:55 PM |
Will T. | |
Will T. |
formatting got messed up but hopefully you get the gist...
|
Mark M. |
pun intended? :-)
|
Will T. |
;)
|
Mark M. |
anyway, is the MergeAdapter there my MergeAdapter (cwac-merge)?
|
Will T. |
yup
|
Will T. |
got a lot of stuff going in the viewmodel classes. that code has worked well for weeks
|
Mark M. |
well, you could try temporarily pulling MergeAdapter out of there
|
Mark M. |
to see if the problem is in my code
|
Will T. |
i tried BaseAdapter, no diff
|
Mark M. |
what did Hierarchy Viewer tell you?
|
Will T. |
is there anything wrong with the general approach?
|
Will T. |
The creation of the view before async, etc?
|
Will T. |
I'm wondering if something is getting lost in translation
|
Mar 24 | 9:00 PM |
Mark M. |
well, to be honest, it's a bit tough to follow
|
Will T. |
i need to play with it more
|
Mark M. |
most of your code is referring to your own classes
|
Will T. |
yea
|
Mark M. |
ignoring your real problem for the moment, I do not recommend attempting to reference Views in doInBackground()
|
Mark M. |
(or anything else related to the Activity)
|
Will T. |
ok, how would you approach it?
|
Mark M. |
you might be undergoing a configuration change (e.g., rotation)
|
Mark M. |
ummm...I'd just not touch views or the activity in doInBackground() -- wait until onPostExecute()
|
Mark M. |
see the Threads and Rotation section in the Threads(?) chapter of The BCG to Android Development
|
Will T. |
even if your adapter has a custom getView?
|
Mark M. |
it doesn't matter
|
Mark M. |
again, the problem is that if the user rotates the screen, your old activity is destroyed and the new one is created
|
Will T. |
so what would you return from the class that creates the listview?
|
Will T. |
i get that...
|
Mark M. |
oh, well, you're probably going to have to rethink what the task is doing
|
Mark M. |
the background stuff should be pure model
|
Mark M. |
all view stuff should be in onPostExecute()
|
Mark M. |
and the AsyncTask should be a static inner class or a separate class entirely
|
Mark M. |
again, see the Threads and Rotation section in the Threads(?) chapter of The BCG to Android Development
|
Mark M. |
relatively new material (probably added in the last six months)
|
Will T. |
pulling the book up now
|
Mark M. |
anyway, I need to end the chat for the evening
|
scottt |
thanks Mark! have a good one
|
Will T. |
thanks for the help!
|
Will T. |
and for the other stuff you do
|
Mark M. |
next week's are 10am and 4pm Eastern
|
Mark M. |
you're very welcome
|
Mar 24 | 9:05 PM |
Mark M. |
have a pleasant evening!
|
Mar 24 | 9:05 PM |
scottt | has left the room |
Will T. | has left the room |
Mark M. | turned off guest access |
Mar 24 | 9:20 PM |
Mark M. | has left the room |