Minggu, 05 Maret 2017

create a google account

create a google account

mike wolfson: thankyou for coming, guys. my name's mikewolfson i am going to talk about androiddeveloper tools. i recently-- we'llget into it-- just wanted to give you a quickconcept of what the agenda is so you guys have an idea of whatwe're going to be doing today i'm going to start offwith an introduction both about myselfand about the tools. we're going to talk aboutadt and command line tools,

emulator, talk aboutsome shortcuts for coding and then we'll talk aboutperformance monitoring and things like that. i just want to give you an idea. i've given this talk previously,i've given it a few times, but this particular slidedeck came from oscon. their presentations aretargeting 40 minutes which is not a lot of timeso i've expanded it quite a bit forthis presentation

but i think it'll go about, i'mtargeting just about a little over an hour, hourand 15 minutes. if you want to askquestions, go ahead and raise yourhand and interrupt. obviously if i can'tanswer it or if it's too much of a digressionwe'll just move on and i'll answer afterwards. i mentioned i've given thistalk a few times at oscon and devcon, and afew other places.

generally, i have had livedemos in the presentation. when i did this talk foroscon i put all the demos, kind of as slides,and everything went so much smoother. so there won't bea lot of demos, but if there's something that,in particular you want to see we can do that afterwards. i'd be happy to show youhow to run any of the tools, specifically, how torun any of the demos,

or any sort of questions. so we will tacklethat afterwards. ok, so just alittle bit about me. i guess the mostimportant thing about me, is i run the phoenix chapterof the google developer group. i founded it, i'verun it for i don't know how many years, butanyway i run a google developer group in phoenix. i love the community and i lovejust getting people together

to talk about tools and stuff. i'm also a full timeandroid developer. i currently work, i live inphoenix, i work for a company here in silicon valley, insan mateo, named epocrates, they're a healthcarepoint of service app. some people, maybe,have heard of them. and i am a full timeandroid developer. that's what i do inmy day job, and that's also what i do for fun.

so i've been luckyenough to find a job that allows meto do my hobby for fun. previous to that, i have about15 years of experience, mostly, in enterprise java development. so for the firstbook, can anybody tell me what's unusualabout this picture? audience: [inaudible] audience: why is there,there's like some piece of paper [inaudible]

audience: you havea cheat sheet? audience: i see a kitkat. mike wolfson: no, that'san ice cream sandwich. mike wolfson: ok, wellactually the statute is not correct anymore. the jelly beanstatue was changed. this picture was taken theday that the jelly bean statue was unveiled. and they changedthe top of that.

it doesn't have aclear dome anymore. now it's got a bitof green thing on it. so, there'll be otherchances to get books. i also want to mention, ifyou guys don't particularly want a hard copyof the book, i'm more than happy to make thesoft copy available for download for free. so just keep that-- [applause]

that's great. so obviously that'sbetween you, and me, and not o'reilly, but anyway. [laughter] but i do want you guys toknow that if you really are interested in the book, comeup and talk to me afterwards. i'll give the url, whereyou can go download. i have all four differenttypes of drm-free books in my dropbox.

so i'll share that link. so i just want youguys filled out. ok, we talked enough about this. i just published thisbook for o'reilly. it's been out aboutfour or five months. so i've always been passionateabout the android developer tools. they sometimes havesome challenges in understanding how to usethem, and how to run them.

so i figured itwould be a good topic to share because i thinkit's really important. i think the toolsare really fantastic and that the project, andthe team are really great. i think the discovery andusability of the tools, not usability, but the discoveriescan be challenging. so that's why i wrote the book. the other thing is iam an active developer, and for fun i have a app in themarket called droid of the day.

it is a app of the day app. basically, everyday you'll geta notification of a new app. it's been in the marketfor quite a while. it's got a decent numberof downloads and it's free. so if you're interestedin apps, check it out. the other thing i'll mentionis if you're an app developer and you'd like to seeyour app featured, this is a good wayto get visibility. and part of thereason that i run

this app is because i like tohelp independent developers find an audience, which can bechallenging in the play store. if you're a developer,let me know, and i'll see aboutfeaturing your app. ok, real quick, i justwanted to tell you a little bit about somepresentation resources. these slides are allavailable up on slideshare. so they're available. there's an old copy there now.

after thispresentation i'll make sure i upload the newest copy. but that's what theurl will be there. the other thing iwanted to mention is, when writing the bookand for this presentation i did generate a project,an android project that is designed to help run thedemos and generate examples. so it's a pure github. so if you want todownload that, that

should help yourun all the demos and you'll see throughoutthe presentation there are certain timeswhere i might reference that. so in regards to that any timethat you see a gray box down at the bottom in that stylethat's going to infer it's a tool, it's somethingfor you to try at home, or acommand to type in. so when you seethat box that should key you in to knowthat you have homework.

ok, so that's enough about me. let's talk a littlebit about the tools and then we'll get into thenitty gritty of actually using the tools. so the first thing i wantto mention about the android developer tools is that theyare free and open source. so i don't want to makea political statement about android, but the androidaosp is realistically not open source.

they don't takesubmissions and it's not developed in the open source. they give it to theopen source community after it's been developed. the difference is theandroid developer tools are developedcompletely in the open. there is a open branchthat you can go check out the latest revisionsof the code, and they do take submissionsif you have a fix or something.

they do accept submissions. so it's a much differentsort of project than android. and the other thing that'simportant to mention is it's runindependent of android. they are not necessarilythe same team, they're run differently, theyhave different schedules, and they have differentkind of ways of operations. so they're very, very different. tools on android.comis the location

where you can get allthe information you need about the tools. i will also say this aboutthe tools development team, is they're very open,and very available. you'll see that they'reanswering questions in the group chat, they'renot very secretive, and they're very open. so it's a really agreat team, and they seem to be runreally well, and i

think they've done a great job. ok, so let's talk aboutthe tools a little bit. i think you guysare probably all familiar with theeclipse-based adt. that's basically the tools thatwe've been using for many years now, very, very stable,very rock solid. at google i/o this year theyintroduced the android studio. android studio is a newflavor of android ide and it lives along side of theadt, android developer tools.

now i do want to saysomething very important, and i have verifiedthis, this doesn't mean that the eclipsebased tools are going away. it just means that there'sa new flavor involved. we can talk about why they'redoing this, if you'd like, after the presentation. when this first cameout, a lot of people thought, "oh man, now igot to learn a new tool, eclipse is going away."

audience: so is[? tulle norve ?] a member of this tools group? [inaudible] mike wolfson: yes,absolutely, [? tulle norve ?], [? javier ?] [? de roshe ?]those are the two big names that i think are themost representative. so it's important to know thatjust because they introduced android studio, doesn'tmean that android developer tools are going away. the eclipse based toolsare extremely stable,

