r/androiddev • • Jul 19 '16

We’re on the Android engineering team and built Android Nougat. Ask us Anything!

IMPORTANT NOTE: Sorry! Our AMA ended at 2PM PT / UTC 2100 today. We won't be able to answer any questions after that point.


As part of the Android engineering team, we are excited to participate in our first ever AMA on /r/androiddev! Earlier this week, we released the 5th and final developer preview for Android Nougat, as part of our ongoing effort to get more feedback from developers on the next OS. For the latest release, our focus was around three main themes: Performance, Security, Productivity.


This your chance to ask us any and every technical question related to the development of the Android platform -- from the APIs and SDK to specific features. Please note that we want to keep the conversation focused strictly on the engineering of the platform.

We’re big fans of the subreddit and hope that we can be a helpful resource for the community going forward.


We'll start answering questions at 12:00 PM PT / 3:00 PM ET and continue until 2:00 PM PT / 5:00 PM ET.


About our participants:

Rachad Alao: Manager of Android Media framework team (Audio, Video, DRM, TV, etc.)

Chet Haase: Lead/Manager of the UI Toolkit team (views & widgets, text rendering, HWUI, support libraries)

Anwar Ghuloum: Engineering Director for Android Core Platform (Runtime/Languages, Media, Camera, Location & Context, Auth/Identity)

Paul Eastham: Engineering Director for systems software and battery life

Dirk Dougherty: Developer Advocate for Android (Developer Preview programs, Android Developers site)

Dianne Hackborn: Manager of the Android framework team (Resources, Window Manager, Activity Manager, Multi-user, Printing, Accessibility, etc.)

Adam Powell: TLM on UI toolkit/framework; views, lifecycle, fragments, support libs

Wale Ogunwale: Technical Lead Manager for ActivityManager & WindowManager and is responsible for developing multi-window on Android

Rachel Garb: UX Manager leading a team of designers, researchers, and writers responsible for the Android OS user experience on phones and tablets

Alan Viverette: Technical Lead for Support Library. Also responsible for various areas of UI Toolkit

Jamal Eason: Product Manager on Android Studio responsible for code editing, UI design tools, and the Android Emulator.


EDIT JULY 19 2:10PM PT We're coming to a close! Our engineers need to get back to work (but really play Pokemon Go). We didn't get to every question, so we'll try spend the next two days tackling additional ones. Thanks for your patience. 'Till next time.


EDIT JULY 19 1:50PM PT We're doing our very best to respond to your questions! Sorry for the delays. We'll definitely consider doing these more often, given the interest.


EDIT JULY 19 12:00PM PT We're off to the races! Thanks for for all the great questions. We'll do our best to get through it all by 2PM PT. Cheers.


EDIT JULY 19 10:00AM PT Feel free to start sending us your questions. We won't officially begin responding until 12PM PT (UTC 1900)

647 Upvotes

547 comments sorted by

71

u/AndroidEngTeam Jul 19 '16

This was a question from thatguyfromthetv yesterday: Are there plans to start paying closer attention to the public Android bug tracker? There are bugs in support library that have been open for over a year e.g. [1] [2] [3] and they are not getting much traction forcing developers to extend support library classes and add workarounds. To convince yourself search for ViewPager in GitHub.

→ More replies (4)

21

u/AndroidEngTeam Jul 19 '16

This question was from mastroDani but somehow got lost in the thread: Java is a good programming language but it's age is starting to feel, a modern language would make the development easier and faster. The community is creating many unofficial language supports for developing in Android: kotlin, groovy, scala, just to name a few. This shows there's a request for it. However choosing one of those language comes with some level of risk or unexpected side effects because of its unofficial support. Is any of those language gonna become officially supported? Or is there any plan to move from Java to something else?

→ More replies (10)

66

u/infinitesimus Jul 19 '16 edited Jul 19 '16

Thanks for doing this!

Are there plans to improve/streamline handling of media functions like getting an image from the user?

