Nov 27 | 8:50 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Nov 27 | 8:55 AM |
Jeff J. | has entered the room |
Nov 27 | 9:00 AM |
Jeff J. | Morning |
Mark M. | Howdy, Jeff! |
Jeff J. | I've really enjoyed your books. Thought I'd hop in today and see what folks were up to. |
Mark M. | Thanks! |
Mark M. | The office hours chat room tends to be more tactical, for Q&A, than a place where people hang out. |
Jeff J. | Yeah...I read last weeks session. |
Mark M. | And, in particular, these morning slots are less popular than the evening ones. |
Mark M. | Which is odd, since a fair number of subscribers are in Europe. |
Jeff J. | A holiday weekend probably doesn't help either. |
Mark M. | Certainly not for the States. |
Jeff J. | I'm in the south east, so it works well for me. |
Nov 27 | 9:05 AM |
Jeff J. | I guess I'll go ahead and bore you with my simple questions. |
Mark M. | Go right ahead! With the questions, that is. |
Jeff J. | I'm tinkering around with some UI layout items. As such, I'm spending a good bit of time on the widgets and containers section. |
Jeff J. | Are table layouts the best way of controlling the layout? |
Jeff J. | In particular, if I'm trying to do some layering. |
Mark M. | Probably not, then. I'd look at RelativeLayout. |
Mark M. | RelativeLayout and FrameLayout are the only ones that stack widgets on the Z-axis, so they can appear to float over one another. |
Jeff J. | ok |
Jeff J. | The table layout is more like the way it is in html? |
Mark M. | Yes, classic pre-CSS tables. |
Mark M. | TableLayout has its uses, but layering is not among them. |
Jeff J. | well, that's good to know....will keep me from banging my head against the wall some this morning |
Mark M. | That too has its uses, but layering is not among them... ;-) |
Jeff J. | :) |
Nov 27 | 9:10 AM |
Jeff J. | one sec...gonna grab a line of code I want to ask about |
Nov 27 | 9:20 AM |
Jeff J. | sorry about that....I had to crank up a vm |
Jeff J. | so...this line of code works fine on a 1.6 target, but won't on a 2.0 target |
Jeff J. | View paste
|
Mark M. | I'm assuming you're testing on the emulators? |
Nov 27 | 9:25 AM |
Jeff J. | correct |
Mark M. | The
2.0 emulator, for whatever reason, does not ship with the Google Maps
*application*, though it ships with the Google Maps *API*. |
Mark M. | Hence, the MapView widget works, but geo: Intents will not. |
Jeff J. | even when point at the Google APIs? |
Mark M. | Yes,
because geo: Intents are not part of the Google APIs -- they are
supported by the Google Maps application, which is not presently
available on the 2.0 emulator. |
Jeff J. | so, it should work on a device, but not the emulator? |
Mark M. | Yes. |
Nov 27 | 9:30 AM |
Jeff J. | interesting...so they pulled the application, but didn't provide a reason? |
Mark M. | None that I've seen. It may be because Google Maps is now distributed via Android Market, as well as on devices. |
Jeff J. | On a slight tangent, since you have obviously heavily invested in Android, do you have any thoughts on Chrome OS? |
Nov 27 | 9:35 AM |
Mark M. | I
don't have many general thoughts. With respect to its impact on
Android, I'm increasingly skeptical of its impact, only because I'm not
convinced Android will make the jump to netbooks in a serious fashion. |
Mark M. | Hence, I think Chrome OS will pick up where Android leaves off, on devices where you have reasonable keyboards and touchpads. |
Jeff J. | cool |
Mark M. | Android will be used for places where you have constrained user input: phones, set-top boxes, carputers, etc. |
Mark M. | The one spot of some overlap will be tablets, as I suspect some folk will go Chrome OS on those. |
Mark M. | As
I wrote Monday on AndroidGuys, if it's possible to create a Flash
plugin for Chrome-the-browser that works on Chrome-the-OS, it should be
possible to create an Android plugin as well. In that case, Chrome OS
is good for Android app developers. |
Mark M. | Of course, AndroidGuys is undergoing a serious overhaul right now, so I can't give you a link. |
Nov 27 | 9:40 AM |
Jeff J. | yeah....I caught that |
Jeff J. | just
curious...as I debate my iPhone companions who say that Google doesn't
have a clear direction, thus both will be left lacking |
Mark M. | That's an, er, apples and oranges comparison. |
Mark M. | To Apple, iPhone is a product. To Google, neither Android nor Chrome OS are products. |
Mark M. | It'd be like comparing Apple and Linux because Apple makes Apple TV and Linux powers the TiVo. |
Mark M. | If
you want to compare Apple TV and TiVo, that's a fair comparison, as
they are both products and have some overlap (though I'm not terribly
familiar with Apple TV's feature set). |
Mark M. | Moreover, a large amount of Android development is driven less by Google and more by handset manufacturers. |
Mark M. | Apple's and Google's strategies in this space aren't exactly in the same plane. |
Nov 27 | 9:45 AM |
Jeff J. | So
that's definitley a valid point. I'm guessing their point is that even
if it's not a product, the growth and adoption of the platform could
suffer b/c of the splintering and lack of a unified direction. |
Mark M. | Eminently possible. |
Jeff J. | Obviously I disagree with them or I wouldn't invest my time. |
Mark M. | At the same time, Android's open nature and "lack of a unified direction" will take it places iPhone won't go. |
Mark M. | I tend to think of iPhone as Rome and Android as the Visigoths. |
Jeff J. | I agree. The openess will drive further innovation making it more robust. There will be pain on the way, but greater benefit. |
Nov 27 | 9:50 AM |
Jeff J. | I appreciate your time. I'm going to head back to my code. I'll try and hop in on the next session. Thanks. |
Mark M. | Have a fine weekend! |
Ryan G. | has entered the room |
Mark M. | Howdy, Ryan! |
Ryan G. | Hi |
Ryan G. | sorry i am so late |
Mark M. | Yeah, the chat's scheduled to close soonish -- do you have any questions? |
Ryan G. | yeah if i could squeeze in one or two |
Mark M. | Fire away |
Ryan G. | if i make preferences do i have to delete those in an ondelete method for my app or do those automatically get deleted? |
Mark M. | You mean when your app is uninstalled? |
Ryan G. | yes |
Mark M. | Preferences, and anything in your app-local private data area (e.g., databases), will be deleted on a full uninstall. |
Ryan G. | o i mean if my app is closed would i have to ovverride the ondelete method to remove these or will these eventually be remove |
Ryan G. | i am making a app widget |
Ryan G. | so if it is removed from the home sscreen |
Mark M. | Removing an app widget from the home screen will not automatically delete anything. |
Nov 27 | 9:55 AM |
Mark M. | When the app is fully uninstalled from Manage Applications, *that* will delete preferences and databases and such. |
Mark M. | If there are things you want to delete when your app widget is removed, you'll have to handle that yourself. |
Mark M. | And, bear in mind that there could be more than one copy of your app widget on the home screen. |
Ryan G. | ok
so if i am making new preferences everytime my app widget is placed i
should delete these in the ondelete method or they will stick around
indefinitly |
Mark M. | Yes. |
Ryan G. | ok one more real quick if you don't mind |
Mark M. | Go ahead! |
Ryan G. | does android automatically go to the onUpdate method if I call the AppWidgetManager.updateAppWidget(...) |
Ryan G. | i
have seen it will the first time through after my config routine ran
and finished but everyother time it just goes to onRecieve and stops |
Mark M. | AFAIK, updateAppWidget() does not call back into the AppWidgetProvider. |
Nov 27 | 10:00 AM |
Mark M. | You
would use updateAppWidget() to push changes to an app widget based on
other sorts of events, such as a timer or something a user does in an
activity. |
Mark M. | But, I'm not sure that I have used that method, so I may be misinterpreting the documentation. |
Ryan G. | no your right i said that wrong, |
Ryan G. | let me rephrase |
Ryan G. | i generate an intent witht the action AppWidgetManager.ACTION_APPWIDGET_UPDATE |
Ryan G. | when that is broadcasted should that go to onUpdate? |
Mark M. | I
have not tried that, as I am not certain it is safe for applications to
broadcast that Intent. I have created a custom Intent action, or used
Intents based on the component name only, to be safe. |
Nov 27 | 10:05 AM |
Ryan G. | o ok, i guess i thought i saw someone do that somewhere but perhaps that isn't accepted practice |
Mark M. | It may be fine, I'm not sure. |
Mark M. | I get nervous sending out system Intents like that, though. |
Mark M. | I'd rather do things under my own control, so I don't get caught when there's a change in the API. |
Mark M. | I need to take care of something, so I'm going to be turning off the room. |
Ryan G. | yeah that makes sense |
Mark M. | Have a fine weekend! |
Ryan G. | ok thanks for the help! |
Ryan G. | you too |
Jeff J. | has left the room |
Ryan G. | has left the room |
Mark M. | turned off guest access |