they're very feature rich, andthey have a huge user base. there would be no reasonfor them to abandon that, and just to drivethis point home, they're not abandoning eclipse. so let's give it a littleanalogy of the difference here between the two tools. so i kind of consider eclipselike a gold camry station wagon, reallyreliable, rock solid, is going to get youwhere you need to go,

but you may not lookthat great getting there, and it may not be thatmuch fun to drive. whereas, the android studio ismuch like this ferrari f430, that is rockin' fast,and handles great, but if you don't knowwhat you're doing, you're going to wrapyourself around a tree. audience: it's mightierthan the eclipse then. mike wolfson: yeah. android studio is definitelythe sexy hotness, quick,

or you don't necessarilyhave a reason to be using androidstudio, i would strongly suggest that you stick with theeclipse-based tools for now. they're stable, there's ahuge community of support around them, and all thequestions are answered, things like that. and we'll talk justa little bit more about what android studio is. did you have a question?

audience: so howmuch of the code is the android'scommon [inaudible]? mike wolfson: i don'tknow about a percentage. i do think some ofthe tools are common, but i don't think theyshare a lot together. but i would have no wayto know the percentage. audience: can yourepeat questions? mike wolfson: oh sure. sorry about that.

the question was,how much code is shared between androidstudio and adt? and the answer is i don't know. ok, so let's talk a littlebit about android studio, what it is, so that youkind of know some of the key differencesbetween that and the eclipse-based tools. so android studio isbased on the intellij ide, so a completelydifferent ide,

has different key commands, adifferent way of doing things. it also implementsunder the covers, the new gradle-basedbuild system. now i just want to mention aboutthe gradle-based build system you don't have to useandroid studio for gradle. you could also runyour builds, your clips builds, using the gradle build. and if you look in theexport, file export, you can actuallyexport out of eclipse,

you can export yourgradle build files. so if you want to playwith gradle, which is a whole other discussion thatwe're not going to get into, what gradle is. i would stronglysuggest that you start thinking about gradle. i mentioned that androidstudio is not replacing adt. gradle is replacing ant. so they have said that gradleis their future build system,

and is deprecated. so you want tostart using gradle. and gradle is really welldesigned for android. it allows you to generate allsorts of different builds, just right from the buildtool, things like that. so, again, i'm not sure i'dsuggest using android studio. i would suggest checkingout gradle and trying to come up to speed on that. i think that will benefit you.

one really great thingabout android studio is they have a reallyrich visual editor. so they have a realtime visual editor that will allow you tomake changes in your code and look at thechanges as they'd be represented inyour ui directly. so they also have a reallyrich drag and drop ui builder. it's clear that,that's like something that you get, really good,out of android studio.

the other thing, is theyhave really good integration with google cloud services. i haven't done this myself,but what they demoed at i/o was you could look at yourdata model, right mouse click on the data model,and generate a code that would allow you to create a syncto the google cloud services. so pretty cool stuff. and no doubt androidstudio is going to really keep innovating.

and we're going to see a lot ofmovement with android studio, and not as much asadt, but for now. and this is the last bullet. it's still an earlyaccess preview, which means it's alpha,for the most part, not even beta, is buggy,it is certainly influx, and it is not forthe weak of heart. so, i think statement made. audience: how stableis gradle build system?

[inaudible] mike wolfson: i would suggestusing gradle now, yes. it is stable, yes. it's still, alsopretty dynamic, but i would suggest usinggradle now and i do think it is stable enoughto be production quality. there's probably goingto be some features that aren't implemented yet. but maybe if you'rean early adopter

you can help drivesome of those things by communicating thoseneeds and things. i should have donethis earlier, can i just see a show of hands of howmany people are active android developers now. great, and howmany of you people are really comfortablewith the tools and think you reallyknow how they work? ok, well i do covera lot of the basics

and i added some more advancedstuff to this presentation. so hopefully i will have somestuff of interest to everybody. audience: so the nicething about eclipse is that it clonesjava and sync so it's easy to create [inaudible] mike wolfson: well, yes intellijis an ide just like eclipse. so you can do different projectsof all different flavors, web projects, c++ projects. audience: just [inaudible].

mike wolfson: yeahok, so historically, if you wanted to installthe android developer tool, you had to download a bunchof different components, the plug-in, the ide,the java, et cetera, and then wire them all together. fortunately, thisis all gone away. and now, for both androidstudio and eclipse, there is a downloadable bundle. and this allows youto just download

one platform specificzip file, install it on your system, andeverything works. so the reason i includedthis in the slides is because it'sreally important. if you're working with anold android installation and you're scared to touch itand every time you upgrade it, it's fickle, andyou have issues, wipe it away, deletethat completely, and start with a bundle,because it is so easy.

in fact, frequently, ifi do have those problems that i can't get an upgradeto work, or whatever, i wipe away my androidinstallation completely, download a brandnew bundle, which is going to have all the currentlatest code already in there and working. so don't be afraid ofthe bundle and if you are having anychallenges don't be afraid to just wipe yoursystem and start fresh.

the only challengewith the bundle is it's about 400megabytes a download. so the biggest problem isgetting that big download the first time, after thatit's as easy as could be. ok, so i'm going to move onto the android debug bridge. android debug bridge iskind of what the name says, it is a bridge that allowsyou to debug your android device from your computer. so this is basically acommand line tool and also

a communicationtool that allows us to interact withour android devices. the important thing to notehere is an android test device can be an emulator or itcan be actual physical device, and for the mostpart, there's not a whole lot of differencebetween those two things. so this is one of those caseswhere you see a gray box that allows you to, theseare some commands i would encourage you totry on your own later.

obviously, adb helpis super simple, but you can seethe kind of things that you can do with adb. you can push filesfrom your device, you could pull files, you caninstall an apk, and run an apk. there's a lot of moreadvanced stuff you could do. you can actually install anapk, and run a single activity, and that activity doesn'thave to be the main activity in your manifest,the one that is

marked as your main activity,a ton of flexibility. now the cool thing is becausethese are command line tools that flexibilityis available to you to script, or withoutany sort of rich ui. i assume most of youguys had used adb. the other reallycommon use for adb is if you're romingand rooting your phone. obviously, adb isthe main tool you use to do that, to unlockyour bootloader, to push files

onto the phone,things like that. there are a ton ofstuff you can do. i'm sorry, the one lastthing i wanted to point out was this one at the bottomwhich actually allows you to, well there's two things. there's two last bullets. the first bulletadb shell allows you to open a shell commandon your android device and operate any ofthe commands that