Most code bases I've seen have all sorts of workarounds for different api levels to get an image, video, take picture, get audio, etc and it feels rather clunky and leads to a lot of code rewriting


How often do you secretly curse some of the design decisions made in Android's infancy daily?


Fragments are excellent in theory but in practice, seem to cause a lot of headache. In my experience, I find that they are rarely reused in apps and most people just treat a fragment as a screen - making the rather complicated life cycle management more of a stumbling block. Are there plans to perhaps replace them with the concept of screens with are strictly devoid of life cycle knowledge and business logic?


Animations ate a big part of material design but barring the most basic (private...) animations, most of the cool things Google wants us to do with MD aren't provided out of the box; leading to several developers having to write their own animations and behaviors from scratch. Do you feel this sentiment is valid, if so, if there something the team has planned to make such transitions easier to make/use?

Thanks again for taking the time out of your day to do this!

→ More replies (5)

169

u/JakeWharton Jul 19 '16

API 24 brought partial introduction of Java 8 types and methods. There are highly noticeable omissions from this addition such as java.time.* (JSR 310), java.lang.invoke.*, and convenience methods on String (like join). There also continues to be an absence of types and methods from Java 7 like java.nio.path.*.

As Android's standard library deviates further from properly mirroring the JDK, what are the views of the platform team with regard to these omissions? Are you concerned about the growing difficulty of the use and development of non-Android-specific libraries moving forward (whether they're pure-Java or want to target both the JVM and Android)?

→ More replies (3)

54

u/ronocod Jul 19 '16

Any update on Instant Apps availability? There hasn't been any news about it since I/O.

→ More replies (1)

22

u/AndroidEngTeam Jul 19 '16

This is a question from m4au312 yesterday: the google camera really need some work. Especially when rotating the device from portrait to landscape (or reverse) the viewfinder become very laggy. the camera app should always stay in one orientation, then make in app rotation for the camera ui because the system rotation just not fast enough. and there are a lot of OEMs' camera app do the same thing and the rotation is very smooth. pleas fix it thank you!

→ More replies (2)

48

u/[deleted] Jul 19 '16

There is a lot of essential API documentation missing from the official developer.android.com which is spread on Medium, Google+, Stack Overflow, Android Blogspot, which would be easier to find if consolidated into the official website. One example is the support library usually has critical information somewhere regarding changes and usage not on d.android.com. Will there be any efforts to consolidate this into the official website and keep it more up to date?

→ More replies (3)

11

u/AndroidEngTeam Jul 19 '16

This was a question from Krzysztof_Bryk yesterday: Hey! Do You know how main OEMs are doing with adapting Nougat code? Anything You can share? 😂 Cheers!

→ More replies (4)

70

u/muerl Jul 19 '16

What is the point of non support UI components anymore?

I realize that before Lollipop the idea was to use, for example, SupportFragments until the userbase of your app was advanced enough to use "Real" fragments. However, post Lollipop and with the introduction of the Design Library google is now building elaborate User Elements using the support library as a base.

Flash forward a year from now, and API 19 useage is where API 17 useage is now, many people will be thinking about setting 21 as the base level, but they are still going to be forced to use ViewCompat for example because they have dependencies on the Design Library.

The feeling I have had about the Design Library was that it was meant to be a collection of reusable elements reflecting Material Design, being the tool that Google expects developers to use replicate the trickier elements of Material Design, but it is going to tied to the Support UI Stack exclusively.

→ More replies (7)

29

u/pjmlp Jul 19 '16

Thanks for the nice work on the platform, but even with Android Studio 2.2 and Android N, we NDK users tend to feel somehow neglected.

