r/androiddev • u/AndroidEngTeam • 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)
71
u/AndroidEngTeam Android 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.
21
u/AndroidEngTeam Android 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?
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!
169
u/JakeWharton Head of sales at Bob's Discount ActionBars 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 onString(likejoin). There also continues to be an absence of types and methods from Java 7 likejava.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)?
54
u/ronocod Jul 19 '16
Any update on Instant Apps availability? There hasn't been any news about it since I/O.
22
u/AndroidEngTeam Android 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!
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?
11
u/AndroidEngTeam Android 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!
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.
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.
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?
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!
9
u/AndroidEngTeam Android 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?
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?
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?
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:
16
u/dytigas Jul 19 '16
What is one feature you're most excited for? From a low level implementation to high level UI?
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.
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++
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.
7
u/AndroidEngTeam Android 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
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.
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?
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..
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)
26
u/zyrnil Jul 19 '16
Has any thought been put into making the support libraries a shared library or services similar to the google play services? Every single application uses the support libraries and we could save space by sharing the support libraries on the device.
9
u/Fiskepudding Jul 19 '16
Thank you for the AMA :)
16
u/ronocod Jul 19 '16
Are there any plans to better support Bazel/Blaze as a build tool for Android? It was strongly hinted in the Fireside Chat at I/O that many Google apps use it instead of Gradle.
8
u/stoyicker Jul 19 '16
8
u/chiuki Jul 19 '16
Can we make each test method run independently? Right now the activity launched by the first test method lingers while the second test starts, leaking state and causing tests to fail.
https://code.google.com/p/android/issues/detail?id=216442
28
u/Surge1223 Jul 19 '16 edited Jul 19 '16
Is there a logical reason why 4-way reboot and back-to-kill as well as other community driven popular items such as allowing framework theming, as first shown by Sony, aren't being adopted?
As a developer a I'd love to just use stock Android, but I find myself turning to the open source community because of a few critical items I find hard to believe are missing or intentionally left out as it seems, such as the aforementioned.
7
u/Aceofspadez44 Jul 19 '16
Hey guys! I know JobScheduler is the new go-to for background processes on all versions of Android, and maybe this is a question for the support guys, but I've been testing Android N ever since DP1 (thanks for the DP5 this AM!) with an app I've been developing over the past 5 months or so. We schedule local notifications using AlarmManager and are noticing that for devices running N, data being passed through using intent extras is not coming out on the BroadcastReceiver side. Any changes to the underlying code in BR for N or AlarmManager in general? Lots of critical Doze updates, and as a user I love it....buuut as a developer....
12
u/connectwithraj Jul 19 '16
When would android support rendering the UI with REALTIME priority in order to achieve consistent 60/120 fps? On the same lines what do you think Flutter team inside Google is trying to achieve with DART, when they say Flutter supports 120FPS.
12
u/NullFlavor Jul 19 '16
Android TV What is the status of Android TV? I developed a handful of applications for clients using it, but then all of the hardware seemed to vanish from the marketplace. A nexus player is more or less non-existent at this point. Will there be new hardware to replace it in the future or is it more likely to be integrated into new TV hardware going forward?
3rd Party Development Software I have been a Xamarin developer for about 5 years now and I have always wondered what Apple and Google thought about software like that. Is there any official take on it or thoughts about development frameworks such as Xamarin or Cordova?
Pretty App Guidance or Support Materials? Stock Android is not exactly the prettiest, but you all have done a great job with material design. The google developed applications look fantastic, but I find it hard to find great materials to recreate some of those elements in our applications. The developer site has great guidance on what we should be doing, but there is not really any examples of how we should be doing it. Do you offer up any template applications or support materials (sample layouts, drawables, etc.) that developers could use to get our applications looking fresh right out of the gate?
True SVG Support Is true support for SVG images anything that we could ever come to expect or are Vector Drawables as close as we are going to get?
Cool Tools Are there any tools that you feel developers are not utilizing that could make our lives any better? It seems like there are always a few cool tools or libraries that go woefully underutilized.
6
u/zyrnil Jul 19 '16
Once of the big differences between iOS and Android is the fact that iOS programs are all native whereas Android us now mostly ART. What improvements have been made in ART recently (Nougat) and what is Google doing to further the development of ART?
6
u/pakoito Jul 19 '16 edited Jul 19 '16
What new features are being worked on for Android O? N was mostly stabilization of M, and we have to be prepared for the next big breaking scare, i.e. Material or Permissions.
11
u/s73v3r Jul 19 '16
What are the plans for Doze going forward? Will there be any plans for using more of a light touch instead of using the sledgehammer that is currently used?
Also, to wake from Doze currently, it takes messages sent from GCM. Are there any plans to decouple this from Google services, for those who do not want to or cannot use Google servers to relay their messages?
14
u/likenessaltered Jul 19 '16 edited Jul 19 '16
Is <bool name="config_annoy_dianne"> still true?
Edit: it's an inside joke, people.. see final comment here
5
u/oasisfeng Jul 19 '16
Any plan to improve App Standby? Since Doze mode already got a refresh treatment in Nougat.
5
u/speakxj7 Jul 19 '16
with what brillo is doing on the common kernel, do you see something similar happening to nexus devices?
5
u/droid_ninja Jul 19 '16
UI Toolkit/frameworks team, Any plans to add "Transition Api" in support library?
5
u/jerzychalupski Jul 19 '16
A while ago I've found a bug in support-v4 related to Loaders implementation. In the bug report I have included a link to the source code of application that demonstrates the issue with low-ish reproduction rate (10-20%). What I would love to include instead is the unit test that reproduces this issue with 100% reproduction rate, that can be added into regression test suite. However, I haven't found any Loaders tests I could base my test on and to be honest I have no idea how to write an unit test for this kind of issue.
It got me thinking: how do you test support-v4 library? Is there some internal regression tests suite? If so, can it be made public?
9
u/lnkprk114 Jul 19 '16
Two very related questions. Apologies if they're trivial questions!
First, I'm wondering about starting new activities in Android. Specifically, I'm wondering why it is that when you start a new activity you need to go through the process of making your data parcelable in order to serialize it into an intent to then start the activity. In iOS development, for example, you can simply create a new view controller object as you normally would and assign properties to it as you do any other object.
My guess is that there are two reasons - one being that activities are meant to be shareable across processes and other processes may not know about your custom object, and the second is that since the activity can be destroyed at any time and a new object will be created when the activity is needed again that there needed to be some way for the system to retain that information. That's just my guess though - I really would love to hear about the design decisions around the whole intent system.
My second question is if there are any plans in the works to make this process (making your objects parcelable, that is) handled automatically. I know the serializable interface exists but as we all know that's rather slow for Android purposes. I also know that Android Studio can automatically generate parcelable methods and variables.
I'm asking about it being handled in the system because while these tools are great, the whole setup of parcelable objects is extremely error prone (since ordering matters when inserting or fetching objects from the parcel) and very confusing to new-comers in the platform (How do I get a list of my objects to the new screen?). Having the system handle it, somehow, would help remove one of the very first points of frustration that basically all Android developers come across.
9
u/[deleted] Jul 19 '16
Any news on the emulator supporting Bluetooth? It was mentioned on the official Android Blog back in April 2012, but I haven't seen any progress in this area:
http://android-developers.blogspot.com/2012/04/faster-emulator-with-better-hardware.html
15
u/Jig0lo Jul 19 '16
Hi guys, thanks for doing the AMA. Just a few questions
Sorry for the big post but I did not want to miss an opportunity to speak with the people behind creating Android OS. Updates at the very least shouldn't NEVER make a device worse but either better or the same with new features; optimization should be the most important thing before new features. I hate seeing "I updated my phone and now my insert here (battery life is worse, Bluetooth is broken, Wifi is really slow now, my device is randomly rebooting). But hey we added that super cool new feature even if we've made your phone a buggy mess. Even if you don't reply or get some dodgy response, I'm just glad there's a chance you might see this.
8
u/zyrnil Jul 19 '16
In regards to Android updates is there a way to cleanly separate the Java portion from native so that Google could deliver updates to the Java portions? For instance when UI bugs get fixed we either have to work around the issue for older platforms or hope that the fix is exposed in the Support Libraries. Why can't just the Java portion of the Android Framework be updated and shipped to phones?
8
u/dougdbug Jul 19 '16
My question: How much influence does the Android Nought operating system have over the Nexus 6p's radio and it's roaming between towers and cells? I just assumed that the radios manufacturer provides drivers that control it and the tower does most of the work when roaming.
My problem: When my wife and I upgraded our 6p's from Marshmallow to Nougat DP 4, our phones lost the ability to consistently roam seamlessly between between different T-Mobile towers and sectors a few times a day regardless of location. The LTE symbol will disappear and we will lose data connectivity when we are walking or driving. Using CellMapper, I can see it only happens when the phone roams to a new tower or sector. I'm just trying to figure out if it is T-Mobiles problem, the 6p's problem, or DP 4's problem.
P.S. My battery life and WiFi roaming is soooo much better on Nought! I can actually walk around my office and maintain my WiFi calling most of the time. Thanks!!
4
u/_bluecup_ 10x rockstar ninjahack devlooper Jul 19 '16
/u/AndroidEngTeam Constraint Layout seems to be slower than Relative for example, is there a future in which it is faster or is it at near it's max performance?
4
u/_bluecup_ 10x rockstar ninjahack devlooper Jul 19 '16
Question for Dirk /u/AndroidEngTeam : Might be addressing the wrong person since you're not in Dev Relations, but tangentially related: A lot of developers are complaining about being removed from play store for seemingly no reason and getting automatic responses to their pleas. Is there anything you could share regarding those issues? Is there a plan to introduce more humans to the process? I remember getting banned in one of apps I worked on and getting to the complaint form was a herculean task.
7
u/permanentE Jul 19 '16
Does the design team do any user or A/B testing when releasing their guidelines?
In my team's user testing the FAB seems to be bad UX. When we moved the search function into a FAB users had problems noticing that it's there. They would hunt around in the toolbar and the navigation drawer unable to find it, in some cases it seemed like their hand covered up the bottom corner preventing them from seeing it.
3
u/cmsessa Jul 19 '16
I noticed N had some positive impact when using reflection. Was this expected? What was the change?
3
u/Hikkigonenuts Jul 19 '16
What feature in Android N were you hoping to put but got cancelled later on and why? Thanks for the AMA! (:
3
u/micax Jul 19 '16
Very excited by the new Android for Chrome OS developments. I know of the ARC Welder initiative from Chrome - is this a direction that we might see Android develop even more in future, and if so when might ARC welder be released properly?
In general, any thoughts on developing Android's cross-platform nature to the point where it can be used/deployed on desktop computers? It seems weird to me that a system that is so heavily cross-platform as Android is an available on so many computing devices is absent from actual computers.
7
u/lnkprk114 Jul 19 '16
Similar to a question /u/mastroDani asked about alternative programming languges being used with Android.
Obviously iOS development is largely moving to swift, which many praise as a fantastic language to work with.
I personally doubt that Google will officially endorse any other language for a long while, but I would like to know how your team feels about some of the alternative languages that are popping up - Kotlin being the one I'm most interested in.
Do you feel its in stable enough condition to use for production applications? Would you recommend using other languages, or do you feel sticking with Java is still the correct decision for developers? Have there been any discussions regarding Kotlin on the team, and are you guys in touch with any of the developers of the language over at Jebrains?
5
u/kustodian Jul 19 '16
Have you changed anything to make notifications reliable, so that they appear when they are sent (push), or scheduled (local). Currently on Marshmallow even local notifications get delayed until the phone wakes up if the phone wasn't used for some time.
I guess this was changed because of battery saving, but at least give us an option to disable this battery saving feature for some apps, or even on the whole system, since there are notifications which shouldn't be delayed.
8
u/zlsa Jul 19 '16
Right now, developing an Android app means you're going to need tons of support libraries, third-party libraries for basic UI, and lots of XML for specific versions of Android. Are there any plans to reduce fragmentation?
9
u/mastroDani Jul 19 '16
Reactive programming (rx, RxJava, ...) is getting a lot of traction with good reasons, any plan in embracing it in the framework?
4
u/randompenguin6 Jul 19 '16
Is it expected for devices with a 64bit CPU to be able to run only on 64 bit libraries in the near future?
4
u/ipoop3timesdaily Jul 19 '16
Thanks for the AMA!
Do you guys have plans for removing the headphone volume warning after a user hits OK once? Im ok with the warning once, after the phone is restarted but i dont think the message needs to be shown each time i want to raise volume above the "safe" threshold.
6
u/Kranuh Jul 19 '16
What is your opinion on libraries like Conductor or Flow? Would you advise against using these? Or are they a viable option for developers that don't see the advantages of fragments?
5
u/charancraj Jul 19 '16 edited Jul 19 '16
One of my main pet-peeves of android app-development is fragments - especially around how they are "restored" back when its parent activity is restored - the restoration happens all underneath without giving any sort of control to the clients ( the app ) ( things get even more messier when you bring-in FragmentPagerAdapter )- you need to fix that. on a side note, I still haven't understood the sequences of fragment / activity lifecycles methods called during restoration - its all convoluted. To summarize, fix the fragment restoration workflow - its all complicated currently.
2
u/nextdev Jul 19 '16
Any plans to update emulator images with latest Google Play Services bundle ? Right now it's almost impossible to test app on emulator which using latest play services without doing extra work.
2
u/speakxj7 Jul 20 '16
In light of USB C bringing fresh blood to physical connectivity to the mobile form factors, will we see an update to ADK (accessories)?
2
u/[deleted] Jul 20 '16
Is the team planning on fixing the Material Design consistency of Google apps? Basically, here's my noted inconsistencies (I studied Material specs well, by the way) In Drive, shouldn't the "New" card be replaced with labeled icons that pop up above the FAB? In Earth, the navigation drawer text labels are inconsistent. In Translate, the status bar isn't transparent so the navigation drawer doesn't show under it. Also, the account photo in Translate is completely inconsistent with Material specs. Play Books has the same inconsistency with the status bar. It isn't transparent so the nav drawer doesn't show under it. Also, on the Play Books splash screen the "Google Play" branding isn't centered. Also, can't the "Voice Search" icon be removed from non-Nexus devices? It's redundant. We already have the Google app icon so why is there another for a Google app action? If this isn't this team's work, please forward this to the corresponding teams. I'd really appreciate these inconsistencies be addressed to improve the Google ecosystem. Thanks!
47
u/littledot5566 Jul 19 '16
Google uses a build system called Bazel instead of Gradle. What's the deal with you not suffering with the rest of us? :P
On a serious note, not using the same system as the rest of the world, literally, means there is no dogfooding. Issues get uncovered after they are released, requires external parties to verify the fix, long turnaround times, etc. It would be nice if we were all standing on the same platform using the same tools. How do you plan to bridge this gap?
40
u/bmwracer0 Jul 19 '16
With the introduction of multi window in Nougat, it shows that the Android team is still not giving up on tablets. However, even the internal Google apps teams even have poor implementations of tablet apps, and this results in a poor user uptake of tablet devices. As a result, there's not as much motivation from third party developers to build great tablet experiences - since the market of tablet users is still small. What is Google doing to try to break this cycle of poor tablet support?
7
u/SimMac Jul 19 '16
Can you say anything about the rumours concerning official Swift-support for Android apps? (Probably not, but worth a try)
20
u/shekar007 Jul 19 '16 edited Jul 19 '16
Is there a better documentation for style attributes of various widgets? It's very difficult to figure out which attribute is affecting a particular property of a widget. Ex: If I want to change SearchView text color, my general approach would be extending Widget.AppCompat.SearchView theme and change textColor property but this doesn't seem to work. Instead, I need to extend ThemeOverlay.AppCompat.ActionBar and change android:textColorPrimary to get this done. Is there any doc or tools to figure out these things?
15
u/mastroDani Jul 19 '16
Intent system is great! But it could be so much better with standards and a system checking they are followed.
https://developer.android.com/guide/components/intents-common.html
For example I can ask for a picture in the device with ACTION_PICK and mimetype image/*. Or to actually get one from a camera with ACTION_IMAGE_CAPTURE.
For grabbing a video I can do the same using ACTION_VIDEO_CAPTURE. This intent also support passing extras for limiting its size and/or duration, which is great.
Unfortunately many apps do not support those extras and you have no way of specifying you do not want those apps to show to the user.
I would love to have intents for asking to apply filters on a photo, cut it, make it a specific aspect ratio and so on.
Many other intents types can be created. And I'm sure that if you, as Google, define them many apps will support them.
Do you plan on making a stronger commitment on the Intent system? Expanding it with more features and request types and way to filter them?
Do you plan on adding some automated check in the Play review process against the correct and consistent handling of those intents?
As a side note: why the Capture intent require permissions since N? Isn't that permission supposed to be handled by the capturing app?
15
u/timusus ♪ Shuttle Developer Jul 19 '16 edited Jul 20 '16
Thanks for doing this AMA, it's nice to see the Android team really focus on engaging with developers lately.. It makes us feel a little less lost in the ever expanding world of mobile software development.
Would you please give some consideration to the following requests?
1.) MediaStore album-artist support.
This is already part way there. The MediaStore seems to hold this info in a column of the Media.Audio table, but there's no simple way to get artists, albums and songs belonging to a particular Album-Artist (and vise-versa). It would be helpful if Album-Artist became a first class citizen.
2.) MediaStore genres:
There's currently no way to delete a genre from the MediaStore. Once a particular genre is created, it remains in the MediaStore forever!Genres containing no songs are not removed from the MediaStore.
3.) MediaPlayer API
It would be nice to add some flair to music playback with support for advanced features such as crossfade & replay gain. As a music player developer, I couldn't count the number of times users have requested these features. These are things that could possibly be retrofitted on top of the existing MediaPlayer (with difficulty), but to me they'd make more sense being implemented at a lower level (next to gapless playback, for example). When something is too hard for me to implement, I pray to Duarte that the Android Eng team will come along and lay down the foundations.
4.) Opus support.
What happened to Opus? It was mentioned that it would be available in 5.0. I saw a few bits and pieces in the platform source (or docs?) indicating some work had been done, but (correct me if I'm wrong) Opus support never arrived on Android. Is this something that's planned?
5.) Making stuff themeable.
The support library team have done an excellent job making so many UI elements themeable via the DrawableCompat utils.. But we're still stuck when a UI component doesn't exist in the support library.. Dynamic theme customisation is something users really seem to enjoy, but it takes a lot of work (and some nasty reflection at times). Also, styles and themes can't be modified dynamically. I'm just wondering if there's any chance we might be able to set things primaryColor and accentColor programmatically, across all UI elements, in the future?
That's all I've got. Thanks for taking the time, and for all the great work you guys do behind the scenes!
13
u/my5tery Jul 19 '16
BLE support continues to get better with every release, but it's still not as stable as iOS. Are there any significant improvements to the BLE API in Nougat? Also, having developed BLE apps on both iOS and Android, I've noticed that it takes significantly longer to connect to devices and discover services/characteristics on Android than on iOS. How much of this is related to the API vs the bluetooth stack on the device?
12
u/DevAngels Jul 19 '16 edited Jul 19 '16
It's great to see new versions of Android being release with shiny new features. But are we ever going to see the current APIs get those changes that developers want. Revamps of API sub-systems that are just not cutting it anymore. Or the inclusion of common functions that most developers end up including in in every project because the APIs don't exist in the platform.
For example, text rendering/wrapping, always a problem domain when dealing with multilingual and hard to get right. Thank you for the including of the new ICU4C. But we are limited to manipulating
TextViews at a high level which is relatively expensive, or using the unfriendlyLayoutjust to get text indented somewhat. Heaven forbid we have to callcanvas#DrawText().TLDR;
Making these changes will simplify the lives of most developers and make the platform friendlier for new comers.
Thanks for your time.
10
u/Indie_Dev Jul 19 '16
Why hasn't the official documentation kept up with the releases? It was great during the ICS days but since then it has become very stale. Learning anything for android now typically requires searching all over the internet including stackoverflow, github examples, blogs, etc. There isn't any single place which any newcomer would expect for information.
18
u/cqm Jul 19 '16
Is anything being done differently with Nougat and OEMs that will more readily allow me to use the new APIs sometime before the year 2020?
I work in very trendy tech companies, and their user base is typically tied to the most popular versions of android, as such, I've only this year been able to make API level 16 the minimum, which came out in 2012.
Personal projects are one thing, but developing on Android for other people is another thing.
79
u/[deleted] Jul 19 '16 edited Jul 19 '16
Why is it, that despite the Nexus 5 being more than capable of running N, it isn't getting the update?
Apple's iPhone 5, released in 2012 (over a year before the N5), will receive iOS 10. It's 4th major software update.
LG's Nexus 5, dubbed the phone to get for Android updates and released in 2013, will NOT receive Android 7.0. Meaning it'll only receive 2 major software updates.
Why is it that Google set arbitrary dates for these devices, which are more than capable of running N, when their competitors (Apple and Microsoft) support devices for as long as they can run the OS?
Isn't artificially limiting the lifetime of a device the very definition of planned obsolescence?
The Nexus 5 is still a very popular device and serves it's purpose as a phone very well. On M it runs great and it is more than capable of running N without issues. There is no reason I can see beyond laziness and Google's arbitrary end of life date that it won't get N. Those end of life dates should be a minimum, not a maximum.
7
u/nicholaschum Jul 19 '16
Hi there, my name is Nicholas and I am a developer constructing the new Substratum theme engine, and I am here in regards to the Resource Runtime Overlay system, more specifically the Overlay Manager Service that Sony has introduced into the AOSP code review recently (Dec 2015 -> Jun 2nd).
The Substratum Theme Engine is meant to incorporate a user friendly theming engine that hooks onto the Overlay Manager Service from Sony's code and allows for themers and developers alike to create their own interface designs and bundle them in a pack, while using the Android Assets Packaging Tool to compile themes directly on the device.
We have been venturing through Sony's code, Alan Viverette's code and Dianne Hackborn's merges to create a theming engine to allow system level theming with the use of root (as we are using the permission level android.permission.CHANGE_CONFIGURATION at a third party application level.)
Would there be any consideration of merging this code into the main branch of AOSP anytime soon? I would assume that it would not be on the main branch of AOSP by N, but would there be considerations regarding this piece of code towards the development of the Android ecosystem?
7
u/40ft Jul 19 '16
I don't understand why the OTA capabilities of Google/Android/Nexus aren't used to quickly patch high priority bugs. For example, the latest N5 security patch made the phone unusable (Nexus 5 MOB30P, In-call Volume Unadjustable, https://code.google.com/p/android/issues/detail?id=215483). I understand bugs/patches need to be understood, committed, tested, rolled out to production, etc., and I understand that people might get "annoyed" if they have to update their devices too frequently. But frankly, you should be embarrassed that such a bug is in the wild, and if I was running the show, everyone would have been working late until the fix was pushed. And in this situation, a one-line logic error, it seems eminently fixable in a couple of hours.
6
u/burntcookie90 Jul 19 '16
With Android 5.0, we received an upgrade for the onboard sqlite to 3.8. However, with >50% of user distribution below 5.0, we are unable to take advantage of the newer features. Why hasn't there been any official discussion or release of a
support-sqlitepackage to help deal with this situation?6
u/concernedBleDev Jul 19 '16
I work for a development company that builds IOT products powered by Bluetooth Low Energy, and we have some major issues determining device compatibility:
The biggest problem we have is that a device may only have partial support for BLE features (ie. only support for scanning, not advertising), but it will report on the Play Store as meeting 'the requirement' for BLE. This makes it very difficult to only target devices that support the specific roles that we require.
Another issue we have trouble with is that some phones can handle multiple BLE roles simultaneously, but some cannot. There's currently no good way to determine this programatically - functionality seems to fail silently.
What's the best way to handle compatibility issues like these?
We currently attempt to blacklist devices that we know won't work in the Play Store, but this isn't a sustainable long-term solution. Adding a white list of compatible devices would be easier to maintain, but also isn't ideal.
2
u/putchik Jul 19 '16
Let's assume I have an image (png 100x100) and ImageView (150x150). And I want to display that image with ImageView (scaleType = fitXY, so image is stretched to fit image view).
So I basically have 2 options:
In first case I will be transferring smaller texture to the GPU, but GPU will need to upscale it for me. In second case, there is a larger bitmap will be transferred, but the size will be exactly as my image view, so there is no additional overhead for the GPU when it comes to rendering.
From the performance perspective, which approach is more preferable?
I have intentionally chosen relatively small image size since I realize that the larger image - the more time I need to spend passing it to the GPU.
In my app I've chosen the first approach, but I want to hear some feedback from platform team.
29
u/stepwise_refinement Jul 19 '16
What project architecture do you recommend? Model View Presenter seems to be the popular thing at the moment and even the Google testing code lab uses a variant to demonstrate unit testing. How does a loosely coupled architecture assist in sharing logic over phone/wear/auto etc?
Thanks for all your work, can't wait for Nougat!
5
u/springyman Jul 19 '16
In Lollipop you removed the setMobileDataEnabled() api which was invoked by reflection. Whereas this is good and improves security you left a lot of apps that was using this feature broken because there was never a replacement for it.
When the developer preview for M came out, there was an issue tracker I included this as part of something I wanted to add back (ID 2103 however the old URL is now dead https://code.google.com/p/android-developer-preview/issues/detail?id=2103). It was the second highest requested feature to be added to M at the time.
I know it is too late for this to be added in Nougat, but is it possible you can add this in for Android O. I don't see the issue here because there is already an API to turn off and on Wifi programmatically.
The existing Android issue tracker for this is located here: https://code.google.com/p/android/issues/detail?id=130608
I would very much like to hear your input on this. Thanks.
5
u/ragingd4 Jul 19 '16
Over the years Android has been getting better in over all smoothness 60fps. The system is UI is a prime example. But for some reason most of the Google apps drop frames consistently. Such as Inbox when swiping away an email it drops frames, the phone app when hitting the end button drops frames when it's shrinks to close . Even the animations in scrolling in Google+ drops frames when it animates through the feeds. I just wanted to now why most Google apps can't seem to run smoothly as the System UI and is this going to get better?
19
u/azgul_com Jul 19 '16 edited Jul 19 '16
Is something going to be done with the huge issue that 87% of devices are NOT on Marshmallow 9 months after it was released? (not with Marshmallow, but the slow update rollout for OEMs in general)
I consider this the biggest issue with the platform at the moment :(
4
u/nextdev Jul 19 '16
I wonder whether Android Platform will have QUIC protocol support and expose it in SDK for app developers. Any plans on that ?
4
u/mrogger Jul 19 '16
Any plans to significantly advance sqlite or support any other db systems? E.g. fluent APIs for schema/query, easy migrations for schema/data, encryption, compile time checks, type safety, out of the box automated test support, ...
4
u/mrogger Jul 19 '16
Any plans to get rid of XML (layouts, values, manifest, .. )?
4
u/[deleted] Jul 19 '16
What procedures are being put into place in order to stop fragmentation?
7
u/shamu11 Jul 19 '16 edited Jul 19 '16
Hello!
Building a background sensor monitoring application, Doze posed quite a challenge for my team because Doze would automatically break a lot of our sensor collection and we had to find a lot of shoddy workarounds to kick Doze. What improvements to Doze were made in Nougat to perhaps play better with background processes like sensor collection?
1
u/Timotato Jul 19 '16
How do I catch more cats in DP5? Thanks.
1
u/A_Reddit457 Pixel 2 XL Jul 19 '16
Are you planning to add support for the album-artist tag in media files?
1
u/security_bugs Jul 19 '16
This is a question for Paul.
I know Rom's team mostly focuses on performance regressions, UI jank etc, but is there anyone on his team or in Android auditing the vendor kernel code before it ships? I submit security bugs to the vuln program, but it amazed me when I started looking how trivial some of these security bugs were. Is anyone doing anything to adudit the Qcom/nVidia and Mediatek vendor code before the new devices ship out? Or is that the job of the android security team?
1
u/aaronmix Jul 19 '16
Will there be a Dev Summit this year? If so, when it will be?
1
u/rmokveld Jul 19 '16
I really like what you guys did with notifications in N. Is there any chance that there will be system level snooze functions like in the Inbox app for notifications?
1
u/idoideas Jul 19 '16
Will N5 support N final?
1
u/mastroDani Jul 19 '16
How should we develop a service monitoring some device sensor in background to optimize for battery?
For example: the FusedLocationProvider use PendingIntent to give significant changes in location by doing computation on many sensors. How could we write a service like that for sensors that do not provide a PendingIntent api? (example: with bluetooth)
hope I'm not late for this question :)
1
u/[deleted] Jul 20 '16
Any info on the "new" bottom bottom things? Like is the home circle supposed to be 'coloured'?
1
u/[deleted] Jul 20 '16
With 4.4 KitKat, Full Screen Immersive Mode was proudly shown as a new feature. Why do seemingly none of Google's own apps seem to take advantage of this?
I hate having the navigation buttons (triangle, circle, and square) burnt into the bottom of my screen.
I use an Xposed module called Force Immersive Mode, and toggle it on several of Google's apps. Chrome and Maps/Navigation look marvelous with this on, just to name a few. Why not at least add it as an option within some of the Google apps?
1
u/m4au312 Jul 20 '16
Color navigation bar to fix screen burn in on the amoled screen Nexus devices? Thank you!
1
u/madwifi Jul 20 '16 edited Jul 20 '16
The
ConstraintLayoutis a good feature, but how is it possible to use it withCoordinatorLayout? i.e., my real question is will there be a Helper class with the feature ofConstraintLayout(orCoordinatorLayout) which can be used to mix-and-match features.I couldn't ask this earlier because I'm from the other side of the world where it's 12:30pm in the night.
15
u/mastroDani Jul 19 '16 edited Jul 19 '16
The community is creating many unofficial language supports for developing in Android: kotlin, groovy, scala, just to name a few.
I believe the reason behind this is that those language makes writing software easier, less tedious and more boilerplate-free.
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?
3
u/[deleted] Jul 19 '16
If there a plan to unify the development process for NDK/non-NDK applications? Using the experimental gradle plugin has definitely had its ups and downs, and it also prevents me from using some libraries (like Realm for instance).
3
u/krupal55 Jul 19 '16 edited Jul 19 '16
This question is specifically about writing layouts in XML and upcoming stuff in the framework like constraint layouts. Most of us here will agree that designing layout with XML is a mess and writing XML is boring. Also, XML forces to have costly view lookups, nesting etc. and inflated on the tiny mobile devices wasting resources. Why can't we have something like Groovy based DSL for layouts? Why do we always have to copy and paste things because 'include' doesn't save us for everything? JetBrains did a good job by developing Anko but the truth is Kotlin is not a language really built for DSLs. What about something like groovy based DSL that is compiled directly to Java and renders fast without the need for parsing? The Gradle build system is the best example of how good DSLs can be written with groovy. This year Google I/O showed us that google is working on more advanced layouts called constraint layouts and good layout editor etc. I don't want to comment on constraint layouts but I am pretty sure that any layout editor will not help those who are building something more than just hello world layouts. Why is Android Engineering team still heavily focused on XML? What do you guys think about some good alternative to XML in near future?
3
u/cmsessa Jul 19 '16
Are there plans of removing the dependency of play services to the firebase sdk? For example, I would like to use the crash reporting tool, but it wouldn't work on China :(
3
u/H3x0n Discord mod Jul 19 '16
Are there any plans for a better keyboard api to make it possible to share images for example as well as text from a custom keyboard like in ios?
3
u/[deleted] Jul 19 '16
2 parter here:
Will Night Mode be an official thing in N?
Why am I only ever getting the same two cats? No matter what I do, I only get the same two...
3
u/jrobinson3k1 GoPro Jul 19 '16
Espresso has the ability to stub Activity intents to prevent them from launching and instead returning a canned response. Are there plans to also support stubbing Service starts/stops via Intent (While using ActivityTestRule) in the future? I'm currently having to do some workarounds to prevent services from firing while testing my Activities, and it makes testing a bit more difficult than it should be.
3
u/android_student Jul 19 '16
Any plans on additional Golang support in Android?
15
u/[deleted] Jul 19 '16
What are the improvements in battery efficiency in Nougat?