16 ms·
Previewing Android P
- nathanaldensr 9y agoNeural Networks API 1.1 We introduced the Neural Networks API in Android 8.1 to accelerate on-device machine learning on Android. In Android P we're expanding and improving this API, adding support for nine new ops -- Pad, BatchToSpaceND, SpaceToBatchND, Transpose, Strided Slice, Mean, Div, Sub, and Squeeze. If you have a Pixel 2 device, the DP1 build now includes an Qualcomm Hexagon HVX driver with acceleration for quantized models. Can someone tell me what this will most likely be used for? I'm not familiar with the field.
- duckfruit 9y agoVery briefly: operations like Transpose, Strided Slice, Padding, and batching are standard operations used to build Convolutional Neural Networks, which is in turn is a standard building block for a vast array of machine learning applications (eg, image recognition)
- nathanaldensr 9y agoAh, cool. So is the goal with having this tech on the phone that the phone won't need to communicate with servers to do this sort of processing? I'm struggling to think of a use case for this.
- cdancette 9y agoYes, I think that's exactly the case, for doing object / face recognition from your phone camera in real time for example. Or maybe on device speech recognition in the future
- spyhi 9y ago> the goal with having this tech on the phone that the phone won't need to communicate with servers to do this sort of processing? Yeah, that's basically it. In short, the operations listed are pretty computationally intensive on a CPU, but pretty easy to parallelize for the data structures that are commonly used in machine learning (matrices and tensors). I presume that, by creating an API, Google can abstract out these common ML operations to work on the most efficient hardware on the device, whether a GPU or custom ML hardware such as Apple's Neural Engine. In theory, this should make on-device machine learning and inference more power-efficient, and could reduce reliance on server communication, improving privacy and probably making lightweight ML applications feel faster.
- richdougherty 9y ago> custom ML hardware I think it's speculation still, but it seems likely that the Pixel Visual Core chip included in Pixel 2s could be a target for the API. https://arstechnica.com/gadgets/2017/10/google-launches-the-android-8-1-developer-preview/ https://arstechnica.com/gadgets/2017/10/google-launches-the-... The chip is already a target for some ML APIs. https://blog.google/products/pixel/pixel-visual-core-image-processing-and-machine-learning-pixel-2/ https://blog.google/products/pixel/pixel-visual-core-image-p...
- nl 9y agoThe new YouTube background removal feature is done on-device using neural networks. https://research.googleblog.com/2018/03/mobile-real-time-video-segmentation.html https://research.googleblog.com/2018/03/mobile-real-time-vid...
- sandGorgon 9y agoOptimized Kotlin Kotlin is a first-class language on Android, and if you haven't tried it yet, you should! We've made an enduring commitment to Kotlin in Android and continue to expand support including optimizing the performance of Kotlin code. In P you'll see the first results of this work -- we've improved several compiler optimizations, especially those that target loops, to extract better performance. We're also continuing to work in partnership with JetBrains to optimize Kotlin's generated code. You can get all of the latest Kotlin performance improvements just by keeping Android Studio's Kotlin plugin up-to-date. How is Google looking at Java vs Kotlin vs Dart. If Flutter is indeed a long term strategic investment by Google, then why not Kotlin ?
- pjmlp 9y agoI guess politics. You see the same with Go, all the Android support is kind of done by volunteers.
- sidlls 9y agoI wish they'd consider moving away from Java, Kotlin and really any JVM-basis for the platform entirely. I just can't stand development on that platform. It's got all the worst elements of "enterprisey Java" style development.
- ZenoArrow 9y ago> "It's got all the worst elements of "enterprisey Java" style development." What are your complaints about "enterprisey Java" development? Is this just a repackaged "text editor vs. IDE" complaint, or do you have other points you'd raise against Android development?
- kjksf 9y agoFlutter guys explained why Dart: at the time they were making decision they looked at bunch of languages and Dart came at the top. At the time Kotlin either didn't exist or was at extremely early stages. Regardless of history, Kotlin is, in the end, a JVM language. If you want to ship a Kotlin app, you need to ship JVM. Getting JVM to a reasonable size is a great technical challenge not to mention Oracle made it clear what they think about other companies reimplementing "their" APIs. (I do know about Kotlin Native but that's far, far future). Also, Google is not a Borg or centrally planned economy with 5 year plan. Flutter happened because a bunch of Chrome devs wanted to experiment with a better way to write mobile apps, not because Larry dictated that "Flutter is now long term strategic investment, so go and do it". Flutter happened to be a promising technology so it's getting increased attention and funding. But it could just as well fail, like AtScript did.
- drdaeman 9y ago> To better ensure privacy, Android P restricts access to mic, camera, and all SensorManager sensors from apps that are idle. Good. Now, if only permissions could be granted temporarily (e.g. "allow for this session", which auto-revokes after 5-60 minutes of not using the application), it'll be perfect. > We will also enable encryption of Android backups with a client-side secret. Is this about BackupManager? Awesome if so. (BTW, have anyone ever heard of any alternative BackupTransports, besides Google Drive?) > Android P also gives the user control over access to the platform's build.serial identifier by putting it behind the READ_PHONE_STATE permission. IMHO, they should've really split that in two different permissions and deprecate READ_PHONE_STATE. Device identifiers (including SIM card identities) and phone state ("someone's calling") are two different things.
- dblohm7 9y agoI'd like to see baseline Android block clipboard access from background apps a la Copperhead OS.
- zanedb 9y agoHow about requesting clipboard access in the first place?
- eco 9y ago> Now, if only permissions could be granted temporarily This flow would be much nicer but you can go in and revoke a permission later in App Permissions (not sure how many people know this).
- drdaeman 9y agoI know. This is what I do every time there's an app that needs accidental one-time camera or GPS access, but not a trustworthy enough to be granted those permanently. Like a banking app that can show me nearby ATMs when I need one (but then I don't want to even theoretically permit my bank to obtain my location outside of this scenario). Not convenient, as it requires a) not forgetting to revoke when done and b) a series of taps.
- matthberg 9y ago"Indoor positioning with Wi-Fi RTT" a hacker group I've worked with was working on this same problem! Glad to hear there will be an official api for it all, their work was some fascinating albeit somewhat jank stuff with building maps and marker beacons.
- nurettin 9y agoA client asked me to create an indoor positioning system. I ended up with using WiFi signals and classification algorithms to decide where among the pretrained coordinates the device is.
- metasaval 9y agoMy Senior Design Project, for getting my BS in Computer Engineering, was around indoor positioning. Granted we did it with Bluetooth and not Wi-Fi, but it's awesome that there'll be an API for it.
- ju-st 9y agoEnterprise Wifi access points have nanosecond resolution timestamps (necessary for RTT based positioning) since several years. Consumer class wifi radios are only precise to the microsecond. So 802.11mc capable devices will apparently gain nanosecond resolution? If I remember correctly from the research I did for my Wifi positioning project in university RTT shouldn't be much better than RSSI in real environments. Could improve fancy fingerprinting based machine learning though. An API to set the wifi radio to monitor mode and collect all MAC addresses and corresponding RSSIs on the ether would be more advantageous for precise positioning.
- qrv3w 9y agoI've also been working on this for a couple of years. I am just about to release a new version too! [1] Glad to see Android is putting their own out there, I am excited to try it. [1] https://github.com/schollz/find3 https://github.com/schollz/find3
- matchbok 9y agoSeems that with every release, Android falls further and further behind iOS. Every iOS release is jam-packed with huge new features. One of the "top" features of this release is... a notch? Do we still have to deal with 4+ messaging apps? And to throw salt in the wound, 90% of users won't see this until 2020. :/
- donttrack 9y agoThere is just not enough incentive for Google to implement features that will prevent them from tracking you, so you get the least privacy protecting feature: the notch...
- saagarjha 9y ago> you get the least privacy protecting feature: the notch I'm not sure what you mean here.
- saagarjha 9y agoBehind in what way? Android still leads in many areas, such as how it handles notifications.
- squiggleblaz 9y agoYup. Notifications in Android - actually useful. Notifications in iPhone - good luck. You'd better not be using your phone, and you better not have two notifications you want to receive. Otherwise they just disappear. But iPhone's notification dots >>> Oreo's. The Android keyboard (Gboard) is generally better, and emoji specifically. I never have problems finding the emoji I want on Android (because I can search for it), but on my iPhone I would sometimes if I'm lucky get a suggestion that if I'm lucky I would be able to see (or else it might just be ...). Otherwise it's just search through a giant list and hope my idea of where it belongs is the same as the developers'.
- zitterbewegung 9y agoIs Tensorflow Lite compatible with the Neural networks API? I don't see that it is. EDIT thanks child comment it is :) https://www.tensorflow.org/mobile/tflite/ https://www.tensorflow.org/mobile/tflite/ https://developer.android.com/ndk/guides/neuralnetworks/index.html https://developer.android.com/ndk/guides/neuralnetworks/inde...
- mngk1 9y agoCiting from https://www.tensorflow.org/mobile/tflite/ https://www.tensorflow.org/mobile/tflite/: "On select Android devices, the Interpreter will use the Android Neural Networks API for hardware acceleration, or default to CPU execution if none are available."
- pedrocr 9y agoOne thing I'd really like to see Google try and fix is upstream kernel support for the phone platforms. Right now there's no chance for an open-source project like LineageOS to be able to support all devices properly when each and every single device is stuck on an old kernel often with a bunch of important CVEs unpatched. It's as if Ubuntu needed to do independent development for each and every laptop. Without something like that buying an Android phone is a mine field of various states of broken software provided by phone manufacturers. It's like trying to buy a consumer wifi router without the knowledge that if it's supported by OpenWRT you can just ignore whatever broken software the particular manufacturer put into it and will never support going forward. The first rule of hardware is that hardware makers can't do software and Google seems to have mostly given up.
- pjmlp 9y agoThe irony being that in 2018 most new devices are being released with Nougat, with eventual update to Oreo, if at all. Why? Nougat devices don't require Treble certification.
- eslaught 9y agoHasn't this been a thing since forever on Android? People are always lamenting that uptake of the newest version (or newest 2 versions) is slow. Do you actually have evidence that the uptake of this specific version is slow? Otherwise I don't see any reason to believe this is out of the ordinary for Android. I remember when it took forever to go from Donut to Eclair on my T-mobile MyTouch device... when the newest version was already Froyo.
- pjmlp 9y agoYes, the evolution on dashboard, currently at 1.1% about two months away from Google I/O, probably one of the lowest numbers so far. https://developer.android.com/about/dashboards/index.html https://developer.android.com/about/dashboards/index.html
- 9y ago
- ProAm 9y agoDoes Google release bugs that were fixed in each release? Im still waiting to hear if they fixed the MS Exchange syncing using Gmail that was broken in Android O. It's near impossible to tell what is working or broken between releases.
- philipwhiuk 9y agoMy understanding is it's probably broken because they don't pay for the patent.
- bubblethink 9y agoNot for google play services or google apps, which gmail is. The AOSP tracker will have AOSP related bug information.
- ac29 9y agoI've heard good things about nine [0] if you are working with MS Exchange. Haven't used it personally though. [0] https://play.google.com/store/apps/details?id=com.ninefolders.hd3 https://play.google.com/store/apps/details?id=com.ninefolder...
- kuschku 9y agoOne of the largest issues of Android P is that the Nexus devices will never get it. So if you as developer want to get the developer preview, the cost for that just went from 270€ (Nexus 5X) to over 759€ (Pixel 1), and the Pixel 1 isn't even available in major markets such as France. So now a huge number of developers has no ability to test their apps on the latest version of Android. For me, personally, this means I won't be able to support Android P, I won't be able to replicate bugs, and in worse case (as happened before once) I'll have significant bugs in my app, no way to replicate them, and no way to fix them, because the bug doesn't show in the emulator, and I have no device to test on. Google's really shooting themselves in the foot by offering no way for developers to get an affordable testing device anymore.
- foobaw 9y agoThis is actually a pretty big deal. I think one way they can really solve it is to improve the emulator to make it actually useful. For now, you'd just have to ship a Pixel device to France and pay an extremely high fee.
- blinkingled 9y agoWhat about the Android One devices like the Moto X4 or any one of the ones from Nokia that will end up getting P?
- veeti 9y agoThat's not of any use for testing apps before P is out. It will be months after the official release before non-Google phones get P.
- kuschku 9y agoNone of those devices get the developer preview. All Android One devices get updates from the manufacturer, usually several weeks after release. A developer with a Pixel can test their app on P in spring. A developer on a Moto X4 or a Nokia can test their device in late autumn. That's 6 months extra time to fix bugs and adjust to new APIs.
- mtgx 9y ago> As part of a larger effort to move all network traffic away from cleartext (unencrypted HTTP) to TLS, we're also changing the defaults for Network Security Configuration to block all cleartext traffic. Finally! I know Apple originally promised this for iOS9, but I believe it eventually went back on its word? Is HTTPS mandatory for all iOS apps now? > We will also enable encryption of Android backups with a client-side secret. Did they just one-up iOS11 here? This one almost seems like a shot at Apple's recent security degradation for iOS. > In Android P we continue to refine Doze, App Standby, and Background Limits to further improve battery life; please be sure to try your apps with these and send feedback. How about you start showing me the apps that are actually draining my phone's battery, and stop allowing them to hide behind Android OS and System. Battery stats are virtually useless these days because they don't even tell you half the story.
- sjwright 9y ago> Is HTTPS mandatory for all iOS apps now? It is mandatory by default, but you can carve out exceptions. It appears Google has simply followed Apple's lead there. (Making it mandatory with no exceptions is impractical as some apps are designed to connect to servers not under the developer's control.) > Did they just one-up iOS11 here? No, just slowly catching up.
- mynameisvlad 9y ago> No, just slowly catching up. Are you sure about this? AFAIK, iOS will not do client-side encryption for iTunes backups (which is the equivalent to what's being talked about here) since iTunes still asks for a password to encrypt your backups. Although, I'm pretty sure it does for iCloud ones.
- iknowstuff 9y agoActually, iCloud backups are not end to end encrypted, which is a massive hole in Apple's privacy stance.
- kllrnohj 9y ago
- oflannabhra 9y agoI think the writing is on the wall for Google's Android. There is some analysis that Android, from a business perspective, did not work out all that well for Google. My best guess as to the future state of things: 1) Pixels move to Fuchsia, native apps are in Dart/Flutter, compatibility layer for Android. Fuchsia becomes a distinguishing feature of Googles hardware, and allows Google to differentiate vs Android competitors. 2) Google continues to support Android, but only as it affects their business interests (as a funnel for search). 3) Google migrates some service level functionality away from Android and Pixels become a first-class citizen in Google's ecosystem. If you look at Google's moves over the past 5 or so years, you can seem them try to mitigate the fact that Samsung was basically the biggest winner of Google opening up Android (Motorola Mobility acquisition, Pixels, Project Fi). Google sees that voice is unable to be monetized (from an advertising perspective), and is attempting to replicate Apple's strategy by creating a new revenue stream from hardware. This has the added benefit of capturing the most profitable users from Apple. It is a very big bet, and I would not want to be going up against Apple in a mature market. It will be interesting to see how it plays out! Ben Thompson has a pretty great take on these large shifts within Google [0]. [0] - https://stratechery.com/2016/google-and-the-limits-of-strategy/ https://stratechery.com/2016/google-and-the-limits-of-strate...
- mankash666 9y agoFor one thing, Google's inability to monetize Android better is it's own bad execution. There's nothing inherently bad about the Android platform, from a monetization standpoint. Google's pixel & nexus phones have never dominated the market - and for good reason - they're not the best. If Google can get their hardware act together, they can see a windfall in revenues/profit.
- ufmace 9y agoI think with the Pixels, Google is at least making an effort at having the best hardware. They still have some things to figure out regarding marketing, logistics, keeping design language consistent, etc, but at least for now, they seem to be working on it.
- 9y ago
- skybrian 9y agoTo me, the privacy stuff stands out the most: "To better ensure privacy, Android P restricts access to mic, camera, and all SensorManager sensors from apps that are idle." "Longer term we're working to bring support for per-network randomization of associated MAC addresses to the platform."
- singularity2001 9y agoclicking through the neural networks api: ANEURALNETWORKS_RELU6 The output is calculated using this formula: output = min(6, max(0, input)) is that a joke/easter-egg? also: is there an official java wrapper for the neural networks ndk api?
- mcintyre1994 9y agoIt's in TensorFlow: https://www.tensorflow.org/api_docs/python/tf/nn/relu6 https://www.tensorflow.org/api_docs/python/tf/nn/relu6 And even points to a paper: http://www.cs.utoronto.ca/~kriz/conv-cifar10-aug2010.pdf http://www.cs.utoronto.ca/~kriz/conv-cifar10-aug2010.pdf I'm not sure why they didn't make it a variable maximum though, or what the advantage is over multiplying a sigmoid by 6.
- clarle 9y agoThere's an explanation here: https://stackoverflow.com/questions/47220595/why-the-6-in-relu6 https://stackoverflow.com/questions/47220595/why-the-6-in-re... It's an arbitrary value, but 6 fits best into 8 bits.
- jamesonthecrow 9y agoNot a joke / easter-egg. RELU6 is an activation function commonly used in deep convolutional neural networks. It comes up fairly often in mobile machine learning cases because it's used in Google's optimized MobileNet architecture and would cause errors when trying to convert to run on device. The original paper detailing the function is here (PDF warning): http://www.cs.utoronto.ca/~kriz/conv-cifar10-aug2010.pdf http://www.cs.utoronto.ca/~kriz/conv-cifar10-aug2010.pdf "Our ReLU units differ from those of [8] in two respects. First, we cap the units at 6, so our ReLU activation function is: y = min(max(x, 0), 6). In our tests, this encourages the model to learn sparse features earlier. In the formulation of [8], this is equivalent to imagining that each ReLU unit consists of only 6 replicated bias-shifted Bernoulli units, rather than an infinite amount. We will refer to ReLU units capped at n as ReLU-n units."
- butz 9y agoProgressive Web Apps still have Chrome icon on them, and nowhere to be seen in Installed Apps list. Is Google backing up on PWAs?
- dstaley 9y agoThis sounds like a bookmark, not a PWA. I have several PWAs on my Pixel 2, all of which appear without the Chrome icon in my app drawer.
- kuschku 9y agoAndroid has two ways of PWAs currently, either as a more complicated bookmark (with the icon) or with Chrome generating an APK on the fly, Google signing it on the fly, and it then being installed. Obviously, this is only available to Chrome, and not to any third-party browser (the EU antitrust commission is gonna love this).
- rtpg 9y agoThe Google maps PWA created from Firefox for Android looks very "app-y" to me. No header or anything I bet that there's a certain set of meta headers you need to use Doesn't show up in the installed apps tho
- saagarjha 9y ago> [W]ith Android P we're starting a gradual process to restrict access to selected non-SDK interfaces, asking developers -- including app teams inside Google -- to use the public equivalents instead. In cases where there is no public equivalent for your use-case, please let us know -- we want to make sure that this process is as smooth as possible for developers, so we'll use your feedback to ensure the initial rollout only affects APIs where developers can easily migrate to public alternatives. What's the situation with private API use on Android? What can you do with private API? Will you be rejected from the Play Store if you use it?
- Karliss 9y agoAcording to https://android-developers.googleblog.com/2018/02/improving-stability-by-reducing-usage.html https://android-developers.googleblog.com/2018/02/improving-... it will simply not be possible to access API you are not supposed to touch. Trying it will result in NoSuchFieldException/NoSuchMethodException.
- saagarjha 9y ago> Starting in the next release of Android, some non-SDK methods and fields will be restricted so that you cannot access them -- either directly, via reflection, or JNI. If you try, you can see errors such as NoSuchFieldException or NoSuchMethodException. Yes, how is this done? Using SecurityManager or something similar?
- pjmlp 9y agoI guess so. For NDK they are using a similar process. Any attempt to use on-device libraries not part of the official NDK APIs will terminate the application.
- kllrnohj 9y agoIn the runtime itself: https://android-review.googlesource.com/c/platform/art/+/580003/10 https://android-review.googlesource.com/c/platform/art/+/580... CL is abandoned but it appears to have just be split up into smaller changes, so that should still give a good idea of the approach being used.
- Osiris 9y ago> As we announced recently, Google Play will require all app updates to target Android Oreo (targetSdkVersion 26 or higher) by November 2018 Android Oreo is only running on 1.1% of devices [1]. Will targeting the newest API prevent the app from being available for in the market for devices running Nougat or earlier or does it just limit the functionality? [1] https://www.androidauthority.com/android-version-distribution-748439/ https://www.androidauthority.com/android-version-distributio...
- mjw1007 9y agoNeither of those things. Targeting Oreo means telling the OS to disable backwards-compatibility behaviour which would otherwise apply.
- falnatsheh 9y agoYou could target Oreo but I assume you could still set minSdkVersion lower than that.
- dukoid 9y agoThere are two API levels for Android Apps: The minimal API level and the target API level. Perhaps it makes sense to see the target API level as the "maximum" API level the App fully understands. For instance, Android can't enforce dynamic permissions on older Apps not designed for this, and people have been exploiting this by keeping the target API level low.
- adrianmonk 9y agoAndroid apps declare two versions. Basically, the oldest version they can run on, and the newest version whose quirks and new behaviors they're aware of. A good concrete example is the switch from making users agree to permissions when they install an app to runtime permissions. In the new style, the app is responsible for bringing up dialogs to ask for permissions. In the old style, the system does it when you install. So how does the system know whether your app knows how to ask? By setting targetSdkVersion to 23, you tell the system, "It's safe to assume I know about this new API I'm required to implement." But that doesn't preclude your app from running on older systems, where things behave just like they always did.
- rb808 9y agoNo support for 6p or 5x. WTF my phone is <2 years old.
- mcintyre1994 9y agoWow.. before I switched to iPhone I had a Nexus 5, released in October 2013. The iPhone 5S was released a month earlier in September 2013, and got iOS 11. (Though maybe this is what the other commenter means by a slow broken update?)
- curiousgal 9y agoAn iPhone 5S with iOS 11? That must be a real pleasure to use.
- Someone1234 9y agoDepends on the storage/battery degradation. I have a lightly used 5S and iOS 11 works just fine (no major lag or stutter). But I'm sure people that have a heavily used 5S will have a different experience.
- chki 9y ago2 years and 5-6 Months to be fair and it will probably be exactly three years old when Android P gets released. In my opinion this is ok because they have been very upfront about the updates from the beginning (two years system updates and three years full security updates). Also backward compatibility for new apps will be there for a really long time. I would also add that it s preferable to the slow iOS situation: "No update" is better than "broken update".
- tomsmeding 9y agoIf they said that in advance, the only thing that it bought them is no legal action. (Though no-one would bother getting a lwyer over something this small...) Such a period is quite short, and maybe too short for a resourceful company like Google. They should be able to do better; I'm sure the "old" hardware can manage. (Else you've got a problem with your software.)
- bubblethink 9y agoAny chance the original Pixel's kernel version (3.18) got updated ? All android devices get frozen in time with the kernel they ship with due to blobs. Nothing new. Just checking if that is ever going to change.
- mortdeus 9y agoWhat I want to know is what they plan to call this version of Android. Android Pez, Android Peeps, Android Peppermint, Android Pudding, Android Pie, Android ummm im out.
- eik3_de 9y agoWait, the clock will be in the top left? That spot is for temporary items like notifications, not something permanent like the clock!
- IloveHN84 9y agoI still see the lack of security features as in iOS a penalty. I would prefer less eye-candy over a better security. And I hope that more middle-high end phones might profit from the Go edition of Android. I still find surprising that a few vendors (Maybe only Nokia and Lenovo?) are selling bare-version of Android.