are involved in a shell, ls,nv, et cetera, et cetera. now the shell thatcomes with android isn't a complete linux shell,it doesn't have all the commands that a regular linux shell has,but you could do a whole lot, and adb shell allowsyou to actually remote into your device and do anysort of things that you want, look at the system, inspectfiles, et cetera, et cetera. but the really cool thingit also allows you to do is, you can opena sqllite command

and intraspect your databases. so if you are doingdatabase command and you want to figureout what's in your tables, your table structures,et cetera, et cetera. there's a sqllite'scommand that allows you just as if you were usingsqllite on any other system. the other really important thingthat we do with adb is logcat. i'm sure you guys areall familiar with logcat, but i would guessthat you're not

familiar with all thethings that it can do. so i just want to run througha really quick example of some simple stuff inlogcat, explain how it works, and explain some advanced stuff. so the first thing youcould do with logcat. logcat has two sort of concepts. the first concept isa verbosity level. just like you guys, i assume,you guys have used log4j, where you can setthe debug level

to verbose, debug, etcetera, [? bug warn. ?] that same conceptexists in android, so when you createa log statement, so like this onein my java class, you can set a verbosity level. in this case, i haved set, so debug. but the cool thingabout logcat is you can also associate atag with your log message. so in this case i have thismytag tag and then the log

message. what this allowsyou to do is, you can filter based on the tagsthat you create in your code. so generally what you do is,when you're writing your code, you create tags that arespecific to functional areas that you want to test. then you can filterbased on those tags and see how your codeprogresses through that particular functional area.

so a quick example,this is a logcat, where i have not performed anysort of filtering based on it. again, i'm sure you guys havelooked at logcat messages. there's a ton of stuff that goesthrough, especially if you're using a real physicaldevice, there's all sorts of systemevents happening. if you want to see whatyou're looking at you've got to look real closely, andyou got to look real careful. so you can see, ihave those tags,

but if i didn't havethem highlighted here they'd be pretty hard tofigure out where they were. so all you'll do is if youdo want to see logcat related to your particular tags you justissue a command, add logcat, mytag:0, then the importantsecond part of that command is the not colon sotag, colon, star. before the colon, is thetag, the part after the tag, is what verbositylevel you want seen. so in this case i say i wantall verbosity levels for tag

and the secondimportant thing is, i want to silenceeverything else. so that's what thestar, colon, s means. and when i do that, you can seethat now i can very clearly see exactly what i'm looking forand all the fluff is gone. now that's pretty cool. you can filter basedon a single tag, but the importantthing is you can filter based on multiple tags.

so in this case,this example shows i'm filtering basedon my own unique tag. i want to see my tag. but i'm alsointerested in seeing how my tag relatesto packagemanager. so, basically you createthat command, mytag, colon, asterisk, packagemanager, colon,asterisk, and then don't forget the asterisk, colon, sto silence everything else, and you'll see now ihave just the information

about the two tagsthat i'm interested in, and you can create asmany different filter sets as you want. you can string multiple sets,and of course you could also filter based on a tag, anda verbosity level combined. so there's a ton of flexibilityand if you design your log messages withthese tags in mind, it is a indispensable toolwhen you're trying to debug. it allows you toreally drill down

to see just thestuff you care about and remove all the other fluff. so that's just basic logcat. did somebody have a question? so that's just basiclogcat, but you can do a whole bunch ofother stuff with logcat and i leave thisslide for you guys to try when you're at home. you could also, ifyou're interested in only

a particular buffer, like theradio buffer, or the events buffer, or themain buffer, which is the default in this case, youcan specify a particular buffer that you want to see. so you can filter, so you'reonly seeing the radio buffer. that's the onlymessages you care about. obviously, that depends on thetype of code you're writing. there's also a variety ofpre-defined output formats. so brief, is thedefault and that

specifies different parametersthat will be output, but time is a reallyuseful one that appends the time, which isn'tin the basic log functionality, and again you can add thesecommand lines, these command line arguments, inaddition to the tags. so you can see there's areally rich, rich set of logcat functionality. the last thing, i'mnot going to demo, but is really worth exploring,is the logcat tab in eclipse.

this allows you to save a bunchof filter sets, and tag sets, so you don't have totype them every time. you can actually, save atag set, and click on it, and it will filterbased on that. and the other really coolthing that the logcat viewer and eclipse hasis a regex editor. so you can actuallysearch your logs using regular expressions,which again is really rich. so as developers i'msure you guys all

realize that logs arereally important, especially when you're in the midst oftrying to figure something out and logcat reallyallows you to get at exactly what you want to see. good. ok, so that's logcat. let's now talk a littlebit about emulators. i want to address,first of all, some of the capabilitiesof emulators,

and then we'll talk aboutsome of the limitations. first thing you cando with an emulator, is you can simulate telephony. so you can simulatelatency, or connectivity, or simulate events, asin sms, or a phone call. you can't actuallymake a phone call, but you can simulatea phone call. you could simulate location,including kml, or a path. you can specifya single location

that your emulator issupposed to emulate. you can emulate a varietyof different hardware. now that's the importantthing and the reason why we want to use an emulator,is there's a lot of android devices in this world. i think, the last time i lookedat my droid of the day console, that my app currently supportslike 3,000 different devices. even if i wasreally, really rich i wouldn't be able to purchaseall 3,000 of those devices

to test with so usingemulator allows me to simulate a variety of differenthardware configurations so that i can at least getclose and know for the most part now there are some limitationsi guess which we'll get you in a second on emulators. audience: does it emulateall the different resolutions of the different devices? can you do that? how accurate is it?

mike wolfson: sothe question was if you want to emulate differentresolutions of devices, can you do that andhow accurate is it? that you absolutelycan do you can actually i'll show in asecond when i show you how you set up an abd you couldspecify a preset resolutions or you could actuallycreate your own. so for resolution,you absolutely can emulate it, exactly right.

what you can't do, we'llget to in a second. what you can't dois emulate the skins that the manufacturersput on their devices. so touchwiz ismotoblur, i guess, i don't know if that existsanymore but touchwiz or lg skin, those you cannotemulate in a emulator. audience: is it better thanlike [inaudible] nexus10 mike wolfson: wellactually that's now a little different things.

so the question wasthere's a process that you can usewith the nexus 10. using adb, you canactually have the nexus 10 emulate differentresolution sizes using [? netsome ?] commands. so the question was, isthat a better approach, or is using an emulatora better approach? and the answer is, it depends. go ahead.

audience: [inaudible]locations, what are the different options?[inaudible] gps, [inaudible] mike wolfson: it is latlng. it takes latlng, [? kml, ?] andone other type of format of-- i can't think of the third. gpx? is that a-- mike wolfson: what is it? ok, well there's three types.

