androidnewsandcodingstuff

androidnewsandcodingstuff

Android News & Coding Stuff

This blog is for latest android developer news and for new coding techniques which are available with newer android versions.

Explore Tagged Posts
Last Seen Blogs
Statistics

We looked inside some of the posts by androidnewsandcodingstuff and here's what we found interesting.

Inside last 20 posts
Time between posts
2 months
Number of posts by type
Photo
0
Video
0
Audio
0
Text
15
Chat
0
Answer
0
Link
0
Quote
0
Fun Fact

The company's tagline is "Follow the World's Creators".

androidnewsandcodingstuff·2 years agoText

Kotlin Sealed Classes

What is kotlin sealed classes?

- It’s a kind of ADT(Algebric Data Type), used for representing restricted class hierarchies, also aollowing a datatype to be one of a predefined set of types.

- Kotlin sealed classes let you easily handle error data. When combined with LiveData you can use one LiveData to represent both the success path and the error path. Way better than using two variables.

Docs:

How to use sealed classes in recyclerview adapter ?

- You can also use sealed classes in a RecyclerView adapter. They’re a perfect fit for ViewHolders - with a clean set of types to dispatch explicitly to each holder. Used as an expression, the compiler will error if all types aren’t matched.

How to use sealed classes as recyclerview callbacks?

- Going further with RecyclerViews, if we have a lot of callbacks from a RecyclerView item, like this one with detail clicks, shares, and delete actions, we can use sealed classes. One callback taking one sealed class can handle all the things!

Check my other blogs here: https://androidnewsandcodingstuff.tumblr.com

0 notes · See All
androidnewsandcodingstuff·2 years agoText

Kotlin Visibility Modifier

Everyone is wondering about kotlin. Can it replace JAVA completely ? Big question.

Before thinking about replacing JAVA let’s check about some simple things. In programming most important is Abstraction and Encapsulation.

In Kotlin, everything is public by default! Well, almost. Kotlin has a rich set of visibility modifiers you can use as well :

  • Private
  • Protected
  • Internal
  • Public

Each of them reduce visibility in different way

Let’s check this image which gives full idea

Doc link : https://t.co/6k9nSsPZQn

Follow me on Tumblr for latest news: androidnewsandcodingstuff

0 notes · See All
androidnewsandcodingstuff·2 years agoText

When is Android P(9.0) coming out ?

Among all the rumours about Android P. Every one is wondering what are the new features Android P will bring with the updates. Most important news is Android P is going to target SPY Apps.

What will Android 9.0 be called ?

- Rumours says it is going to be called “ Pistachio Ice Cream”. We can only know the name when Google launch Android 9.0.

But from previous record which we have as follow

  • Android Donut (v1.6)
  • Android Eclair (v2.0)
  • Android Froyo (v2.2)
  • Android Gingerbread (v2.3)
  • Android Honeycomb (v3.0)
  • Android Ice Cream Sandwich (v4.0)
  • Android Jelly Bean (v4.1)
  • Android KitKat (v4.4)
  • Android Lollipop (v5.0)
  • Android Marshmallow (v6.0)
  • Android Nougat (v7.0)
  • Android Oreo (v8.0)

We are sure that Android P is going to launch as Android 9.0. Google will annuounce name in the end of summer. But until the summer no one stop us to assume name.

There are already rumours the name could be Android Pie, Android Pecan Pie or Android Pumpkin Pie. Google are already dropping hints on twilltter. From those hint we find out pineapple pictures. Could we looking at Android Pineapple ?

Most recent sources are pointing to Android Pistachio Ice Cream. It suits with previous OS names we know Google likes ice cream.

When is Android 9.0 coming out ?

- Android 9.0 will most likely be announced during Google I/O 2018. Which is expected in between 16-18 May 2018.

What new features to expect in Android 9.0 ?

- Bad news for developers XDA suggests Google will remove access to unofficial APIs.

Other changes are we expect include supports for Wi-Fi Direct Printing support and Bluetooth hearing aids, and better integration of Android Things.

The new OS will also prevent malicious apps running in the background from accessing your camera and mic in order to spy on you, according to AOSP(Android Open Source Project). We will have to see how this affects anti-thefts apps.

One potencial new feature is smaller image file sizes. In IOS 11 Apple introduced HEIC files, which are also know as HEIF or High Efficiency Image Format. HEIC is developed by Apple itself so there is possibility Google could operate for the same.

Big rumours from XDA is that Android P will allow you to use your phone as a Bluetooth keyboard or mouse.

Things I like to see in new OS includes a faster rollout and less fragmentation among devices, enhancements on bettery life and performance.

What whould you like to see in Android P? Let me know in comments…

0 notes · See All