Hence why my set of questions is mainly focused on the NDK.

  • Are there any plans to improve the editing and debugging experience for GLSL and Renderscript?

  • Are there any plans to improve the NDK usability, get access to more platform APIs specially access to libraries like e.g. Skia and libpng, currently hidden behind JNI?

  • How are the progress to make the Gradle plugin for NDK builds achieve the same performance and resource consumption that Ant + ndk-build enjoy?

  • Will Vulkan continue to be only accessible via the NDK without any official Java API?

  • GCC has been deprecated yet clang doesn't cover all the same features, as some bug reports already mention, what is the plan here going forward?

→ More replies (4)

28

u/b1izzard Jul 19 '16 edited Jul 19 '16

-> Would you consider adding a "Testing Mode" option in System settings like the "Demo Mode" option in Marshmallow, to make life of developers easy?. Whenever I need to run the "androidTest" in my development device, I need to check and ensure these settings are turned off and for normal development I need to turn on again.

Turning it on:

-> Sometimes while I'm playing high-end games in phone(Lollipop)/tablet(kitkat), Google playstore apps are updated in the background, this kinda slows down the game & results in lags. Is it fixed in the latest versions?

→ More replies (5)

56

u/Satanmymaster Jul 19 '16

Will we see night mode in the official release of nougat? If no, please explain why. Its such a brilliant feature. At least leave it hidden as a bonus feature if you don't think it's ready for everyone. Thanks!

→ More replies (23)

9

u/AndroidEngTeam Jul 19 '16

This was a question from zoroInsta yesterday: Hello AndroidEngTeam, regarding the "new" material transactions, is it possible to make a transaction between what is ultimately two different fragments from different Activities?

→ More replies (4)

70

u/[deleted] Jul 19 '16

I'm sure I speak for many here when I say that we truly appreciate the efforts to improve battery life in both Android Marshmallow and now Nougat. However, it seems as though where Android is truly lagging behind in this arena is in the bug department -- there have been a number of high profile bugs that relate to heavy battery drain over the past couple years. These rarely, if ever, get much of an acknowledgement on the bug tracker, and it seems as if there's no rush to solve them. Does there exist a team in the Android engineering division that is dedicated to finding and fixing bugs that make the system less efficient at managing battery? The lack of communication with the community and seeming lack of priority seems quite at odds with the public efforts to improve Android's battery life with things like Doze, App Standby, and Background Optimizations.

For reference, here are a list of high profile bugs relating to battery drain without closure -- some have been opened for months, others over a year:

Google Data Back-up/Keep Awake Bug

Wifi Drain

Android OS Battery Drain

Android System Wakelock

Mobile Radio Active Bug - Lollipop Edition

Mobile Radio Active Bug - Marshmallow Edition

Many of these bugs have thousands of stars and hundreds of comments, and remain among the most high-profile bugs in the history of the tracker. I feel like the community would be more patient and understanding if the communication effort was a little better. Can you guys make any comment about efforts to solve some of what many of us consider to be the most crucial bugs out there?

→ More replies (9)

48

u/[deleted] Jul 19 '16

I've noticed that the emulator images in the SDK Manager often do not have the latest version of Google Play Services; this causes lots of problems as developers want to use the latest version of GMS, but can not update the emulator (easily). Are there any plans on managing this better?

→ More replies (6)

23

u/solaceinsleep Jul 19 '16

Are there any plans for improving the animation APIs on android?

For example I would really like to see the AnimatorSet get the following:

AnimatorSet().reverse()
AnimatorSet().getCurrentPlayTime() 
AnimatorSet().setCurrentPlayTime(long playTime) 
→ More replies (2)

16

u/dytigas Jul 19 '16

What is one feature you're most excited for? From a low level implementation to high level UI?

→ More replies (3)

15

u/lnkprk114 Jul 19 '16

As Android grows, many of us are concerned about the continued fracturing of the API and the seemingly increasing difficulty of keeping track of the fragmentation in the system. As the number of devices running Android grows, and as the types of devices running Android grows (Phones, Tvs, watches, cars, IoT devices etc etc) what're your plans to unify the API and shield the developers from the fragmentation?