i'm not sure of the third. yes? audience: [inaudible] armemulation emulate [? all ?] counters that are availablein some [inaudible] mike wolfson: the questionis, does the arm emulation, basically does it performthe same as a real arm phone? is that your question? audience: yeah. some new arms come withperformance counters

so you can figureout [inaudible] mike wolfson: so the questionis, does the emulator perform the same as a device? the answer is no,definitely not. if you're doing reallyperformance testing, you probably want touse a real device. there's so many variables inan emulator, both the device, the physical deviceit's on, your computer, how many other thingsit's working on,

et cetera, et cetera,the performance is not going to beaccurate to what you would see on a real device. audience: so intelligenttesting on the android market [inaudible] i think itwould be a good idea to use a x86emulator just to test [inaudible] x86 [inaudible] mike wolfson: so the commentis, in addition to amd, you also may want to testusing the intel chipset,

because there areintel phones around. and i'm actually going todiscuss that in a second, because there's otheradvantages in addition to just emulating intel chipset. so i am actually going totouch that in a second. last thing you cando with the emulator is you can do media actions,but only audio, not video. you cannot do videoon a emulator. some of the limitationsof things you cannot do

on a emulator includegoogle services like gmail, or the playstore,things like that. now there are ways to hackthat on to your emulator, so there are ways towork around this issue. but out of the box, it is notdesigned to run play services. and i think there'sobstacles, and there will continue to be obstacles. they don't want thaton the emulator. you can't make real phone calls.

i think we alreadykind of discussed that. certain graphicsupport, again, this is getting back to kind ofwhat we were discussing before. the performance is notthe same, so if you're doing a game orsomething that requires very precisegraphics performance, the emulator is probablynot the right place for you to be testingyour functionality. the other thing that's limitedon a emulator is touch events.

you have a mouse tointeract with your device, so multi-touch or certainother operations are limited. you just can't do that. audience: so for multi-touch[? on a laptop ?], [? a ?] touch screenlaptop, [? do you think ?] they're going to supportthat in the future? mike wolfson: yeah,so the question is, using either a touch screenmonitor or a computer that has a multi-touchkeypad, will they

support multi-touchin the future? i don't know theanswer to what they're going to support in the future. there is a adbbridge that allows you to use your device as atouch sensor for your emulator. so again, as i'm sureeverybody in the room knows, and anybody that'sdone professional android knows, when the questionis, does android do it? the answer's always yes.

because it's suchan open platform, there's always some wayto get what you want done. if you have enough time,money, and resources, you can do pretty much anythingyou want with these things. but out of the box,it's not supported. there is limitedaccessory integration. you can use usb and headphones. and the other biglimitation of emulators is they're really slow.

slow to start, they canbe slow to deploy to, and they can be slow to run. so i am going to show you sometips on how you speed it up, but again, i'm sureeverybody in here knows when you startyour emulator, it's time to go grab a cup ofcoffee, or go check out facebook or whatever, becauseyou're going to be waiting. it can take three minutesfor an emulator to start up. ok.

yeah, go ahead. mike wolfson: so thequestion is, is it possible to emulate bluetooth? i don't know the answer to that. i would suspect not,because that-- i don't know. i was going to say becausethe computer hardware would require bluetooth. of course, most computersnow have bluetooth. so i don't know if youcan emulate bluetooth.

that's a good question. in fact, you get the first book. all right, so as imentioned, there's lots and lots of androiddevices in this world. every device on this screenruns android, or at least interfaces with android. so it's really importantthat you understand emulators and understand howyou can use them so that you can be ableto test on the biggest

variety of devices possible. i think in aprofessional world, this doesn't excuse you not havinga variety of actual devices to test on. but emulators will get youa good distance of the way. so let's talk for real quick,we'll take a quick diversion. let's say that you don'twant to use an emulator. you can use almost any androiddevice as a test device. there may be veryfew exceptions,

but for the most part,any android device works as a test device. the only thing you need todo is enable this check box in your device settings app. so basically, you justneed to allow your device to run applications fromoutside of the play store, and you can run any app youwant on your android device. i'm sure thereare some, maybe, i assume probably thekindle fire doesn't

allow you to do that,some other things. but for the most part, anydevice that's available now. the challenge is, after os4.1, they hid-- i'm sorry, so that particularfunction, actually, i'm not sure if that functionis hidden in developer tools or not. but that's the step one. step two that you're probablyalso going to want to do-- audience: it's not.

mike wolfson: good. audience: it's in the main area. mike wolfson: ok great. so allowing appsfrom non play store is not hidden inthe developer tools. but, you're going to want toaccess the developer tools, enable the developertools on your device, so that you can debug directlyinto the device, hook up a usb, things like that, in additionto some other things.

now the challenge is, inos 4.1, they hid that. so this used to bean item that was available in your settings app. you just had to gofind it and enable it. now, it's hidden. so the way to get there nowis you click on the about phone button seven times, andat the end of the seventh time, you get a nicemessage that says, congratulations,you're now a developer.

and that shows up in your list. audience: really, it willeven count down for you. you will start hitting andit will go like, 4, 3, 2, 1. so the comment is, onceyou start hitting it, you'll see click seventimes, six times, five times, four times. i'm not sure, but i thinkthat might move, actually, what you have to click. i thought i might have had toclick the build for kitkat.

audience: it wasabout phone when i rooted my seven, so,that was for kitkat, so. mike wolfson: ok. ok, good. so anyway, that's whatyou want to do now. the cool thing is,basically what i just told you is how you can useyour phone as a test device. but the developer options thati just showed you how to enable have a ton of really greatfunctionality in them.

and it's all based on testingon your device, itself. obviously, usbdebugging allows you to hook a usb deviceinto your phone. that's pretty normal. but the other thingsyou can do in there, and i really encourage you guysto go look in the developer options and just startplaying with these things, are allowing mocklocation, so that allows you to specifysome of the locations

we were just talking about. strict mode allows youto flash your phone, it flashes your phone redwhen you're doing operations on the main ui thread. which, as goodandroid developers, you never want to dolong running operations on the ui thread. so there's justa check box there that allows you to quicklysee, and it's really obvious.

in fact, i runthis all the time. i have strict mode enabledon my device all the time, and it's interesting to seehow many apps are being bad. but as a developer, it'sreally great for you to be able to see whenyour app is being bad. and it's really in your face. you could show touches, so ifyou're doing a presentation or something, it willhighlight the touch points you're pressing on your device.

you can change the animationand transition scales so that you can get a closerlook at the animations that you're using, andif your debugging those. you could also select-- andthis is just a small list. there's a lot of stuff in there. you could also, one,don't keep activity. so this will killthe activity as soon as it closes, which allowsyou to mess with state if you're doingparticular operations.

