Android Dev Summit Is Coming!

Share if the site was helpful

Android Dev Summit Is Coming!

If you’re an Android junky then you’re probably still coming off of this years Google I/O high.  We saw some really cool stuff we can leverage in our apps to create great user experiences.  But the development fun is far from over.  It’s already time to mark your calendars for another big upcoming development conference: Android Dev Summit 2019.

Last Year’s Summit:

Last year at Android’s annual developer conference we saw some big changes.  These included things like App Bundles in place of old APKs to reduce the size of your app.  On average app sizes were decreased 8% and some saw much bigger changes (30+ percent!). The idea behind an App Bundle is to only download the resources needed for your specific phone/version instead of downloading everything and then using what you need.  We’ll actually be going into detail on it in another post soon.

That was a big size change, but a big code change was focused around Jetpack.  Another topic we’ll dive into further with some tutorials if you haven’t applied it yet is updating your legacy support libraries to AndroidX. Basically your app functions the same way, but moving forward things are a lot cleaner on the Android support library!

What’s Coming This Year?

Those are some good topics that you should definitely be leveraging in your apps today, but the purpose of this post is to ask what may be coming this year.  And if Google I/O is any indicator of it, then the answer is a lot.  There’s not an official roster of topics posted yet, but we’ll likely be seeing deeper dives into some of the topics covered at I/O such as Android Q gestures and dark mode. And now with Kotlin as the preferred language for Android development I’m sure we’ll see some technical dives into what’s happening under the hood.

Along with some of these unique sessions come other perks for those of you attending in person.  There will be more hands on experiences with product demos, and you’ll be able to meet with members of Android’s team and discuss topics in more detail.  If you’re interested in attending then here’s a huge plus: ITS FREE!  Yep no purchase necessary for a ticket, but you do haver to be accepted by invite, so there are no guarantees.  Still, applications are open until August 15thso I’d highly recommend applying!

We’re Almost There:

There are a plethora of changes that could get whole sessions focused around them (permission changes, internal app sharing, optimizations).  And if you want to make sure you’re up to date on it then keep an eye on our page or on the official Android Dev Summit page.  If you can’t make it in person (Cali isn’t just around the corner for some of us), then don’t worry.  All the sessions will be live streamed on the site as well.

What are you most excited about for Android Dev Summit 2019? Let us know in the comments below!

 

Using Kotlin DSL For Gradle

Share if the site was helpful

Using Kotlin DSL For Gradle

If you’re an Android developer then you’ve undoubtedly worked in the build.gradle file.  And you’ve undoubtedly wanted to throw things at your computer when it didn’t work as intended.  It’s a file (2 actually) essential to your app’s well being, but it’s written in Groovy which pretty much no one knows well.

This has created frustration for countless users when they can’t compile things correctly.  Thankfully there’s a better way, and as with most things Android the answer is Kotlin!

Kotlin Instead of Groovy:

Gradle recently released version 5.0, and along with this comes Gradle Kotlin DSL v1.0.  This is what lets us write our Gradle build scripts in Kotlin.  But before doing so we should ask if this is even a good idea.  Why would we want to write our build scripts in Kotlin?  Well for starters Groovy is a dynamically typed language (type is associated with run-time variables).  This means that it’s tough for Android Studio to warn you about much until after the script is already running.  Kotlin on the other hand is statically typed, so lots of bugs can be checked by the compiler before the script is ever run.

Along with this check comes autocomplete.  Android Studio will be able to suggest common method names and variables to you the way it already does in Kotlin or Java files you type in.  Couple this with the comfort that you already (hopefully) have with Kotlin, and it’s an instant improvement.

Prepping for the Leap:

So we’ve decided it may be worth looking into. What’s the first step? Step 1 setting yourself up to make the transition less painful.  Certain things are allowed in Groovy that aren’t in Kotlin, so if we make those conversions in the plain text, then converting the file will be easier.  One of these “things” is quotation marks. Groovy uses single quotations a lot, but those aren’t allowed in Kotlin.  So step one is replacing any single quotation marks you have with doubles.

Next you should make sure that your “apply plugin” uses are replaced with the plugin DSL block.  This is one plugin block that should encompass all of the plugins your project is using.  When your done here’s an example of what your plugins should look like:

There are unfortunately some limitations with this new plugin though, so if you encounter errors it is possible to still use the legacy plugin.

The final thing you’ll need to do is assign variables and call methods.  What I mean by this is that since Groovy doesn’t require you to explicitly write the = when declaring a variable or the () when running a method, these changes need to be made for Kotlin.  Here are a few examples:

Taking The Leap:

Ok, now we’ve made our prep changes, so hopefully things go smoothly with the actual changes.  We have three files we need to rename to include .kts. Our two build.gradle files now become build.gradle.kts, and our settings.gradle file should become settings.gradle.kts.  Rename these files and try to compile the project. Fingers crossed nothing erroneous pops up, and if that’s the case then congratulations you officially have a project running on Kotlin DSL!

These are just the basics, and I’m sure if your project is complex at all there will be a few more jumps in the process to Kotlin.  If that’s the case Gradle has documentation on their website that helps walk through how to go about some of these common changes.  I’d highly recommend checking them out if you feel lost.  And if you don’t need them, then your app should run just fine now, and any time you make changes to Gradle you can do so in Kotlin.

 

 

 

And So The Pixel 4 Leaks Begin

Share if the site was helpful

And So The Pixel 4 Leaks Begin

Last Fall I hopped on board the Pixel 3 bandwagon.  I was overdue for an upgrade and wanted a cutting-edge device.  Fast-forward more than half a year and I’m still incredibly pleased with the purchase.  That being said, I won’t be upgrading any time during the next year which is a shame because the Pixel 4 looks every bit as cool!

Pixel 4:

We’re still a long way out from the 4thgeneration device from actually dropping, but the first leak has just dropped revealing a peek into what the future holds. It shouldn’t come as a surprise, as Google phones are notorious for being some of the most-leaked in the industry.

The first Pixel 4 leaks are thanks to Pricebaba and OnLeaks.  Below is the image revelaing what the next phone will likely look like. It’s based on “early prototyping schematics”, so obviously nothing is set in stone.  That being said it’s probably still a good indicator of what’s to come.

The Design/Specs:

There’s a lot that’s still in the unknown for the Pixel 4, but these renderings tell us a lot all the same. Firstly, it’s impossible to not notice the large square camera module.  This will either have two or three cameras inside of it.  Pixel phones have always been known for their astonishing camera capabilities, so we’ll likely see some more improvements on that front.

What you may have not noticed immediately is what’s notthere.  The 4’s rendering is lacking a fingerprint sensor on the back of the device.  So the current rumor is that we may see an in-display fingerprint sensor.  Along with the changes we see some constants like the USB-C port and power/volume buttons on the right side. Then on the specs side there is talk that it will have 6GB of RAM and 128GB of storage at a minimum.

The Pixel 4 will likely launch in October and feature the newest Android software (Q).  While I may not be due for an upgrade when it comes out, I’m excited to see any advances made in the industry!  What are your thoughts on the Pixel 4?  Do you love or hate the design?  Let us know in the comments below.

en English
X