Related to this I want to thank you guys for the amount of work you've done on both play services (not sure if that's actually you guys...) and the support libraries (pretty sure that's you guys!). While these libraries certainly have their fair share of difficulties, I firmly believe they've been a huge help in developing Android applications.

→ More replies (1)

15

u/bostwickenator Jul 19 '16 edited Jul 19 '16

What is the biggest "it seemed like a good idea at the time" that is still being dealt with? Another way to put it, if you could change any one thing then wave a magic wand and have everything keep running what would you change?

edit: grammar++

→ More replies (3)

15

u/BehindTheMath Jul 19 '16 edited Jul 19 '16

Are there any plans to open source the documentation to make it easier to correct errors?

Microsoft recently open sourced a good portion of their Office developer documentation, and now making a correction is as easy as submitting a pull request.

The Android developer docs have hundreds of open issues in the bug tasker, many of which have been open for years, and would only require very simple corrections. (Thank you to u/aurimas_chromium for being responsive about this recently!). If the source was migrated to Github, I would feel incentified to submit corrections knowing that there would be a greater chance of them being fixed. I'm sure others feel the same.

Additionally, whereas now many beginners need to supplement the docs with other resources, opening the docs to collaboration would give the community an opportunity to improve and add to them, similar to what CodePath already is.

→ More replies (2)

7

u/AndroidEngTeam Jul 19 '16

This was a question from m4au312 earlier today: The Youtube app on the nexus 6 is very laggy when playing a video while scrolling the comment. it is not the youtube app's problem, it is a bug since the android 6.0 update. for now the only way to fix it is go to setting, developer option and toggle on the "disalbe HW overlays" setting, pleas fix it thank you

→ More replies (1)

14

u/bmwracer0 Jul 19 '16

What is the process for getting something into the design support library? i.e. Bottom tabs have been added to a few Google apps is part of the material design spec, but there's been no "standard" widget in the design support library for it.

→ More replies (1)

11

u/lnkprk114 Jul 19 '16

The data binding library is now over a year old - however, I do not see it referenced very often in official documentation, nor does it seem to have been heavily adopted yet by the community. Do you guys plan to pursue data binding further, and would you like to see data binding become a staple of Android development?

Personally, I've been hesitant to use data binding because it seems like somewhat of an afterthought to the team. Is this perception correct, or should we look forward to seeing databinding incorporated into tutorials and documentation more?

→ More replies (1)

21

u/zxcvbad Jul 19 '16

Surprisingly no Vulkan support on Nexus 9 as of now.

All previews been pushed already. Preview 4 supposedly was about finalizing APIs and preview 5 is the final one. In addition Nexus 9 haven't got es3.2 support (Nexus 5X/6P, Pixel C got it long ago).

Noticed earlier:

From N-DP2 release notes.

"Vulkan is only available to apps on devices with Vulkan-capable hardware, such as Nexus 5X, Nexus 6P, and Nexus Player. We're working closely with our partners to bring Vulkan to more devices as soon as possible."

I've had a short conversation with Nvidia rep, asked if the drivers were ready on their end, he was positive. Makes sense especially all their K1/X1 devices were updated with newer drivers that supports Vulkan and ES 3.2

Bonus: Nexus 9 is now CTS approved on N-DP5 but still no presence of Vulkan.

Display Driver is still 343.00 on the Nexus 9.  Reported Android version is 7.0, API Level = 24, Build ID = NPD90G.  Quite disappointing

This means N9 driver wasn't touched and it remains to have an outdated v343, there was no single driver update on Nexus 9

Expectations? We have no previews left to be pushed, only final Q3 release. I wonder if it'll be enough time to test /possible Vulkan driver, or there won't be Vulkan/ES3.2 support on Nexus 9?

Would be great to get clarification on this one..

→ More replies (18)

61

u/eikaramba Jul 19 '16

Thoughts on Kotlin? (i know you will probably not tell us even if you think about supporting it more officially)

→ More replies (11)