so the developer optionsthat are on the phone are really, reallyrich, and something that most people don't use,but something that you should. and they're reallylow risk to play with. just go enable yourphone, go start playing with those things. i mean, you're not goingto mess anything up. basically, these are justvisual cues and things. but i think you'll learna lot running your app

and enabling some of thesedifferent developer options. ok, so rememberall these devices, and remember thatwe can't possibly afford to buy them all. let's say that we justwant to concentrate on that top little area,the phones and tablets. that's where youreally want to start talking about usingemulators to emulate some of these differentphysical devices.

and so i want to go ahead andtalk a little bit about how you set up an emulator, someof the different options you have, and also how we goabout speeding up emulator, ok, so the first step youwant to do when you're creating an emulatoris you're going to create something calledan android virtual device. so this is basicallyjust a representation of the physicaldevice that allows you to specify a varietyof different things

that you want your particularemulator to look like. so you'll notice,in this case i have it emulating a galaxy nexus. i can specify which particularos i want to target. i can specify which particularcpu i want to target. currently, you can selectbetween arm, intel, and a third. audience: nips?[inaudible] nips? mike wolfson: nips.

you can specify hardware,keyboard, things like that. if it has a camera, if itdoesn't have a camera, memory footprint, and you canalso specify sd card, now there's a coupleoptions at the bottom that i want toparticularly call out, because they are particularlyuseful and particularly functional. the first one is use host gpu. so this allows you to, ifyour computer has a gpu,

it allows you toleverage that to improve the performanceof your emulator. so it will attach that cpu. i think that that'sonly available if you're using the haxmemulator, the intel. is that correct? i think you canonly the host gpu if you're using anintel emulator, which we'll get to in a second.

but the other reallygreat thing is snapshot. so if you guys have ever usedany virtual machine, vmware, et cetera, when you closethe virtual machine, there is functionalitythat allows you to save a snapshotof that virtual machine so the next timeyou bring it up, it brings it up tothat same place. that's exactly what thissnapshot functionality does, because these arebasically virtual machines,

anyway, these emulator images. so when you'recreating your avd, if you check thatsnapshot button, it allows you to enablethe snapshot functionality. then, when you'relaunching your avd, you can select thesethree buttons here at the bottom, which allowyou to use the snapshot. so the first time youbring up your emulator, you will wipe userdata, and then

have this save tosnapshot button enabled. so generally whati do is, i bring up an emulator from scratch, igo through the various startup options that it presentsyou, like there's the android overlays that say press ok toput apps here, or whatever. i go through allthose startup options, so i have a fresh emulatorthat has been started up, and i've gotten throughall these startup dialogs, and then i killit right there so

that i have a pristine emulatorthat has been started up and is in brand spankingnew fresh state. next time, when i startmy avd, my emulator, instead of having wipeuser data selected, i have launch fromsnapshot selected, and not save to snapshot. so next time, when istart up this emulator, it's going to start it up usingthe snapshot that i just took. and the great thing is itchanges the start up time

from, like i said, three,four minutes, to seconds. maybe 10 seconds, 20 seconds. if you're not using snapshots,this will-- in fact, if you leave here now, you justlearned something really good. snapshots will saveyou a lot of time. the other thing youcould do using snapshots is if you do have aparticular state in your app that you want totest repeatedly, you can bring yourapp up to that state,

and then save thatstate as your snapshot. so you can always bringup your fresh emulator to exactly the point in thecode that you need to test. ok, so we kind of touched onsome of these things before, but there are alternatives tousing the android emulators. first one is intel's haxm. so this allows you to createemulators using the intel chipset. so if your computer is runningan intel chip instead of an amd

chip, this is agreat thing to do. now, performancewise, it's fine. but the intel haxm emulatoris much faster to start up, and much faster to deploy to. so, right therein and of itself, it is a much faster experienceto be using the intel haxm emulator. big giant limitation of haxmis that it doesn't support the google apis, it onlysupports the android apis.

so if you're doing anythingthat requires google apis, gcm or some of the other optionsavailable to android, intel haxm is, unfortunately,not available to use. so if you're notusing the google apis, intel haxm's really great. i would really stronglysuggest you use it. it supports snapshots just thesame as the standard emulator. so there is alsoanother newcomer on the block, called genymotion.

and they provide,basically, turnkey options for generating emulators. so instead of with haxm orthe standard android emulator, i have to go through createthe emulator avd that i think is appropriate to myneeds, start it up, et cetera, et cetera. genymotion providesa really rich gui that allows you tostart from a variety of pre-configuredemulator images.

the cool thing about previousversion of genymotion, and this has just changedwith their new release, is the last versionof genymotion actually did supportfull play services. so it supported the play store,you could create a google account on a genymotionemulator, all those things. unfortunately, thatdidn't last long, because they just announcedin their next release that that's going away.

i'm pretty sure, and ofcourse, we don't know, because genymotionis a closed project, i'm pretty surethey use intel haxm. it's really fast. it's really robust. the cool thing about bothintel haxm and genymotion, and this is one of those thingsyou might not key in on early, but really makes a differencein the development process, is the deployment speed.

so it takes a littlebit of time to deploy to an android emulator. both haxm and genymotion,the deployment time is much more rapid. so those are some things thatyou might not key in on early, but it makes a bigdifference, especially in your daily developmentcycle that you're deploying, deploying, deploying. one sec, this guy.

audience: you saidamd several times., but you actuallymeant arm, right? arm, sorry. the question is, i've beensaying amd, do i mean arm? the answer is yes. mike wolfson: android studiouses the same emulators. and i'm pretty sure you can usegenymotion or haxm, as well, on android studio. ok, so that'senough of the tools.

let's talk about coding. there are a ton of reallygreat tools built into the adt that if you use them, willsave you a lot of time and a lot of mistakes. android, as again,you guys all know, can be pretty challenging. there's a lot of moving parts. you have your xmlfile, your java file, you have other externalconfiguration files,

for certain operations thatyou're using a fragment, you have multiple javafiles all connected. it can be really challenging. and if you mess up one piece,one attribute in that xml file, it can be a bear totry to debug that. there are a ton of automatedcode generation tools, that i'll show you in a moment,that at least allow you to stub out your initial code, sothat you're not fighting the basic stuff, and you canconcentrate on the business

logic and the importantstuff, as opposed to creating these foundations. audience: so, gradlemade that easy. mike wolfson: gradle? mike wolfson: how so? the comment is,gradle made this easy. audience: there's nottoo many moving parts. mike wolfson: right. yeah, gradle does make someof these configuration things

