Flutter requires developers to write many boilerplate codes. Android Studio provides a way to solve the problem, which is Live Templates. Live templates allow you to use customized shorthand to write repetitive boilerplate codes. This article will show you how to use Live Templates to minimize the effort to write repeated code.
The image below shows how Live Templates work in Android Studio:
In the quest of finding the most versatile architecture that I can use to create and maintain Flutter apps. I have tried no architecture, Redux, BLoC, InheritedWidget and Provider. Most of them provide unique ways to structure and manage states of widgets and apps. But most of them contains flaws that prevent full utilisation. An example would be Redux, a way to manage app state and very popular among people who did React. …
To provide an example, we want to access this TypeScript class on the Flutter side. Let’s create a
Dog.ts file as shown below. We have
Android developers are no strangers in writing Gradle scripts to manage dependencies, pull open-source libraries for the applications, set configurations such as using Proguard and product flavours. For those who are unfamiliar with Gradle. It is a build tool that helps us to automate build processes. In this article, I’m going to share how to write and publish a Gradle plugin in Kotlin.
It is to share your build steps across different projects. One such example is building and installing Android applications via Google’s Android Gradle plugin. We do not need to worry about the specific build steps of building Android applications such as finding and compiling the source code, packaging the assets files such as audios, images, and videos, minifying and obfuscate the source code via Proguard among other steps. So that we can dive straight into the Android app dev. …
My colleagues and I have been experimenting with creating a cross-platform application with Kotlin Multiplatform. I’m excited to share with you on how to write a mobile application with Kotlin Multiplatform using the MVP pattern.
There is an interesting technology by Google called Flutter. It is a framework where you can create mobile apps on iOS and Android at the same time, like React Native but with a programming language called Dart. I tried it out and I fell in love with it. One of the reasons that I love it is because to create a complete app by using and creating Widgets in a very short amount of time. Other than that, I am very happy with the Flutter development tools that made creating Flutter apps such a joy. …
It’s been a while since my last article on Medium (There goes my 2018’s resolution to write an article every month). In NetVirta, I am responsible to integrate a brand new C++ library to an Android library, which itself can be consumed by an Android application be it native applications, React Native or even the spanking hot Flutter which I have so much fun playing with during my own free time.
So I was using Djinni to do all the heavy lifting for me to generate JNI codes. It took me a bit of time to get used to Djinni and I do not regret spending time learning and using it. I shuddered at the thoughts of writing and maintaining them manually. …
Now that we are done with the setup and implementing the C++ code on the Android platform. We will continue from where we left off and we’ll try to run our codes on iOS!!
Apple’s iOS has been using Objective C as the main language to code its app and it integrates quite well with C and C++. Since the release of Swift language, it is still quite easy to integrate Objective C codes to Swift and vice versa. So it seems that linking C++ code and Objective C should be a straightforward affair even without Djinni. BUT… we still need to write Objective C++ codes to link C++ to Objective C and Swift. And it is still quite a complex code to write. …
One fine day, my friend came over to my place. I allowed her to use my laptop. As she happily started typing on Google Search. An incoherent strings of letters came out:
“What the heck is this?” she gasped.
I looked at the screen and instantly know what’s going on. So I pressed on left Ctrl and Shift at the same time to change the layout back to US Keyboard.
“I’m using a different keyboard layout.” I explained “I just casted a spell on it. You can type normally now.”
“Why can’t you use the normal keyboard like all the normal person would?” Her words were repeated by many of my friends, colleagues, and my family members that were unfortunate enough to use my computers since then. …
Update: I have made some updates to the Part I to make things work in this post.
This is a continuation of the last post. If you haven’t read it yet, I advise you to read it first. :)
This time we’ll use the generated codes created by Djinni that was shown in Part I and implement it to an Android application.
We’ll follow the project structure based on this Hello World Tutorial and create a folder and name it AndroidApplication on our project root. So our structure will look like this.
Next we’ll fire up Android Studio and Create a New Project and set the project location in the folder we just created. We’ll check the Include C++ support checkbox. …