r/androiddev • u/cr5315 • Mar 09 '16
Android N Developer Preview SDK is Out!
https://developer.android.com/preview/index.html31
Mar 09 '16
Android N, soon available on 1% devices in 2017 !
2
u/runmymouth Mar 09 '16
I'm still stuck on android 5.0 on my Samsung s5. Yea att and Samsung, way to go to keep me current.
1
0
Mar 09 '16
[deleted]
15
u/Bayloader Mar 09 '16
Daily users for the app I work on is around 80% API 21+. That chart can be a little bit deceiving sometimes, but updates should definitely be easier to push to the end users.
9
Mar 09 '16
80% 21+ is pretty impressive. but yeah I've seen a lot of 90% API 19+. Kitkat seems to be the new gingerbread in some respects
2
u/instantbitsapps Mar 09 '16
My app is almost 50% 21+ and my main demographic is smart phone enthusiasts. How did you get 80%? I am at less than 20% below 4.4 though, I hope that drops faster so I can get rid of them.
1
u/QuestionsEverythang Mar 10 '16
Yeah my most popular app (+60k daily users) is 95% API 19+, 72% of that is Lollipop and 6% is Marshmallow (minSdkVersion is API 16). People tend to forget that those monthly dashboard numbers are global and not exactly representative of your own country.
2
u/devsquid Mar 09 '16
Yes some way for devices to be updated with out vendors having to monkey with as much shit and then have the updates come directly from Google, if its a Google Android device.
AFA apps go Android has a very good backwards compatibility system in place (ie running an app compiled with SDK 10 on a Marshmallow phone)
0
5
Mar 09 '16
Time to replace the Nexus 7 then.
3
3
u/TomorrowPlusX Mar 09 '16
Problem is, replace it with what? I love my N7, and nothing else out there compares.
2
Mar 09 '16
No idea yet.
Pixel C is tempting though. Perhaps after the next contract.
4
u/TomorrowPlusX Mar 09 '16
Pixel C is too big, but I guess that's the way it's gotta be. I love the N7 because it's basically an ebook/newsreeder/instaper machine that fits in my jacket pocket.
2
u/instantbitsapps Mar 09 '16
Pixel C is nice, I got one for my wife to watch TV while feeding our kid, but it is just so big compared to my Nexus 7, I would never be able to use it to read in bed.
2
u/solumamantis Mar 10 '16
Pixel C
I am tempted on buying Pixel C. Did you see that Google is giving a 25% discount for developers interested in Android N? I just got my promo code.
2
u/reggar Mar 10 '16
It bugs me that this discount is only available in the United States. A bit of an insult to any Android developers outside of the US...
1
2
1
u/eliasbagley Mar 10 '16
I got one for my wife to watch TV while feeding our kid
Oddly specific use case
2
u/instantbitsapps Mar 10 '16
Well until breastfeeding is over in a year or so from now, that is the only function of that tablet, it is actually mounted next to the feeding chair.
1
u/fleker2 (Play Store "Felker Tech") Mar 09 '16
Yeah sadly my tablet isn't supported 😞 At least not officially.
4
u/Turtlecupcakes Mar 09 '16 edited Mar 09 '16
Does anyone know where one could go to see further information or reasoning behind changes that are made?
Things like official source repositories or other specific places one could check.
The situation I'm looking as is the removal of the GET_ACCOUNTS permission. I'm sure there's a valid reason for it being removed, but I'd love to see what sort of process or reasoning went into that decision. Maybe in the commit messages on the source? (I don't particularly care about that permission either way, I'm just curious about it for personal benefit/learning)
http://developer.android.com/preview/behavior-changes.html
On a similar note:
ACTION_OPEN_EXTERNAL_DIRECTORY (New)
This permission is for a new storage option. Apps can now use the intent ACTION_OPEN_EXTERNAL_DIRECTORY to request that the system create a directory for the app's use.FINALLY. This definitely isn't going to stop anyone from polluting my SD card, but at least there's now an explicit and proper way to do it for the few apps that actually care (and my own apps). Hopefully we'll see the existing storage read/write the entire SD card permissions become deprecated/strongly discouraged (more red/angry branding in the permission dialog when installing?) in the future to push developers towards the cleaner solution.
3
u/pjmlp Mar 09 '16
Finally some public statement about Java 8 and future versions.!
Apparently they are closing NDK even more. Applications that don't follow the rules of linking only to the few existing public APIs won't run any longer.
They are adopting a feature from .NET and commercial JVMs where profiles can be used to recompile the application, using an AOT/JIT combo.
They will be also providing hardware keystores that prevent jailbreaking, interesting. ..
In any case, the majority of the world is still on 4.x.
1
u/4brunu Mar 09 '16
I think I didn't get it, why do you say they are closing the NDK even more? Because of Jack? Could you explain please?
3
u/pjmlp Mar 09 '16
The NDK documentation has a list of what platform libraries you are allowed to link to:
http://developer.android.com/ndk/guides/stable_apis.html
Since there are many more libraries on the OS than just those, e.g. libpng, skia,..., many devs link to them, with the hope that they exist in enough devices.
Google is now ending this practice, NDK applications that try to link to platform libraries not part of official stable list, by introducing namespace changes to private APIs thus leading to crashes for those apps that weren't playing by the rules.
https://developer.android.com/preview/behavior-changes.html
Search for "NDK Apps Linking to Platform Libraries"
2
u/4brunu Mar 10 '16
Thanks.
By the way, android ndk r11 ir live.
https://www.reddit.com/r/androiddev/comments/49qup4/ndk_r11_release_is_live/
7
u/TODO_getLife Mar 09 '16
Please make Android N the time to fix updates, so I use new APIs and have your developers can actually build great apps without having to worry about backwards compatibility and not using 90% of new apis that come out with each release.
3
u/Zhuinden Mar 09 '16
...I honestly wonder if Fresco will work after the NDK namespace changes.
I also wonder how no longer receiving CONNECTIVITY_ACTION will change receiving push notifications. Maybe GCM still listens? Without having to be in the foreground....?
2
u/athornz Mar 09 '16
What a surprise! I guess Google IO won't be very Android focused.
12
u/Wonnk13 Mar 09 '16
or it'll be very android focused and by releasing the SDK earlier it'll give devs a chance to update their apps in time for IO workshops and have a more productive working session.
1
u/MrBIMC Mar 10 '16
I guess IO will be focused on a new services and hardware(mainly):
hangouts replacement
smart services
android-tv related services
hardware!
1
u/GavinThePacMan Mar 10 '16
I haven't seen this mentioned anywhere. Kotlin won't work with the new Jack compiler, right? There are no intermediate class files used.
0
u/indieslu Mar 10 '16
Well, I just want my API access to airplane-mode which was removed in Android 4.2 back...
android.provider.Settings.System.putInt(
context.getContentResolver(),
android.provider.Settings.System.AIRPLANE_MODE_ON, enable ? 0 : 1
);0
Mar 09 '16
[deleted]
11
u/neoranga Mar 09 '16
lambdas, yes!
5
Mar 09 '16 edited Mar 09 '16
What's the best way to get started using Java 8 style lambda's now, but with SDK 23, not 24. I think I've seen people refer to libraries that provide this (and would hopefully provide easy source code transition to SDK 24/jack later)?
2
1
7
u/ditn Google Developer Expert Mar 09 '16
According to this chap, looks like the Java 8 support is sadly quite limited. Oh well.
5
u/TweetsInCommentsBot Mar 09 '16
Lambdas are in, but not functional methods, statics on interfaces, or mixins. It'll be good for boilerplate, not so much for architecture.
This message was created by a bot
[Contact ^creator][Source ^code]
Starting from 13th of March 2016 /u/TweetsInCommentsBot will be enabled on opt-in basis. If you want it to monitor your favourite subs ask its moderators to drop creator a message.
3
Mar 09 '16
[removed] — view removed comment
2
u/epicstar Mar 10 '16
Is Kotlin dead with the new compiler though? If it is, I don't expect it to be working when SDK 24 is officially "stable."
1
u/jug6ernaut Mar 10 '16
Probably, since Kotlin works on building .class files. Granted Jack/Jill has been public knowledge for some time now. Hopefully the kotlin guys have been taking measures.
0
u/epicstar Mar 10 '16
The worry I have though is that kotlin doesn't compile into Java 8 bytecode...
1
u/jug6ernaut Mar 10 '16
That's not an issue, it will still run java6 bytecode. Think about it, if it didnt it would require every existing library to be recompiled, which google would never force.
1
Mar 10 '16
[removed] — view removed comment
1
u/epicstar Mar 10 '16
Wasn't the point of Jill to link older java bytecode like java libraries and put it into .jack? If Jetbrains is pushing Kotlin to be a first class citizen for Android, it's expected that the files compile exactly like the actual java code right (which kotlin more or less did before right)?
1
Mar 10 '16
[removed] — view removed comment
1
u/epicstar Mar 10 '16
This guy has also raised teh same concern and the main answer doesn't look good. I'm concerned since there's some new android-only optimizations to the code, and Kotlin won't be getting it if they're going the jill route.
1
Mar 10 '16
[removed] — view removed comment
1
u/epicstar Mar 10 '16
Jill is the intermediate layer, but Jill's purpose was to interface java libraries and external java code (not android-specific) into jack.
→ More replies (0)1
u/trevor-e Mar 09 '16
I read that as they only have Android N support for now, implying they'll release a streams support lib.
1
Mar 09 '16
[removed] — view removed comment
2
u/pjmlp Mar 10 '16
Does it ever work?
As compiler/language geek I dabble with everything I can, when time allows.
At work (enterprise clients), it is always Java, C#, JavaScript and very seldom some C++.
As their software stack is managed by their IT department and they don't want external people bringing new toys for them to maintain.
2
1
Mar 09 '16
Where did you get that quote? I looked at the developer section of this post's reference and couldn't find anything about Java 8, lambda's etc.
0
1
Mar 09 '16
[removed] — view removed comment
5
u/ThatOfficeMaxGuy VC Dev Consultant Mar 09 '16
That these features are available all the way back to Gingerbread for those still supporting it....? Pretty self explanatory.
4
u/b1ackcat Developer - Checkbook Plus Mar 09 '16
I'm taking it to mean as long as you're targeting gingerbread and above (which why the hell would you go lower than that), you can write java 8 code and the jack compiler will determine if your app is api 24+ or not and if not, rekajigger the code to strip away the java 8 features with replacement java 6/7 compatible code for the older devices.
Don't know if that's 100% right or not, but that's what I'm hoping for. Then the question becomes how robust is the java 8 featureset that Jack will support, especially since I'm not sure if there are simple-enough drop-in replacements for some of the newer features
0
13
u/athornz Mar 09 '16
You'll need to use build tools "24.0.0 rc1" rather than "24.0.0" - the docs are wrong.