easier, because of thenature of their resource. you can build multiple apksfrom different resources within. yeah. so there's really great supportfor java and xml editing that you can take advantageof, and there's also a really rich robustvisual editor that most people probablydon't use, because it used to kind of suck, basically. ok, so let's talk a littlebit about some of the code

generation wizardsthat you can use, and why you really shouldbe using these things. so to access anyof these wizards, you can hit file,new at the top, or control, or command on apple. and that will bring upthis wizard selection. you can see there's avariety of different things you can do in there. you can create an icon set, youcan create a simple activity,

you can create anandroid xml file, a variety of different things. these are reallyrobust tools that will allow you to just createa simple code that you can then go in and fill outyourself later. so let's start withthe first example, and that's android icon set. so again, you guysall know what a hassle it is to come up with allthe different versions

of your icons. you need to, first ofall, figure out what size they need tobe, what folder do they need to go in to? do i have xxhdpi for thisone, et cetera, et cetera. it's a real challenge. not to mention, tryingto communicate that to your graphic designer orsomeone else on your team. this android icon set,and the other thing

i will mention aboutthis particular tool is there's a really--in fact, this tools good, that's built into eclipse. but this tool is based on a webproject called android asset studio. android asset studio,remember that. it's a websitethat not only will allow you to create yourdifferent resolution images, but android assetstudio, the website,

allows you to create framesfor your screenshots, or a variety of otherdifferent really great things. so this is just a subsetof what is on that website, but let me just show you whatthis particular thing allows you to do. so once you've selectedcreate an icon set, it's going to bringup this wizard. basically whatthis wizard allows you to do is, you couldselect an image that's

your own icon that you cango select from anywhere on your system, clip art, thisis the android standard clip art. so if you want to make sure thatyour settings icon matches what the android settings iconis, it's all there for you, and it's built right in. or you could createa text one, which is what is shownhere in this example. so you can selectyour different icon,

what you want youricon to look like. you can specify colors, changeall sorts of different things, change the padding. when you press finish, itactually will create the icons and place themwithin your project, in the folders they'resupposed to go. so it's going to create aldpi, hdpi, et cetera, image in the proper resolution. and also, it's going to putthose in the proper folders

with the proper name. so the best way to importimages into your system, even if your designerhas given it to you, is bring up the imageusing that image option, and then allow assetstudio, or asset, to put that intoyour project for you. this saves a whole lot oftime, and just another workflow thing that i use that hasbeen very successful for me. when i'm creating mygraphics, i generally

know what name i want to useand what graphics i need. so what i'll do is, i'llcreate a stubbed out graphic just like this, maybeaa or something red and ugly, name it the proper thing,put it in my resource folder. then, i actuallygive that resource folder to my graphic designerand say, here's what i need. and they know exactly whatsize images they need to do, and they know exactly the names. so they can then put all thoseimages into that resource zip,

give it back to me, i copy itinto my project, and i'm done. there's no imports,and all the names match and all the sizes match. so that's something that hastaken me a long time to come up with, but saves awhole lot of time. it's really challengingto communicate all the different resolutions. ok, so that's androidasset studio-- that's creating an asset, andthat's really, really useful.

i suggest everybody use that. you can also generate greatcode with these wizards. and here's one of themore complicated ones, and it's a very commonuse case, and that's multiple fragments witha list view on one side and a detail viewon the other side. and if you guys knowabout android development, there's an adapterinvolved, there's an activity, twofragments, and then

all the wiring that goesbetween those things. some xml files, there'sa lot going on here. this wizard allows you to walkthrough a couple different questions, specify thenames of the items you want and the activitiesthat you're creating, and it will generatethe stubs for the code that you want to generateand place that directly into your project. it's just a great first stepto allow you to stub out

all the things, thewiring and the hard stuff. and get down to thenitty-gritty of writing code. ton of stuff to explorein these code wizards. the other thing i just wantto mention-- if you're not happy with the codewizards that they provide, you can actuallycreate your own. so frequently, in thedevelopment process, we create our ownframeworks and components that fit our particularbusiness case.

you can actually createyour own template and allow your developersto just use the template to stub out these foundations. so really useful. and it's these sortof automation things that just make the developmentprocess so much more efficient and somuch more effective. the last thing i mightmention about generating code this way-- because it'sall generated code compliant

android design patterns. so the namingstandards are matched. the division ofworkload, et cetera. so it's a really greatway to get started. i wanted to highlight six ofthe most important keystrokes i use in eclipse. and these are ones thati use all the time. the first one you guysprobably know about. and that's code completion.

control or command, space. this works in both java and xml. so if you're tryingto figure out what attributes youneed in your xml file-- was that wrap content orfill parent or match parent? i don't forget. android clone widthequals control space. and it'll give you the listof all your different options that you can put in there.

that works in both java and xml. i'm sure you guys alreadyknow about that one. if you don't, that willprobably change your life. one that you probably don'tknow about that's also extremely useful and that's kind ofuniversal is control command 1. so if you highlightanywhere in xml or java, you highlight a particularcomponent and hit command 1, it's going to providecontext-sensitive help based on what it is thatyou've selected.

so in some cases,it may allow you to extract that stringto the strings file. we don't want to leavehard-coded strings in our android files. we want to extractthose to strings.xml. that's somethingthis'll allow you to do. but depending on what itis that you've selected, it will providecontext-specific things. so there may berefactoring help.

if you're on a layout parent, ordepending on what you're doing. so if you need help, highlightsomething, command 1. and it will provide you a lotof different functionality. and then the last one. this page is commandshift f. this allows you to reformat your codeto change indentation or change the formatting. the cool thing is this hasspecific functionality for xml. it will change yourformatting, change

your tabs, et cetera,so everything lines up. it will also re-orderyour xml attributes. so if generallyyou want id, width, height to be the top attributes,et cetera, et cetera. there's an order that youwant your attributes in. and if the coder's notcareful, the attributes are all out of order. control shift f will actuallyreorder all the attributes so that they are inexactly the order

that the android designstandards specify. and, if you don'tlike that order, you can specify your own. so command shift f is reallyuseful, both in java and xml, to ensure that yourformatting is consistent. consistent with androidand also consistent across all your entire project. great, navigation. so these items werekey combinations

that will allow you to createcode and speed through some of these things. this page coversnavigation commands. so the first one iwanted to talk about is command o. so anywherewithin an xml file or java file, if you hit commando, it will show you a outline view of your codewith the methods highlighted, so you can quickly justnavigate with your arrow key to the method that you want.

rather than trying tosearch through your code, and scrolling up and down. command o, quicklylook for the method you want to go to, clickon it, and you're there. another great way tonavigate around a project is command shiftr or t, actually. command shift t has amore robust filter set. command shift r, fromanywhere in your system you can start typing the nameof a file you're looking for.

