I mentioned this is the bottleneck right now. And the other bottleneck is it's maybe the
fact that it's probably running ARM code. So I actually have another demo here which
is going to run a smaller version and I am going to run a game that's available on market.
So I am going to have to aim properly when I actually select on it.
Let's see. So that one is running in half VGA which is
the size of the G1. And, I have become very good at clicking on
those button. >>Tor Norbye: It's a special on-screen keyboard.
>>Xavier Ducrohet: So it's running in half VGA. The rendering is fully hardware OpenGLES
1.1. You can see on the top left that I am running at 60 frame per second. I am using
the D-Pad right now to play. It's actually me playing, and I am not very good at it.
And we're running between 50 and 70 frames per second, but here we are actually running
ARM code; right? We are not just running -- So this is hardware accelerated, but we are still
running and basically dynamically converting the ARM code into X86 code.
So basically we found out that if the rendering is fast enough, the fact that we are not running
X86 code is not really a problem. We are still investigating that to see what
we can do. And, in fact, in the previous session, the Google TV folks mentioned like an SDK
add-on, and you know that one will be running X86, so we are actually looking to be able
to run X86 images on the emulator. If you have Linux then you can run it through you
virtualization, because if you don't have the KVM module, then you are going to have
X86 inside your emulator and it's going to convert it into X86 to run natively, and that's
not very good. So if you have the KVM model it runs it directly. The problem is that for
QMU it is not available for Mac and Windows, so that's a problem. So we are investigating
what we can do to solve that. So we're working on it. We're like heavily
working on it. There's a lot of work still to be done. It's coming. I know there's going
to be a question so I am going to answer right now: At least a couple more months. But we
know that it's very painful. Hopefully some of you I heard got some new
tablets so at least you can use that while you wait. For those on live stream, well you
need to get a ticket next year. And you know we are working on it. We already
know it's an issue. And as I said we have an external company helping us. We are doing
what we can. [ Applause ]
>>Xavier Ducrohet: So I wanted to finish quickly. I mentioned open source at the beginning.
And Tor said that actually everything that we showed you is available right now on the
open source tree. So if you go to tools.android.com you can look at all the information to actually
download and build the source code. >>Tor Norbye: If there's just one URL you
write down, it's that one. From there you can find instruction on how to build the bits,
how to check them out. We have a blog on there where we post feature updates as we do them.
That's the place to go. >>Xavier Ducrohet: Just go to tools.android.com
and you have all the information that you need.
The moderator question is there, and there are two mics in the middle. So we're going
to take a mix of live questions and Google moderator.
And so when I do that -- Okay. Why don't you start on the first mic.
>> Yes, hi. Is there a way to attach multiple instances
of instrumentation to basically multiple processes? Right now, it seems like only one process
can be instrumented at a time so there's no way to do automatic testing for multi-processors.
>>Xavier Ducrohet: I think it's only one. To be honest, I am not entirely sure. Anything
that has to do with API and things like that, we may not be the best ones to answer. Try
the Office Hours. >> Do you know who is there that will be the
best person to ask? >>Tor Norbye: I guess ask when you get there.
>> All right. Thank you. >>Xavier Ducrohet: Sorry.
Second mic. >> Yes, I was wondering if you guys are planning
to add some support in the future to help record videos of our applications to help
promote them and whatnot. >>Xavier Ducrohet: Well, that's --
>>Tor Norbye: That probably would not be the tools.
>>Xavier Ducrohet: It's more an issue of like the system image. Like the screen shot during
the Fireside Chat there was a question about enabling screen shots for apps. The security
involvement for that, we need to make sure that no other application can do it and things
like that. I know that some devices are starting to do
HDMI out, so you can do that but it's not really a tool. It has to come from the framework.
>> Okay. Thank you. >>Tor Norbye: I want do this one.
So on the moderator, we have a question, can we expect better XML error handling as far
as Android layout is concerned? The answer is yes. We didn't demo that, but in the latest
bits we are a bit better about if there's a problem during rendering, we log it, we
put some hyperlinks up. There's this new error bar that shows up below the layout where we
try to give some diagnostic information. And if we recognize certain kinds of errors, for
example if it's a missing resource and we notice you have AAPT errors in your project,
we tell you, hey, you know you have an AAPT error which would mean AAPT couldn't run so
there are probably missing resources. So we are trying to work on this and I guess
we are not done but it's definitely better than it was.
>>Xavier Ducrohet: First mic. >> I was wondering about multi-touch support
and specifically being able to generate multi-touch scripts that I could replay and see how they
are being handled since they are very complicated, to kind of push through the pipeline of UI.
>>Xavier Ducrohet: Yes, we don't really have a solution for that, and we are aware of it
and we are not really working on it. So with the GL stuff that we are doing, we
are going to have to rewrite a new front end anyway for the emulator. So I think like recording
and replaying is probably something that we will try to do.
I mean, there are some now that do support multi-touch. Windows does it but it's a little
bit complicated because the front end is really cross platform. Right now it is using SDN
and it's cross platform, so we can't go and use really a lot of Windows specific API.
But that could be an option, too. I don't know how common that is, people having that
-- >> Even if there was a way we could write
some small script that would animate some points that, would be helpful.
>>Xavier Ducrohet: Yes, I think that's definitely something we need to do.
>>Tor Norbye: I guess we have addressed the next moderator question. Do you want to jump
to that? >>Xavier Ducrohet: Let's go to the second
mic first, but yes. >> On the layout editor, the selection of
the configuration, is there a way of setting the default configuration for when you create
a new one or you are opening a resource that you have had in there for several versions?
And it seems to want to open it up with QVGA. >>Xavier Ducrohet: So the new version is a
little bit better on that. The version 11. Where it will -- for example, if you say target
11 -- target SDK 11, I think it is going to try to open them in Honeycomb. We did some
heuristic to try to improve that to at least not open with the worst possible resolution.
>>Tor Norbye: We are planning on for the following release basically look at the layout you are
currently in. When you open a new one we are going to use that as one of the things we
consider. >>Xavier Ducrohet: But we are definitely -- it's
a pain, yes. >> The other thing is like we have our default
strings and such are in English. We also have Spanish translations and it seems to want
to open up the Spanish one. >>Tor Norbye: That is something we have fixed
in the new version. When I showed you the rendering target and the locale, those are
project wide. Once you switch it there, open any other file, it will force the new language.
So that is solved, but not the screen size yet.
>>Xavier Ducrohet: When I change a Java file, Eclipse rebuilds just that file, giving me
a new APK. Yes, so we have noticed if you have a really
big project with a lot of resources, building can be really long if you do resources change.
And actually, we are going to look at that like right after I/O.
There's a lot of things that we need to do first.
Right now, there's a first pass that does APT and generate the R class based on all
your resources and another one that compile your resources.
So for all the editors we showed you, when you have that chooser, Eclipse knows -- we
created some code that knows all of the resources that you have. So we want to, instead of running
APT, which is like an external native tool running, instead of running it to go do a
clean look at all the resources to generate that class, we want to try to be a little
bit more smart and use what we already know about the resources, see the resource change
and do an incremental basically generation of the R class.
The other part is on the second state is already running APT to do a package of your resources
and that's a little bit long if you have a lot of P & G file because we process them
to crunch them to make sure there's no extra data we don't really need.
So I think one of the things we need to do is allow you to crunch them yourself and then
set a flag saying don't crunch them so that the packaging of the resources will be faster.
First mic. >> Sure. A couple things. First, I realize
if you define a drawable as a part of your style, those drawables are not contextual.
It doesn't actually link back to a drawable and it doesn't do code hinting. So for example,
if I define some style and -- like some background style or something like that and I define
a drawable as part of that, like some image --
>>Xavier Ducrohet: By "define" you mean like reference a drawable?
>> Sure, sure, reference a drawable. And what it does right now, the XML doesn't provide
-- it's like I can't link to the drawable from the styles dot XML, for example, and
I am not able to get code suggestions, even though the drawing is --
>>Tor Norbye: We haven't released ADT 11 yet, but it has a lot of improvements in go to
declaration and code completion. And we also just added code completion for drawable files.
So before that, you would end up with like the base Eclipse XML model which knew nothing
about Android. So I think there might still be an issue but a lot of this is going to
be a lot better very soon. >> Another thing is up guys demoed the Android
assess tool which is pretty cool. I use it to for generating icons. As part of that project
there's also a pencil plug-in for mockups. >>Xavier Ducrohet: Yeah.
>> Do you guys have in your future to maybe integrate that into a part of Eclipse so you
can actually, instead of building code, you can build mockups of shuttle product managers
and things like that? >>Xavier Ducrohet: That's not a goal right
now. It's a great idea but right now we need to really focus on improving the layout tool.
I think that's the one thing we need to focus on besides the emulator. But that's a good
idea for after. >> Okay. Thank you.
>>Xavier Ducrohet: Okay. We'll take -- I just did that one.
Well, if it's just -- so do you have any advice for getting the emulator to load faster.
I mentioned the snapshots, use them. I know that right now when you close the emulator,
it takes a little bit of time because it saved the snapshot. That's actually a bug. We fixed
it. It will be in the next version and it will quit instantly.
>>Tor Norbye: The other thing to add there is some people, they run the app and quit
the emulator. Leave it running. When you read a second time from Eclipse it will redeploy
very quickly. So that's very important to be aware of.
>>Xavier Ducrohet: You should launch the emulator once at the beginning of the day, basically,
and just redeploy to the same one all the time. You don't have to quit it all the time.
>> I have an app that has a lot of hand edited XML, and so it's neatly formatted. But when
I use the visual tools, everything just goes on one line. It looks terrible. I end up having
to -- if I want to be able to look at it -- >>Tor Norbye: This is a high priority for
us. I personally want to look at the XML formatting a bit.
There is a couple things you can do. First of all, Eclipse has some formatting options
where you can tell it that you want attributes on separate lines. However, we don't automatically
apply that formatting. But there is a special option in the Android settings where you can
say format, you know, automatically format or something like that. It's not ideal and
we are going to try to make this a lot better but you can do that and it should run the
formatter after every edit. I think we are actually out of time.
>>Xavier Ducrohet: Yes. >>Tor Norbye: I saw a bunch of good questions
on the moderator so we might answer at least the ones easy for us to answer.
>>Xavier Ducrohet: Yeah, we can do that. Thank you for coming.
>>Tor Norbye: Thank you. [ Applause ]
Log in to save your progress and obtain a certificate in Alison’s free Fundamentals of Google Android Development online course
Sign up to save your progress and obtain a certificate in Alison’s free Fundamentals of Google Android Development online course
Please enter you email address and we will mail you a link to reset your password.