TouchWiz home apk download
>>joe malin: hello and welcome once againto android developer office hours. i'm your moderator, joe malin. with me today from androiddeveloper relations are reto meier, world famous author, and next to me trevor johns. >>trevor johns: hello. >>joe: sorry. and also three gentlemen fromengineering. from your right to left we have, go ahead. >>chet haase: i don't know where we're supposedto start. i'm chet. i work on the ui toolkit team on graphics and animation and stuff. >>romain guy: and i'm romain. i also workon the ui toolkit team on graphics and animations.
>>xavier ducrohet: i work on developer toolsand sdk. >>joe: thank you. well let's get right toit. we have some questions in moderator that we'll start repeating and give you some answersif we can. first one. using fragments in an applicationthat reorders them visually in portrait and landscape. is there a best policy to avoidjava dot lang dot illegalstateexception or cursive entry to execute pending transactionafter multiple rotations in a short interval? >>trevor: [laughs] that's a good questionsactually. i'm not sure. uh, do any of you up here know? no. ok. [laughs] um, yeah, honestlyi've never gotten that error. so i'm not quite sure or, i mean, i think the problem hereis. i mean, well, you're probably, you're,
uh, just trying to think. it, it. hm. [laughs]i think the important thing would be to make sure that you're not performing fragment transactionsright during the rotation. so, if there's some way that you could avoid that, i'd probablywanna see your code to see what exactly you're doing. most of the time, this shouldn't happen.so i'm really curious what in your code you're doing. if you happen to be watching live,feel free to hop on the air via our hangout. and we'd love to talk with you a bit moreand figure out what exactly you're doing. but i think without seeing your code, noneof us have a good answer off the top of our heads. >>joe: right. i would agree with that. basedon what everybody has said so far it's probably
best if you do something this like post part ofyour code to stack overflow so that we can see what's going on. there may be anotherreason that this is happening. you can't, i wouldn't just offhand assume that the problemis because of a change in orientation. so go ahead and post something to stack overflowand we'll take a look at it. well, let's move on. we have a link here thatsays, launcher icons should use a distinct silhouette. if this is desired, its' verydifficult to sell the idea to pms and designers. as long as google apps uses squares with roundedcorners. any plans to change these? >>trevor: [laughs] >>romain: well, what apps do use rounded corners?'cause i can think of only g plus. all the
standards apps that we ship like google playstore,gmail, they use the silhouette icon. >>trevor: yep. maps as well. google plus ispretty much the only app i can think of as well that uses the rounded rectangle. andin that case that's essentially part of their logo. so. yeah. >>joe: i can comment that this may be thata confusion about what's in the design guide versus what we use. as i remember the designguide has an example in which there's a sort of three dimensional aspect to the icon witha dropped shadow. and we're not using that right now. so i would say that you shoulduse something that is distinct, that has a distinct background so that it'll appear correctlyregardless of what the device background is.
other than that, i, we probably have to lookmore into this. >>trevor: yeah, i mean, generally speakingthe goal should be to try and make your icons match the system icons. i'll also add oneother thing. some device manufactures do change the default icon themes. so make sure you'reactually looking at the icon theme as they're distributed with, the stock version of android.so, a good way to do it is just to go and download the emulator and take a look at whatthe icons look like there. just so you're not confused by any of the theming that getsapplied by boolean modifications. >>joe: yes. that's a good point. ok. nextquestion. both dr. sandler and the jellybean overview say you can add up to three notificationactions, but the api overview says you can
add up to two. which one is correct? actually i looked into this just before westarted today and the answer is, three. you can add up to three icons with text and intense,that will display when you display the notification. >>chet: yeah, i would definitely trust dr.sandler 'cause he has a phd. [laughter] >>joe: right. well, i'm not sure that i trustsomebody just because they have a phd. but in addition dr. sandler is the person whoactually developed this feature. so i would say that if he's mistaken, we have biggerproblems. so yeah, the answer is three. >> male panelist: yeah. that sounds like adoc bug we should fix.
>>joe: yeah, i'll have to look into that.the api overview is basically something that says here's what's new in android 4.1. i don'tthink we're saying in anything about either ics or jellybean in the api guide itself yet.you know, it happens that i work on that. so i'll go back in and take a look at thatas well. >>trevor: we have a question from ed burnettin the hangout. ok. go ahead, ed. i think you muted it. >>joe: maybe muted >>trevor: or i've muted it. let's try again. >>ed: can you hear me now?
>>trevor: yeah. >>joe: mm-hm. >>ed: ok, so i have a program which uses jni.and, you know it works fine on gingerbread, honeycomb and ice cream sandwich. but on jellybeani get an error that i put in the moderator. says "attempt to use stale local reference."and i'd like your advice on how to debug that. >>trevor: alright, sorry. so what exactly,so what are you doing when you get this error, one more time? >>ed: i'm making a call to a native function. >>trevor: humm. um. so. ed, does it occurall the time or is it only under certain conditions?
>>ed: it occurs all the time. on jellybean. >>trevor: only on jellybean? um, that's interesting.[laughs] unfortunately i don't have too much experience using the ndk myself. most of thework i do is you know, using, is entirely in the java language. so, i can't, i'm notsure that i'm probably the best person to ask. but i'm not sure we have any ndk expertswith us right now who could actually answer that. >>romain: actually, this kind of error lookslike what happens when you, goes from jni codes or from native codes you can grab referencesto the data that is on the data heap. and if you don't do it properly for instance,if you grab a reference and you don't release
it, you might run into that kind of issues.i know that we had a bunch of applications that were not using jni properly, so there'sthis feature that you can use to check jni. i don't know how to enable it. i think it'sin developer settings or maybe the [indistinct] option. but it definitely sounds like you'retrying to access data improperly. maybe you kept reference on the native side longer thanyou should have. but it's hard to say without seeing code or anything like that. >>ed: that's what i figured and i did enable"check jni". uh, so, it didn't really any extra information. >>romain: so if you can post the questionsomewhere on stack overflow, or firebug, maybe
we can route that to the data guys. and theymight be able to tell you, if you're doing something wrong or maybe there's a bug. buti know that we have tons of jni code in the platform and we have not seen this error,so and i don't believe we have changed many things with jni. so yeah, show us your codeand we'll try to figure it out. >>ed: ok. >>joe: ok. thank you, romain. our next questionis "what is the best way to play short endgame sounds. soundpool crashes on dual core phones.media player has 200 millisecond plus delays. open sl requires spk9+. that leaves audiotrack. are there any examples for this at api with static sounds?"
>>trevor: alright, i can take that one. firstoff, a bit of a clarification. soundpool does not crash on all dual core phones. it crasheson a subset of dual core phones, which are running gingerbread. so not all dual corephones running gingerbread. just some of them. unfortunately this is a bug in the way gingerbreadwas ported to run on dual core devices. unfortunately there's not really a good solution i can recommend.unfortunately audio track will, if you actually try and use that you'll find it has the exactsame bug. so, the work-around here is really, yeah, the best case is to try and encourageyour users to upgrade to ice cream sandwich on those devices. i believe specifically thisis an issue on samsung galaxy s2 devices. and unfortunately upgrading to ice cream sandwichon those i'm told does require updating upa
usb cable which also makes it a bit difficultfor them to actually update. but if they're on gingerbread, probably the, if you do insiston trying to get this to work, pretty much the only option available to you is to writeyour own mixer as a native library. which admittedly is quite a bit of work. so, mostlikely on those devices, if you're, if you don't feel confident or you don't have timeto go and do that level of work, would be to go and detect when you're on those, thatspecific subset of devices and display dialog saying "unfortunately this app is not compatiblewith your device, please contact the manufacturer regarding any former updates." unfortunatelythat's really the best answer we can give you.
[feedback] >>joe: ok >>reto: ok. we have another question on thehangout from pieter. >>joe: great. >>reto: about fragments. >>joe: fire away. >>joe: hello, can you hear us. >>[pedro]: so, are you hearing me ok? >>trevor: yes.
>>joe: mm-hmm. >>[pedro]: i'm having a little, jumps, ok.so i have an application that has like a dashboard. with some buttons that have a lot of information.so the ui is kind of complicated. the fragment thatkept the ui logic and kept it really tight. so each time the application rotates, in portraitit has four buttons. but in landscape it only presents three for each screen. so each timei rotate, i have to remove the fragments and re-add them. so the problem that i'm havingis that if i rotate really quickly, from portrait to landscape, and all that, [ inaudible] crash,that i actually, because i read in the documentation that the removal of fragments its operation.so, i didn't, i tried to execute that transaction
to be sure that all the pinging transactionsof adding or removing fragments are done. but the [inaudible], means so little time.so i don't know what the best policy, you have have cross that problem already, better.so any suggestion is welcome. >>trevor: ok. do one of you have a good suggestionfor how to handle this? [laughs] no? alright. yeah, i think probably we need to go and actuallyrun this by somebody else on our team to have them take a detailed look at your code. ifyou wanna go ahead and post a code snippet of the code that handles your fragment transaction,onto stack overflow, and then just post it as a comment on the g plus post, we can goand take a look at that after the show and try and get your answer. yeah, unfortunatelynobody here on the set right now knows the
answer but i'm sure we can find one for you. >>pieter: ok. thank you. >>trevor: you're welcome. >>joe: thank you. ok, let's go back to moderatorunless we've got other live questions? nope. go back to moderator. "is there a way to integratean app into the new radial menu introduced for google now?" >>reto: no. >>trevor: [laughs] at least not without modifyingthe source code for the short system. but as an app developer, no.
>>joe: ok. next question i have is "jellybeanboasts that view stub is remotable. does this mean that a non-remotable view can be lazyinflated into this placeholder?" >>trevor: [laughs] i mean to go into a bitmore detail, you know remote views have a bit of restriction as to what they can do.and so just thinking about this for a second, if you could place a regular view inside ofa remotable view stub, that's not remotable, you could probably do a lot of things thatyou shouldn't be able to do inside a remote feeder. so just from that standpoint it doesn'tmake sense to be able to do that. >>joe: ok. thank you. >>male off mic : loophole.
>>joe: next question. [laughs] sorry, thatloophole is closed. next question from moderator. "expandablenotifications currently have a fairly large discoverability issue. is there a way to makethem, make it more visible that the notification is expandable? and is it a way to expand itwhile using the phone one handed? that is, not using multi touch?" >>chet: actually, don't they auto expand whenthey become the top notification? that's part of the discoverability. >>trevor: right. so yes. the system does automaticallyexpand them. but the ones that are closed, i mean, if you really wanted to go and givesomebody a visual cue you could go and add
some small text there saying "drag to expand."i wouldn't recommend doing that because none of the system apps do it which means yourapp's gonna feel out of place. and generally speaking you should try and make your appsblend in with the style that's provided by the system apps. so, given that none of ourapps actually go and provide any additional clues behind, aside from what the notificationfloor already does i wouldn't do anything extra. i'm also not aware of any way to goand manually expand them without using multitouch. but again, the system will automatically expandthem under certain circumstances. >>joe: thank you. >>trevor: and of course you can always tapon them, too, if you want to actually open
them. >>joe: right. yeah. i would say that probablythe best thing is to assume that, in most cases, the user's gonna wanna tap on the notificationand actually go to the application that was responsible for issuing it to begin with.that's what users expect. there's certainly a lot of information now that became fromlooking at notifications. in the current releases. but still we wanna encourage users to, wewanna encourage you to have your users go back to the application to get more information.that's the best way of handling it with an app. i think. next question. "regarding bitmap dot recycle.recently i have noticed heap memory corruption
error occurs. is it true that in ics thatwe should not be calling bitmap dot recycle? i saw this entry but no other documentation."and then there's a link to stack overflow. >>romain: no, it's not true that you shouldnot call bitmap dot recycle. you can call it. but actually as of honeycomb, so android3.0, calling bitmap dot recycle will not do much. it will simply set an internal byterate to null on the dalvik side. so it's gonna help a little bit to reclaim the memory fasteras soon as the gc can do it. but it's not gonna make a big difference. so if you'rerunning into issues because of bitmap dot recycle you can avoid calling it. it's notgoing to do anything bad to your application. but it's perfectly safe to call it. now, idon't know why you're wanting it to crash
when calling bitmap dot recycle. i'm surethere was some sort of a bug in the ics. and if you have a repro case or you can firebug,we'll take a look at it and see what's going on and make sure that it doesn't happen injellybean or future versions of android. and i think there was a follow up to the question,asking how you can avoid out of memory errors. so what we've done in android 3.0 is we addeda new feature in bitmapfactory dot options. where you can reuse bitmaps. so you alreadyhave a bitmap already in memory. you can pass it to the bitmap factory so it's reused. sowe'll reuse the allocated memory. and you can pre-allocate your bitmaps ahead of time.and reuse them as you go so that you don't, you don't need more memory when you're onyour app.
>>joe: thank you, romain. next. >>reto: there's a couple of questions frompeople in noisy environments on the hangout. so i'm going to read them out to you. >>joe: please. >>reto: this is from anush goral. he says"is there a way to add the google maps api to the intel exit six android emulator? andi don't want to build a system image from scratch as mentioned in the stack overflowquestion." >>xavier: so you can't really do that yourselfanyway. we do plan on doing it at some point. we just haven't had time yet. but it's highon our priority list.
>>reto: excellent. thank you. and i have anotherquestion from, we can scroll up here. from mark, who says "on windows xp", and he apologizesfor that knowingly, "is it possible to run ntp mode while usb debugging is turned on,when the next server running android running 4.1.1?" >>romain: can you repeat the question? >>reto: i can repeat the question. is it possibleto run ntp mode. uh. oops. >>joe: ntp. >>romain: so ntp at the same time as you'redoing debugging? >>reto: that is correct.
>>romain: it should work 'cause that's whathappens every time i plug in my device on my desk computer. >>xavier: windows xp. >>romain: on windows xp? uh, i don't, do youknow about? sure. >>reto: i've never tried it on xp either.so. i know it works on the mac, but. >>romain: yeah, it works on the mac. it workson linux, i presume >>joe: it works on linux, you just need toinstall some stuff. >>romain: ok. so it works on the linux, workson mac, don't know about windows xp. we should try it. do we have a windows xp machine?
>>xavier: [inaudible] >>romain: ok. >>reto: we should be able to dig one up somewhere. >>joe: any others? ok. let's go back to moderator."how can i expand the collapse notification from jellybean in the emulator? is there asimpler way other than tethering the device to the emulator to send those multitouch gestures?" >>xavier: no. there's no way right now toemulate multitouch without that. >>chet: two mice? >>xavier: two mice won't work on all os. ithink it works on some, but not all of them.
yeah, we don't really have a solution forthat right now? >>trevor: can you do multitouch via monkey? >>romain: [inaudible] >>xavier: i guess you could. >>trevor: yeah, so you can probably run ascript to do it. um. i can't remember what the exact commands are off the top of my head,but if you take a look at the documentation for monkey runner on the android dev site.you'll see that you can basically send program, mouse gestures, key events, things like that.and then you can use that to go and write a little script that generates your multitouchevents for you.
>>joe: ok. next question. "how can one loaddata on fragments, not creating them, in a view pager when changing pages, and avoiddestroying the fragments. like lazy-loading the fragments data." >>trevor: [laughs] silence. um. >>joe: we've stumped the panel. >>trevor: yeah. um. that's a good question.i mean there is a [indistinct] then that gets called when the fragment comes visible, right?so you could go and try and do it there. just listen for when your fragment's actually onthe screen. >>trevor: that's probably the best way todo it. yeah.
>>joe: [sighs] >>reto: i have a question this time from trevorsolomon on the android developers stream. and he asks, or he says he's pretty new toandroid development and would like to avoid using eclipse, due to the many quirks it has.strange, i've never heard that before. instead, he's learned about intellij. however, version11 does not have a ui designer. are there any third party external tools to help withyour ui design. preferably free or hobbyist levels. >>xavier: not that i know. at least not onesthat are really go. intellij 12 will have a ui designer though. so there is a thinka preview version of it. i don't know how
stable it is. but i think you can downloadit and try it. >>chet: they were showing it at io. >>xavier: yeah, they were showing it. buti don't know if it's completely finished and polished. it's probably still buggy. i don'tknow when it's supposed to be released and >>chet: you could also not use a designer. >>xavier: and you could also not use a designer,yes. >>trevor: and it does ui preview. so if you'recomfortable editing xml and you should be because at some level you probably will haveto edit some xml, you can at least display what your changes are, even though you can'tdrag and drop things around.
>>joe: ok. any other comments? at an io sessiona new version of the support library was discussed. that would have a support for the action bar.is there a general estimate when this will be released? >>trevor: i can take that one and the answeris, soon. i don't wanna get more specific than that. but hopefully sometime in the nearfuture. >>joe: ok. in the io session and then there'sa link, reto talks about dynamically adjusting periodic transfers and batching transfers.i'm wondering how his examples can be applied to the sync adapter. like, can i get it topiggyback on a time sensitive transfer? reto, do you wanna answer that one?
>>reto: uh. let's see, if i'm very lucky thiscamera will be pointing at me. no. let me try again. point it at the camera. >>chet: i can always tell the audience whatyou look like. >>reto: that could work. >>chet: wooooo. wow was that fancy. >>reto: that was fancy, and would have worked.to go to the site, i don't really have the answer. at least not a good one. i'm not awareof a way that you can piggy back on top of sync adapter. so you can trigger the syncadapter to do a refresh if i'm not mistaken. so you would probably be wanting to do that.at the same time as any other, as a way to
bundle those sync adapter updates with anytime scan sort of transfers that you wanna do within your application. but i'm not sureof away you can do it the other way around. so listen for a sync adapter update and piggyback the rest of your updates that way. does anyone else have any insight there? >>joe: it's kind of, my feeling is that it'skind of at cross purposes to the whole idea of sync adapter. because sync adapter is supposedto control a lot of that stuff for you for things where you don't have something that'sreally that time sensitive. on sync adapters, in a certain extent, takes over all of thestuff that you normally have to write to figure out when to do something. check to see ifthere's a connectivity, etcetera. and it's
for things that you are willing to allow onthe background. on a periodic basis. but not necessarily immediately. and unfortunatelyif you've got something that's really time sensitive, you probably have to step in anddo the handling of the transfer yourself. >>reto: quick follow up as well from trevorwho says "thank you for the answer." for what it's worth, he's comfortable with xml butthat doesn't necessarily mean that it's fun either. >>trevor: oh no. i totally agree. [laughs] >>reto: he'd also like to point out that it'dbe cool if google released some sort of ui toolkit to make it easier.
>>xavier: what kind of toolkit is he talkingabout? >>reto: that's a good question. i will askhim and get back to you. >>joe: ok. great. super. um, let's move on.why doesn't listview support drag and drop reordering of its items. can you consideradding support for this in the support library? all the current third party implementationsfeel very janky and subpar. >>romain: there is currently no plan to addit to add this feature to the support library or in listview. mostly because it's not afeature that many apps need. we have an implementation in our source library that you can use. ithink it's the music application. and frankly, it's not high on the list of priority of thingsthat we have to do. our engineers are pretty
busy at the moment. >>joe: ok. alright. next question. "is itacceptable to wrap sq like open helpers as a singleton object as long as the contextbeing used is the application context?" >>trevor: so i think that's probably ok. idefinitely wouldn't do it with the activity context, 'cause your activity can get destroyed.but if you use the application context though you're most likely going to be ok. the onlything that you could run into is if somehow the application context becomes invalid butyour process doesn't get destroyed. which shouldn't happen normally. but yeah. thatcan't happen, right? >>romain: i don't think so.
>>trevor: yeah. so you're probably ok. >>joe: alright. [pause] "lock canvas callcausing a dq buffer fail error. got around it by introducing a 20 millisecond sleep onresume coming from home launcher screen. question, do we need to worry about dq buffers or isthis just a freak oem error?" >>romain: you should never have to worry aboutdq buffers. you shouldn't have to know that it's there. you shouldn't need to understandwhat it does. so without, i will have to look more about, at your error and your code tounderstand what's going on. let's see, it's in surface texture, yeah, you don't have codein stack overflow. oh, there is code in the stack overflow. so you're doing that on thesurface view apparently. um, yeah, we have
to look into more in details, but it's notsomething you should have to worry about normally. it's too buggy. there are bugs. >>joe: great. thank you romain. >>reto: i've got a follow up from trevor.in response to what kind of toolkit is he after. he said "a toolkit is a ui tool thatwould generate and or modify the xml. similar to visual studios, [ indistinct] designerfor wpf/similar applications and metro ui applications in win et. >>xavier: well that's exactly what we havein eclipse. of course, you don't like eclipse. so, i don't know what we can do for you.
>>xavier: i mean, our goal is to make it better.more usable. how we're going to get past people who don't like eclipse, that's another questionand we don't have anything to say at the moment. >>joe: ok. "does the use of listview provideany benefits performance or otherwise over a single column grid view?" >>romain: there would be, slight performancebenefits to it because there's, listview is less work to do. and also listview is muchbetter and hanging things like input fields, focus, items of different types. items ofdifferent heights. i mean, gridview, really you should not use gridview if you're doinga single column and that's what listview is for.
>>joe: alright. good. excellent. >>joe: "this is a more userland question butit drives me nuts." alright. "i have no clue what i keep doing, but i get a choice intentdrive or gmail, when i select drive, it goes boom. when i select gmail it asks me who tomail an email a bug report to. wtf?" which i won't translate. >>trevor: [laughs] alright. so that one is,i assume you're on a, doesn't say here but i assume he's probably using a galaxy nexus.many of the, what you're seeing here most likely is a debug feature that gets activatedwhen you push volume up, volume down and power all at the same time. and that's equivalentto running a debug report. but rather than
sending the bug report date off via usb, itcreates a file and then sends off a share intent asking what devices would like to receiveit. which, would likely be gmail or drive and possibly anything else he installed thatcan handle attachments. so, the short answer, if it, you know, don't do that. don't pushvolume up, volume down, and power at the same time. if you are using another device, these,the sequence of keys you have to press does get changed depending on what keys are availableon the device, right? i, you know, back in galaxy, or in the nexus 1 day, i think itmight have involved the trackball. i can't remember. but yeah, in, that sequence of keys,unfortunately, is a little bit easy to press. so you're not the first one who has askedme that. that being said, if you, it's harmless.
it's just a debug thought that gets generated.so you know, if you just hit back, the, no harm done. if you send it, no harm done. it'sjust an attachment. then whoever does receive it will get to see your system log, so youmight not want to send it to random strangers. >>joe: right. and it happens to me on thefairly often. it just depends on what your tolerance level is for that. so. >>reto: i have a question from mauritz poston the g plus stream. he has a question regarding lint. should lint be able to dish up errorsif an application references at android colon attributes that are introduced after the minimalsdk version? >>xavier: so, lint, i don't think we do anycheck of that sort at the moment. the issue
is that it's perfectly valid to actually referencesome attributes that on higher than your particular version. it's just that on lower api level,the application will just ignore them. and application running on a version where, thatactually exits, then it would be used. so at least you should probably put a warning.but then if you actually want to do that, you would have to have better was of ignoringthat warning, there are attributes. but we'll see what we can do. it's a good idea. >>joe: ok. great. next question. "there seemsto be a bit of overlap between the upcoming google play services library and account manager.has the latter been, from a practical point of view, deprecated? if not, can you giveany insight on the use cases where one should
be picked over the other?" >>trevor: ok. [laughs] so, account managerhas not been deprecated. as for the rationale as to why google play services is not usingaccount manager, if i remember correctly there were some features that they wanted to introducethat weren't compatible with the api service that account manager exposes. and so becauseof that they decided to do it as a separate library. as a application developer, if you'recreating your own account provider, i would definitely use account manager whenever possible.in fact i think we still will be using account manager even internally just because we haveto go and keep track of the google account you register on your phone. i think googleplay services just drops that. as a, an api
consumer. if you're writing your own androidapp that just needs to go and access an account, you know, decide, basically you have to lookat the api when it's published and determine which one has the features you need. if accountmanager does everything you need to do, then you're fine. if you wanna use the new featuresto get introduced as part of the google play services, then you know, of course you'llhave to use that. it's really just a matter of what it is you want. >>joe: ok. any other comments? >>reto: so i have a question from chris hallin the hangout, who asks "what is the best way to implement landscape to portrait switching?"
>>trevor: rotate your phone? [laughs] >>joe: i'm assuming that, well, that's aninteresting question because i'm not sure what he's trying to do. >>reto: so i'm gonna ask chris if he can giveus a little bit more data as to what you mean by implementing landscape to portrait switching.in that, normally this would just happen by default. so i guess we wanna know what isthe specific use case that we're trying to implement. >>joe: while we're doing that, let's moveto the next question. it should be pretty easy to answer. "i thought i'd mention this,the api reference docs on developer dot android
dot com are pretty much unusable on a tabletor phone. i was wondering if this could be fixed for those of us who are curious aboutthe ap stuff as, api stuff as light reading. >>romain: so here's the good news, on jellybean,we just tried with the standard browser it works really well. >>trevor: yeah, there is one catch and itis if you're on a phone, i don't think it's so much a tablet issue but it just a screensize issue. if you are on a phone, the video part's a bit small compared to how the, thesize at which the docs are easily readable. it's a known bug with the docs. in fact, ifiled it the moment the docs launched. so, it s something that i think we wanna go andaddress. it just didn't make the cut for the
first release of the site redesign. so we'llprobably get there eventually. in the mean time, sorry about that. i will add also, ifsomebody feels really adventurous, and wants to write a android api viewer that runs asa native app, i'd totally love you for it. [laughs] all the docs actually that we publishas part of the developer dot android dot com site are actually checked into the open sourcetree. i believe most of them are in framework space docs html. so if you really wanted youcould actually go and extract everything there, make your own nice pretty doc viewer thatruns natively. but if nobody gets around to that, we'll eventually fix the html site.and i'm not even sure fix is the right word. we will improve the site to go and have amore responsive layout.
>>joe: it's a great question. i don't personally,i'm a technical writer for android developer relations. and i don't consider reading theapi reference necessarily as light reading. but it's an excellent question and i'll takeit back to our team to take a look into more. as far as i know, all the documentation isin frameworks based docs html. certainly all the api reference docs are there. >>joe: and so if you wanted to write, or adoc with a, to handle that, it would be fine. i can't offhand remember where our existingdoclet resides. and, ahhh, so, unfortunately i can't remember that. but it certainly >>trevor: actually, i will say, the api referencei think. that's actually generated by a droid
doc, right? >>joe: it's generate, well, >>trevor: [unintelligible] >>joe: it's generated by droid doc. whichis a bunch of things that include doclet functionality. so. >>trevor: right. but yeah. so part of theapi references are auto generated. >>joe: right. >>trevor: so watch out for that. >>joe: yeah. you will have to consider thefact that we auto generate them from the code.
>>trevor: yeah. if you do wanna play aroundwith this, just run "make offline sdk docs" as the target. and that'll run through thewhole doc building process and you can play around with it. >>joe: right. ok? >>reto: ok, we have a question from, let mesee, who was he? from joram in the hangout. >>joe: ok. >>joram: yeah, i have a quick question aboutportrait nomenclature and stuff. i mean, the, if you proof the word performance in the system,however, if you want to load images while scrolling there is still some jank. i actuallyanalyzed it with sys trace, and it seems that
process called "image cache" sucks up allthe [ indistinct ] cycles and the other thread, the other process blocks in there. so, whyis that exactly, is that a boss problem? or it happened on my on the galaxy nexus. >>romain: what is image cache? what applicationon what device? >>joram: it's a galaxy nexus running jellybeanstock. and, basically some frames get dropped off if you want to try to load an image whilescrolling. in the background [inaudible] >>romain: in what application? >>joram: it happens in all applications. specifically,with the google plus set, for example. >>romain: well, so yes. i mean google plus,we knew there was a fluency issues and people
are working on it to fix them. it's just aproblem with the app. there's nothing wrong with the system or anything. if the app isblocking the, there's nothing we can do about it. >>joram: so, a development rich app. it happens,i mean it happens on youtube, in my own apps, on google plus, every time you try to loadan image in the background thread, then it blocks the directory thread. >>romain: no, it won't unless you are blockingthe rendering thread by doing something else or waiting on another thread. >>trevor: yeah, i did some demo of this forgoogle io. yeah, if you're loading all of
your images you know say in the backgroundthread. and you're really absolutely sure that you're not doing any heavy lifting aspart of your ui thread, at least as far as my eyes could tell there wasn't any jank. >>trevor: it's possible there's a common patternbeing used that, [laughs] wow there's some good noise on the hangout. it's possible there'sa common pattern a developer is using that just happens to introduce jank frequently.but as far as i can tell i haven't noticed anything wrong with the system itself butthen again, it's entirely possible you're seeing something we missed. you know, if youwanna, like we say record a video or something and send that to us. we can always take alook at it. but at least as far as our experience
has been we haven't seen this. i'd love tosee some more details as to what you're saying. >>joram: i posted the sys trace, sys traceto html. and here you can clearly see that the process called "image cache" sucks upthe cpo cycles and the rendering process doesn't get the cpo cycle. so it might be a schedulingproblem or-- >>romain: it could be a scheduling problem.it could be many other things. it could be the, the image cache whatever that is 'causethat's not part of the framework. maybe reading something after the file system and the renderingthread for whatever reason is trying to access the file system as well. so the, one of themis blocked on the other one. i mean there can be many, many different reasons.
>>joram: ok >>romain: and i don't think there's one explanationfor all the issues. but you know, in jellybean we've improved performance throughout thesystem. but we're still working on that. so we'll definitely look into that and i knowthat the g plus guys are looking into those problems already. >>joram: ok. thank you. >>joe: yeah, i think a key thing here as faras i can hear is that this image cache process that he's talking about is not part of thesystem framework. so it's important to figure out what exactly that is, where it's comingfrom. 'cause if it is something that's been
installed or running for some reason, thatcould cause problems in the entire system. although it's not something that comes withthe framework. >>reto: ok, we have another hangout question. >>reto: this one is from matthew. >>joe: ok. hello matthew. >>reto: i think you muted matthew. >>joe: matthew are you muted? [feedback noises] >>joe: hello?
>>joe: no? yes? >>reto: yeah, if you can unmute yourself. >>reto: i don't see on >>trevor: oh wait >>matthew: i unmuted it as far as i can tell. >>trevor: there you go. >>joe: there you go. >>matthew: i'm sorry. i had a question onthe smart app update. trying to get it to work to see what kind of impact it has onthe application side. i just updated the android
manifest updated version, it still downloadsthe full, you know, three megs of the app. i'm using the latest google play that i cansee, it's three, 13 dot7 of google play. >>trevor: yeah, so there's no one here fromthe market team. so i'm not sure if any of us are gonna know exactly why that might behappening. to my knowledge the smart updates are just supposed to happen automatically.there's nothing >>matthew: [inaudible] >>trevor: you need to do as a developer totake advantage of that. um >>chet: [inaudible] version of monarch thatyou have right now? >>matthew: and then it was, was it gonna impactthe application side at all, 'cause you have
ea signed file that they're somewhat pushingbytes into it or something. >>trevor: no, it shouldn't make a differencebecause the signature will get sent along with it as well. the updated signature. >>matthew: ok. >>trevor: of course, you don't wanna go andchange your signing signature between releases. >>matthew: right, definitely not. >>trevor: 'cause if you do that google playwon't accept the update anyway. and even without smart updates that would get you in trouble.so. >>matthew: right.
>>trevor: so to my knowledge there's reallynothing you have to take advantage of as a developer. it's possible that for some reasonit's been temporarily disabled on your phone. or there might be some edge case where itautomatically turns itself off. i'm not sure of the details of how that mechanism works. >>trevor: it should just work though. so,i wouldn't worry about it too much. >>romain: and it's the mechanism we use forour ots. we use the same smart updates when we update the whole system. and where thesystem sign in works just fine. >>joe: great. hm. ok. >>reto: we have another person on the hangout.
>>joe: wow. >>reto: it's very dark where ismael is, buti'm gonna put him on anyway. and, hopefully we'll at least be able to hear him. >>joe: alright. >>reto: ismael, when you're ready. [pause] [feedback sounds] >>reto: um, nope. >>joe: [inaudible]
>>reto: doesn't sound good. >>joe: there is [inaudible] >>reto: [laughs] indeed. perhaps we'll goto the next one. a moderator question. >>trevor: been eaten by a monster. >>reto: eaten by glue. really. >>joe: ok. next question. "my developer'sconsole is a bit messy. and i need to take off the unpublished apps. is there any wayto do this?" >>trevor: so, it depends on what you meanby unpublished. if the apps have just been uploaded as drafts and you're doing, say debuggingfor license verification or enact billing,
something like that. then there's the deletebutton. however, once you published your application, if you later resend it, if you unpublish yourapplication later after it's been published, there is no longer the option to delete anapp and that's by design. so the reason behind that is because, you know, there could bepurchase history associated with the app, the package name is permanently reserved aswell, so if you deleted it you lose the package name. there's a lot of reasons as to why deletinga previously published apk or a previously published application is not allowed. thatbeing said, there is a ui redesign happening for google play. for the dev console. so hopefullythat'll go and help clean clutter up a bit. but right now, there's not much you can doto remove those if they've been published.
and if they haven't, you know, check in thedetails page and you'll find the delete button at the bottom. >>joe: ok. thank you. this "during this googleio we heard a lot about the use of cards. is there a standard or best way to try touse these?" >>trevor: um, is this, i assume this is referringto the cards in google now? >>chet: that's the only cards i have. thoseapps specifically. >>trevor: so inside of google now, there'syou know, the cards are provided by the google search app. so there's really no way to goand create additional ads. there's no api for example. now, if you wanted to go andtry and emulate the card ui design pattern
within your app, we don't have any publishedstandards on that yet. it's still very new. i'd just try and you know, take a look athow the app works and emulate it based on what you see there. it's not a pattern we'renecessarily recommending to developers yet. so, yeah, if you decide you know what goesinto your app, you're on the bleeding edge of things. >>romain: and if you want to try to use thecards as a user, you should go to google now. at the bottom there will be a small buttonthat says "show sample cards" if there's no cards showing. so you can click on that andgoogle now will generate a bunch of cards so you can get an idea of what they look likeand how you can talk with them.
>>trevor: oh. yes. that. yeah. i didn't thinkabout it from a user point of view. if you are a user definitely take a look at the samplecards. it'll even tell you some of the ways it gets triggered. for example the flightstatus gets triggered when you search for a flight. most of the time though i foundthat they just tend to work properly if you use google. >>joe: any other comments? ok.this is also about google now. "does google now replace the standard search app? and doesit search inside third party search interfaces? what happens when jellybean reaches devicesand you press the search button? will google now start?"
>>romain: so in the developer preview of jellybeanthat we gave out at the google io, you should go to the settings in google now, you canadd initial search sources. so by default, only some of the built in apps will be usedas sources for searches. so there will be google music, google play, your list of installedapps. but you can also enable search for other apps so for instance you search an evernote,kindle, spotify, that kind of apps. but you have to go enable them yourself. >>trevor: yeah. even the little quick searchbox had that same requirement. there was a menu buried somewhere that would let you goand toggle which apps were indexed. >>romain: yeah. but they used to be all enabledby default.
>>trevor: ah. gotcha. ok. >>reto: got a couple of question in hangout. >>joe: go ahead. >>reto: so i'm going to, think i'm going toread them out. there seems to be someone playing music aggressively. i'll try and sort that out. in the mean time,ismael, his question was, let me see if i can find it here. "is it possible to use aussd code in call intent? for example, hash one two two hash." he's tried to use it inhis app but he gets an error ussd connection problem invalid. nmi code. does that meananything to anyone.
>>trevor: yeah. so. the ussd codes are carrierspecific codes to go and do things. so they have a very odd format. now as to why thedialer app isn't accepting them, it, honestly it sounds like it's either a bug with thedialer or it's possible that they might need to be encoded in sim card somewhere to berecognized as valid. but that seems a little off to me. without knowing more about the[indistinct] stack, i can't give you a definitive answer there. yeah, you could go and searchthrough the source code and see where that error message is being generated. i mean itsounds like something that should work. >>joe: chet? >>chet: nothing.
>>trevor: yeah, i mean the [indistinct] stackis definitely all up there as part of android open source. so you know, take a look throughthe source code. see if you can find where that error is generated. and that should giveyou some clues as to why you're getting the error that you are. >>joe: alright. did we have anything elsehanging out there, reto? >>reto: i'm just gonna check to see whethersimon. yeah, simon does wanna ask it. so i'm gonna put him on now. >>reto: ok. you're up simon. >>joe: hello simon.
>>simon: hello. [clears throat] just wantedto ask about stsl certificate authorities across the [indistinct] system. so, acrossthe tel coms, you know, they change. so mostly what happens is everything happens, you beginthe cell connection and then some devices just give up because they can't handshake.and the pattern of the [indistinct] that have a number of different landing urls and i justfail gracefully until you get to a decent connection. and the one that seems to failis komodo, mostly, across devices. so i just wondered what the best approach was or ifyou guys recommend it. a ca to actually assign with. >>trevor: so just to make sure, you're notwriting a browser or something big like that.
it's more you could encounter any certificateactually like access an api endpoint right? so you do control both the application andthe server? correct? >>simon: just making the cell connection tomake sure that most [unintelligible] are in play. and it works like 99 percent of thetime. but i do all my work with tel cos. but eventually one of the tel com releases a deviceand it's got some, basically just removed some stuff from the [indistinct ] list andburned it onto the device. and you're left going, oh, i can't make a connection. so iknow i can't avoid it. but it's just a case of you guys recommend, just go with theirsign? or just or is there a pattern to go for, you know, a stack, or attempting multipleconnections? 'cause the pattern i go with
is just multiple end points until one works.and then i stick with it until it keeps working. >>trevor: i mean, i'll certainly add, youprobably can't go wrong with their sign. if somebody shipped a phone without support foryour verisign, i suspect a lot of websites would be broken too. so the same goes foryou know, godaddy or thought, or any of the other really big cas. now, that being said,we do have an api that'll this is why i was asking if you controlled both ends. we havean api that will go and let you register additional cas within your application. so if you knowthere is a preferred certificate you'd like to use, you could use that api call in, saythe, explicitly add this to the trust chain. >>simon: ok. ok. i'll go looking at that.i've just been racing by that, not looking.
to be honest. it didn't handshake so let'smove on to the next one. but yeah. ok, i'll go look. >>trevor: yeah, and then since the app is,i assume it's either preloaded or distributed through google play, correct? >>simon: yeah. >>trevor: yeah. just as long as the app'scoming from a trusted channel you should be ok there. the thing you wanna make sure is,you know, if a user does manage to, if they're side loading this app for some reason. hopefullythat's not the case. but. since you are registering additional trust routes. if these are justapps from an untrusted source, an attacker
could modify that. just make sure that howeverthe user is getting the apk is from a trusted source and there's not tampered with >>simon: yeah. i mean, the other way i didit was to self sign on both ends and then borrow an encoded cert onto the app itself.but it was just too, it wasn't real enough basically. and it means that you were permanentlyin the state of not really trusting the connection. >>trevor: well, self signed cert isn't badas long as the, both ends, both pairs of that certificate are under your control. if youcontrol the client, you can use a self-signed cert. and there's no harm in that. you'resubject to the exact same caveat i just mentioned that you need to make sure that the apk isdelivered through a trusted mechanism. i mean
you're only self-signing the cert used tosign your application. so. >>simon: well, yeah i just fall into thiskind of crazy elliptical situation with tel coms where they just say "we gotta go viasome paid for rather than a bunch of dudes." and that stuff. >>trevor: understandable. >>simon: ok so i donĂ¢€™t' feel like i'm doinganything wrong then by going through multiple landing urls to get to a decent site. >>trevor: i'm not saying that. honestly, youshouldn't have to. the list of trusted cas shouldn't change that dramatically betweenreleases and between phones. there is a canonical
list of trusted cas that is distributed aspart of android open source. and honestly i'd start with that and that should give youa list of who we say is the trusted cas. and of course there's nothing stopping an oemfrom modifying that list. but you know, if you go with the common cas >>joe: yeah. >>trevor: if they start taking those out it'snot just going to be your app that fails, it's going to be the whole web. >>simon: yeah. i mean, not to keep the wholehangout on that, but i, basically >>simon: that's been the case. you know, yourbanking would stop working when they take
some out. but it was basically komodo gottaken out. couple devices. non-routed. regular devices that carriers they shouldn't justgo to [indistinct] to over cas went missing. anyway, that's great. thanks so much. >>joe: thank you. >>reto: yeah, we have a couple of quick questionsbecause we're just about out of time. >>joe: ok. go ahead. >>reto: a couple in the es room and the hangout.so mario would like to know "will there be more templates for activity creation in theandroid developer tools? and will they support the compatibility library in order to developconsistent apps for android versions prior
to ics?" >>xavier: yes. definitely. actually the currenttemplates do use the compatibility library. but they also use the action bar. so sincewe don't have support for the action bar yet. i'm looking at you, trevor. >>trevor: yeah. [laughs] >>xavier: but as soon as we have that thenwe'll definitely use the support library and we are planning on adding a lot more templates,too. >>reto: excellent. thank you. and. one morequestion. so this is a follow up from chris cole who was asking the portrait to landscapequestion earlier. he says he's writing a note
taking app for jellybean. and people keeptyping, it scrolls my things away. and he's trying to figure out the best way to initiatethe switch to landscape mode for easier typing. so i think what chris is trying to do hereis manually decide whether the user should be looking at the app in landscape or portraitmode based on his activities. sort of, interaction. >>trevor: ok. so he basically wants to programmaticallyswitch to landscape. >>reto: yeah. or what least he's trying tofigure out if that is the best case scenario. which i would probably hasten to say isn't.anybody wanna go into more detail? >>trevor: so, if i were to, probably the bestway to do this. well i was gonna say you could go and tell layout inflator that you wannaput a landscape constraint on there. but then
you have the issues like the keyboard andthings like that. yeah, i'm not sure how you actually go and tell the keyboard you wantto be in landscape mode. >>romain: you can. i don't really know theexact api but there is a way for the app to request a configuration change. i don't rememberexactly where it is. only in the [indistinct ] class somewhere which can. actually a lotof games do that. they request the, the, landscape rotation. now, it might be a little confusingfor the user 'cause you're holding your develops in portrait and [indistinct ] your [ indistinct] in landscape. if the user wants to go in landscape, they can just turn the device whichthey will have to do anyway if you do it for them. but if they want to stay in portraitthen they can't. so i think you should let
the user decide what they want and it's lesswork for you. so that's probably the best solution. >>trevor: i mean, like you said, there areseveral apps out there that do do this. games, netflix does it. but you know, an exampleof just compare netflix and youtube. right. youtube, if you're in portrait mode it findsa way to play the video in portrait. and i think that's a good model to follow wheneverpossible. >>joe: i'm familiar with several note takingapps that are currently available for android and none of them force you to go into portraitor landscape. you might find that in portrait it's much more difficult to write your notes.but certainly if you choose to do that it's
easier than if the application forces youto go one way or another. >>trevor: yep. >>romain: and look what happened with thelauncher on nexus 7. it's always in portrait and so the number one feature request we getis can we get the launcher to go in landscape as well. so i think users don't really likeit when you choose the orientation for them. >>joe: ok. i think we have unfortunately runout of time. i'm really happy that we got so much participation live from our hangout.thank you very much. i hope people will stop in again next week. and until then, we'llall say goodbye. >>trevor: alright, we'll see ya everyone.
[techno music plays]
Touchwiz Home Apk - Apk >>>>> Download Now
ReplyDelete>>>>> Download Full
Touchwiz Home Apk - Apk >>>>> Download LINK
>>>>> Download Now
Touchwiz Home Apk - Apk >>>>> Download Full
>>>>> Download LINK AI