and if you're using camel case,you just use the first letter. so camel case meansuppercase c-o-d-e uppercase p-r-o-j-e-c-t. you can typecp, and it will find that code project file. command shift r isa really great way to quickly find differentfiles that you're looking for. and then the last onethat's really useful is alt shift a. this allowsyou to quickly run or debug your app without having to rightmouse click on the project,

run as. or, i don't know if you guysever notice, but there's a little play symbol upin the eclipse toolbar that allows you toalso run really quick. that's anotherquick way to do it. alt shift a allowsyou to quickly run your app from anywhere. so that's commands, shortcuts. i now want to talk a littlebit about the visual editor.

my guess is-- andthis was the case with me-- anybody who thatthe visual editor years ago decided that it'sjust not very good. it puts a bunch of code. it doesn't really work. you're going tostruggle with trying to get things lined up theway you want them to be, the tool is much,much better now. basically, it allowsyou to drag and drop

components from the left-handdrawer right onto your palate. and you can arrange allyour components as you want. it also allows, onthe right-hand side, these property editors allowyou to very quickly select different propertieson different components within your ui. so if you have a buttonand you select it, the properties will allow you tospecify gravity or width or any of those things.

instead of needingto type them, you can go through theselection criteria and quickly select whateverit is that you want. but the one thing that ireally want to highlight. all right, mike, thatall sounds pretty cool. but i'm a coder. i like to do stuff by hand. you still reallyshould be checking out this visual editorfor this bar here.

because what this bar allowsyou to do is within the ide, it allows you to change thevisual style representative of what you're looking at. in addition to, as i have setup here now, and now you'll see, actually you can lookat how your app will look on multiple devices. so if you'll see, in thisscreen i have a 3.2 hvga image. a 5.1 wvga. a 10.1 wxga image.

and i can quicklylook at exactly how my app is going to render on allof those devices in one place. so the way that you get there iswhere it's selected nexus one, you can go intothat menu, and it will allow you to selectwhich of the different images you want to preview your app on. in theory, you can actuallymake changes in real time and see how that'sgoing to lay out in all of thosedifferent image sizes.

audience: so [inaudible] mike wolfson: so the questionis, years ago, people used tools like droid drawor some other different tools to stub out their visual ui. is this good enough now thatyou don't need to use that? i think the answer is yes. there's a really robustset of things you can do. the other thing iwill mention on this is, in addition to specifyingdifferent resolution screens

that you want tolook at, you can also specify api levelsusing this selection. or you can use thisone to actually look at your internationalization. so if you have enabled germanlanguage, french language, et cetera on yourapp, you can actually select those from this drop downand see how your app lines up when you're using germancharacters or something. and obviously, that'sreally important,

because certainlanguage character sets are bigger than others. and this allows you veryquickly to modify your ui and understand exactly howit's going to look right here, really quick. there's no deploy cycle. there's no fiddling with yourphone to change the locale. it's all just right here. so even if you're not going touse the visual editor to drag

and drop componentsand select properties, i would reallyhighly suggest that at least when you'retesting, that you bring your app in thisvisual editor and play with the differentresolutions and things. so we're coming upto the last section. and that's performance testingand performance monitoring. so the first thing thati wanted to make everyone aware of that youmight not know is

there's something calledthe tools monitor. so if you type "toolsmonitor" from your-- if you have android home set,you don't need to put the path. do you guys know what ddms is? the different toolsthat allow you to-- monitor actually allowsyou to run all the ddms tools external to eclipse. i'm going to showyou that, and you'll see that it's exactlythe same as ddms.

the cool thing is,this would allow you to tell people thatdon't have the ide installed, it allows them to run someof these performance tools and introspect someof the functionality without requiring the full ideinstall, or importing a project and doing all those tough thingsthat maybe a tester might not want to do, or aproject manager. so you can bring upthe performance tools using monitor, like thisandroid device monitor.

or if you're in eclipse, youcan show open perspective ddms. so this is what the ddms ormonitor window looks like. you'll notice on theleft, it has a list of devices youcurrently have running, which allows you to select fromall those different devices. on the top right,there's all sorts of differentfunctionality that allows you to introspect differentthings within your app. now, ddms is really designedfor in-depth performance

monitoring. so this is whereyou're going to want to inspect how your threads arerunning, if you have threads that aren't beingclosed properly, or your heap allocation,if you're getting out of memory errors. allocation tracker. where your objects are beingallocated within your heap. network statistics getreally in-depth information

about what callsare being made when, and what kind of data throughputis going through those. file explorer, it'sa gui that allows you to look on your phoneusing-- introspect your file system. you can then pull orpush files to the file system on your phone using that. then the emulator isthe tab i have exposed. this allows you to set--if you want to send latency

on your device, simulate aphone call, simulate a location, this is where you would do that. so some importantthings that i want to make sure everybody--well, i guess we already coveredmost of these things. but the one thing that mostpeople can really use out of this screen--and by most people, this is not even developers--is this little icon right here. this allows you toselect a device,

bring your app upon that device. you press thatbutton, and it will take a screen shot of whatever'sbeing shown on your device. so that's super useful,because obviously, we all need to takescreenshots for demos or promotional materials. upload pictures to theplay market, whatever. this is much easier thantrying to press up and power on the phone atjust the right time,

and then trying toget that file off. so that's a reallyuseful aspect of ddms, is taking a screenshot. so i think we alreadycovered those things. the last tool that ireally want to talk about that i think people might notbe aware of but is super useful, especially forperformance optimization, is hierarchy viewer. so what this allowsyou to do is this

allows you to inspect thevisual hierarchy of your ui, and see where you mighthave extra layouts. in android, the fewerlayouts the better. if you have a bunchof nested layouts due to the way that theview is measured and drawn, the more layouts you have,the longer it takes to render. and that's obviously bad. that causesperformance problems. so this very quicklyallows you to look

at your ui on a visual level andsee what your hierarchy looks like, and try to determine anyplaces where you can optimize. a optimal layout isflat and shallow. this is not as optimal a layout. it's got lots ofdifferent levels. so this really allowsyou very quickly to see exactly howyour ui's laid out and how it's performing. in addition-- andunfortunately, you can't really

see in thisscreenshot-- it actually shows you measurementtimes in that pop-up. so you can very quickly run thehierarchy viewer on your ui, see how long it took torender, make optimizations, run hierarchy vieweragain, and see how your optimizationsaffected the layout times. in that project that ireferenced previously, i have two layouts. one's called bad layout andone's called good layout.

when you look at themon the device itself, they look exactly the same. the buttons are all placedin exactly the same place. the ui does exactlythe same thing. however, one of them waswritten with a relative layout, so it's all very flat andnot a lot of nested layouts. the other is written usinga bunch of nested layouts, a bunch of linearlayout of horizontal and vertical orientationall mashed together.

