For further actions, you may consider blocking this person and/or reporting abuse
Read next
Data Structures: Creating Custom Node Classes
Dhanush -
React Native: Multi-Environment/Flavor Setup (App Icon, App Name, GoogleService.json) for Android [Latest] - 1
Ajmal Hasan -
Data API for Amazon Aurora Serverless v2 with AWS SDK for Java - Part 10 Aurora Serverless v2 Data API meets DevOps Guru or not?
Vadym Kazulkin -
Create an AWS SNS Topic Using CDK and consume messages with a Spring Boot Microservice
Kevin Lactio Kemta -
Top comments (20)
Why is Google pushing Kotlin on our throats, and not provide examples in Java too, for most of their codelabs? If they wanted more flexibility in Java, they should implement JavaScript in Android, and make it like Firefox OS was.
Hello!
What are you mean by 'Google pushing Kotlin on our throats, and not provide examples in Java '?
On their official site, developer.android.com, Google provides examples in two languages(Java and Kotlin).
Mostly. If you're going through guides, you will find updated ones only in Kotlin, for now maybe. And I'm reffering about codelabs.
Hello Dear!
How to upload image from camera to the server using php with retrofit?
Thanks!
Hello!
You can read this article and this.
Hello Dear friend!
Thankyou for your help!
I want implement the architures components, i have already do the part of the local Backend(ROOM).I across a problem with the remote backend(retrofit)!
Please help me!
Thanks!
What's the problem?
this is the result from the Logcat:Attempt to invoke virtual method 'void android.arch.lifecycle.LiveData.observe(android.arch.lifecycle.LifecycleOwner, android.arch.lifecycle.Observer)' on a null object reference!
To help you I need more information. Can you paste your code to gist.github.com/
and tell me in which line of code you got this exception.
I have pasted.This is the link:
gist.github.com/kasali/fd6f42a8523...
Seems like your user variable returned by getUser() method is null. Did you initialize it?
Yes i have initialise !
code in the Viewmodel Class:
public LiveData getUser(String username, String mdp)
{
return userrepository.getUser(username,mdp);
}
Let me ask the basic noob question
What do you think will be best for developing native android app, Kotlin or Java??
Cuz i would never learn java but would probably go in app development
(I am currently thinking to go for either React Native or Flutter )
Hello! Depends on your skills and what you want. If you want to develop native apps I highly recommended firstly to learn Java, exactly core Java, not an Android framework. Then starting to create some basics android applications. About Kotlin, I think if you know Java, you probably 100% know Kotlin, I myself smoothly switched from Java to Kotlin in my production project without any troubles. But keep in mind true Android developer should know both languages on the nice level because of all Android SDK written in Java and 70-80% legacy Android apps written in Java. About React Native and Flutter, I can not say anything, because for React Native need JavaScript and for Flutter need Dart, I don't use either JS and Dart.
Was it easy to switch from Java to Kotlin?
What were the challenges you faced?
I have an Android app in Java. What would be the advantages to convert it to Kotlin?
Hello!
As I said before, if you don't have problems with Java core, you don't face any issues with Kotlin.
And if your Android application had a huge code base in Java, it doesn't make sense convert to Kotlin, even if you decide to convert your application to Kotlin, it had not so big advantages over Java. In my opinion, Kotlin has those advantages over Java: Extension functions, better lambda syntax, receiver functions, var/val. Kotlin just syntax sugar for Java in Android.
Kotlin is NOT a syntactic sugar for Java.
Kotlin is a complete, functional, object-oriented, type-inferred, modern programming language that can compile to both JVM and binary.
There are many benefits that I can see in writing a project in Kotlin, major benefits including Type Inference, Coroutines, Null safety, Extensions, etc.
Coroutines are inevitable in Android development. It is the modern implementation of Async-Await, which can replace RxJava, AsyncTasks, Callback Hell, or Threads.
In my experience, writing Kotlin code makes development much faster and easier than writing code in Java.
If you want to start in Kotlin, you can write new files/classes in your project in Kotlin. Kotlin can co-exist with Java without much problems.
Once you get the grip, you can convert your existing classes one-by-one to Kotlin.
But without knowing Java core, you can't understand Android SDK source code, even more, you can't know how to use some method and how they work from Java standard API without knowing Java CORE. Kotlin stdlib is just a set of extension methods over Java methods.
Can you make me FillingButton sample app, pls?
Hello Dear friend!
Thanks for your help!