Jetpack Compose is the next-generation Android UI toolkit that helps to create UIs with very little effort.
Apart from UI components, it also provides a kind of observer pattern out of the box. In Jetpack Compose, this is called State. Whenever the State changes, the composable will be recomposed. This means the UI gets updated with the new state which could be a change of text, color, shape, size, etc.
So if Jetpack Compose makes it more efficient to build UIs, and Firebase makes it more efficient to build apps, how about we bring both together to leverage their combined…
SharedPreferences are one of the easiest ways to store data locally as it requires very minimal overhead. However, there were certain restrictions or issues with SharedPreferences that should get rectified because of the advancement of the programming language from Java to Kotlin.
What were the issues with SharedPreferences?
All the above issues are now rectified with Preferences DataStore which under the hood uses kotlin flow and coroutines, that’s…
As constraint layout 2.0 is available in the stable version so with that we also have motion layout in the stable channel because motion layout is the sub-class of constraint layout. With motion layout, you can create complex animation with ease as it hardly requires manual coding to create animations.
How does it work?
Motion layout is a sub-class of constraint layout which means all those concepts of constraint layout like positioning the views etc are applicable with motion layout also, apart from that you will also create another XML where you can define when your animation should start, the path…
Constraint layout have an ability to create a complex layout without increase hierarchy but there were certain scenarios where just having a flat layout makes development further complex. Those problems are sorted out in constraint layout 2.0 and it also offers complex animation using the motion layout.
It’s a virtual layout which offers all capabilities that linear layout can offer while using flow you can create views without specifying individual view constraint because it requires all those views to be referenced to flow and just assign constraint to flow is sufficient.
Why flow is called as the layout is because it…
Kotlin is certainly a beautiful language and for developers having such a language enhances productivity and reduces the development time and effort. The best thing about kotlin is the active development in the ecosystem where new feature gets added as the new version gets released and those new features even enhance the productivity of developers.
With Kotlin 1.4 we have some handy language features which are helpful to write a concise and effective program.
A single abstract method is a great way to reduce interface callback with lambda provided you have a single method in the interface. …
Machine learning model could be huge in size and adding the tflite model to android or iOS app while packaging it to apk to ipa file will increase the size of the app, however with an increase in the size of the app the amount of installation may come down, so one of the ways to reduce the size of an app can be deploying the model and downloading it on the fly based on the requirement.
Firebase Machine Learning Custom Model
Firebase machine learning is one of the services by firebase which offers ML capabilities where you can either deploy…
Machine learning is really important to unlock those features which were quite difficult to achieve before introduction to machine learning however the amount of expertise it requires is a matter of concern for many. So how about getting the ability to add machine learning capabilities to either android or iOS apps without having much experience in training the model or deploying them.
Firebase Machine Learning
The platform which provides solutions to many problems now has a dedicated service for cloud-based machine learning, it’s firebase. Earlier firebase had a service called ML Kit which offered on-device and on-cloud machine learning capabilities to…
Kotlin is certainly a beautiful language that most of the android developers love and there could be multiple instances when kotlin features would have saved time for app development and improved the quality of it. Firebase APIs are concise and specific to what they do however kotlin can improve it further by making it developer-friendly and even concise than what it is currently.
ktx extensions got started with a set of libraries for Android and now those are getting extended to the firebase also. Firebase kotlin extensions provide a kotlin way of calling APIs that looks much neater and…
Tensorflow serving is a mechanism to host the trained model on the server so that inference can be done without downloading model on the local system. A machine learning model is a mathematical function that takes some input and delivers the result, the result is nothing but the prediction(inference) which is based on features provided to it as the input.
Before we begin with the hosting model let’s see the type of machine learning.
Types of machine learning?
There are broadly 3 types of machine learning
1. Supervised learning
2. Unsupervised learning
3. Reinforcement learning
It’s a type of…
It’s a modern toolkit by Google for building a native android app that simplifies and accelerator UI development and brings more flexibility while developing and designing the android app. The structure which it follows is similar to declarative programming where composition takes preference over the inheritance.
All the UI components are written inside the function marked as @Composable this function is the same as any other function where the annotation used here is just to make compiler understand that this function contains the code to build UI. A different kotlin compiler is bundled with android studio 4.0 …