i encourage you guys to actuallyrun those two side by side and inspect what agood layout looks like and what a badlayout looks like. the same exact layoutin that example runs 20% faster usingthe relative layout. so again, it looksexactly the same, but as an optimized versionit runs almost a fifth faster. audience: how many layersis considered optimal? mike wolfson: so the questionis, how many layers of layout

is considered optimal? and the answer is it depends. there's no hard and fast rules. layouts can be complicated,and sometimes they require a bunch ofdifferent nested layouts. sometimes that'sthe only way to get it done, dealing withweights or other things. the answer is it depends. but the real answerto that is as few

as you can get away with. audience: better userexperience with less levels? mike wolfson: yes. these fewer levels oflayouts that you have, the better user experience,the faster your ui is going to render, and theless resources-- well, it probably takes thesame resources. but fewer layouts, more better. i wanted to just touch onsome other performance tools.

we're almost done here, justto let you guys know that. some other tools that i'mnot able to demo here, but i want you guys to be awareof so you know that they exist. first one is opengl tracer. so if you're usingopengl within your app, this allows you totrace very specifically through all of yourgl calls, so that you can see exactly what's happeningthroughout your code rendering. i don't do a lotof opengl myself.

i don't do that sortof graphic stuff. but really, really usefulif you're doing opengl. really, really usefulto be able to see exactly what it isthat you're doing. so again, all thesetools are just allowing us to get a closer lookat how our code is operating so that we reallyunderstand and that we can optimize whereit's most effective. pixel perfect viewerallows you to look

at very closerenditions of your ui so that you can isolateshadow problems or any sort of dithering or other issuesthat you might have in your ui. network statistics wealready talked about. that allows you very,very close understanding of exactly what's happeningwith your network calls. you can trace the size ofthe calls, the duration, system information givesyou a really good overview of your device.

the memory it'sused, the memory it has available, space on thedevice, things like that. it shows you that insome really nice charts. so it's a really clear visualrepresentation of exactly and what resources areavailable to your device. audience: [inaudible]app that runs for a long duration of time ora background service [inaudible] battery doesn't getdrained within two hours. and if they [inaudible].

mike wolfson: sothe question is, if you're dealing with anapp that might suck battery or might use a lot of power,does the system information provide that? i don't know. i'll look at that in a second. i don't know of a goodtool to track that. mike wolfson: there is acompany in india that does that? facebook isn't going to buy it.

does anyone remember? something [inaudible]. so real quick we'll gothrough these last ones. and then i think we'regood to close this out. so lint is a automatedtesting tool, basically. it's going to, in yourcode as it's live, it will flag certain things inyour code that are either wrong or that are just bad. so for instance, like wetalked about before, if you're

using a hard-codedstring within your code, lint will go throughautomatically and it'll put a little flagnext to that says, hey, you probably don't want to beusing a hard-coded string here. and then, when youmouse over that, it will give youremediation strategies. and in some cases, will actuallygo ahead and fix those for you. so in this case, lintwill highlight that. you will click on thatparticular string.

and then it will provide youthe button that says export this string to strings.xml.. so lint is run automatically. it can also be run as partof your build to flag things. it's much like pmd or findbugs in the java world. basically, anautomated testing tool to highlight patterns andnot functional problems, but code problems. audience: so isthere a tool that

will tell you what theminimal android version is that you shouldtarget your app to? mike wolfson: so thequestion is, is there a tool that will tell youwhat the minimum android os is to target. and the answer is no, becausethat's fully dependent on you. you need to decide whoyou want to support. so there's no toolthat can tell you that. now, it obviously depends onthe apis you need to support

and your customer base. but there's no rules for that. that's completely subjective. audience: [inaudible] you mightwrite code and it could say, if you want to targetan older version, you shouldn't be using-- mike wolfson: it will tellyou if you have api issues. it will tell you if you're usingan api that's not supported in the version of the osyou're targeting, actually.

so that is one of the thingsthat it will tell you. monkey is basically a toolthat is designed to be, if 1,000 tiny monkeyswere using your app, pressing it allat the same time. this is basicallychaos testing, to see if a bunch of differentpresses happen on your app, what would happen? if it'll crash, ifit'll cause issues. monkey runner, not atall the same thing.

monkey runner isa scripting tool that basically uses perl scriptsto allow you to do automated ui tests using this monkeyrunner scripting tool. really useful. memory allocation tracker. now, this is aneclipse tool, but it's built directly intothe adt and allows you to-- the tools are builtdirectly into the adt. you can i dump a a [? mat ?]profile directly from ddms.

this allows you very,very good inspection into the memory of your app. so provides all sortsof options to determine how your heap's being allocated. and it will also provide abunch of different options for how to improve your memory. so that's an eclipsetool, but it's built directly intothe adt and is really a valuable tool to use.

the last one that ijust want to mention-- and we have addressed this on ahigh level a little bit later. this is a external project,an open source project called sensor simulator project. so we mentioned withemulators, there's certain things thatyou can't emulate. sensors being for one, motionsensors or touch, other things. this sensor simulatorproject actually allows you to bothrecord sensor operations

and play them back inan automated fashion. or, if you just want to simulatesensor operations, meaning again, motionsensors or whatever, it'll allow you to simulatethose on the emulator. so if you're needingto write functionality that the emulator can'tsupport using sensors, that's a really great projectand a really great way to make that happen. i think we're done.

i did want to make sure thati put some reference points up on the screen forwhere you can go to learn more about the tools. first one wealready put up there is the android developertools official project site. tons of usefulinformation there. lots of help articles. and more importantly, theyalso have their project plan. what they plan on doing,what they plan on supporting.

you can put helprequests in there. you can put bugrequests in there. they're very open aboutwhat they're working on and what their plansare, and it's all contained on that website. really, really useful. stack overflow. i hope most of thepeople in this room already know about it.

if you have a question-- someone has already askedit on stack overflow, and hopefully has answered it. there is a google groupspecifically for android developer tools developers. and there's the link for that. right now there's a lot of noiseabout android studio and gradle in there. so if you're working oneither of those two tools,

that seems to be consuming mostof the messages in that group. but the toolsguys, the guys that work for google onthe tools project, they're actively in thatgroup answering questions and helping people. so it's a great resourcefor researching things if you don't have the answer. last really great resource isthe android developer tools essentials book, available nowfrom o'reilly on amazon.com.

that's it. i think we alreadyanswered all the questions. i just wanted to make surethat people have access to the github repo slide share. and then if you'd like to followme on twitter or circle me on google+, i wouldlove to connect. so thanks very much.

Tidak ada komentar:

Posting Komentar