Airo Global Software

Think Beyond Future !

enter image description here

Let us begin by considering what android architectures existed before MVVM. The first component is Model View Presenter. Though this architecture classifies the business logic from the app’s UI, it is difficult to implement.

In the long run, this can change into high development costs. The second android architecture is MVC. Just like MVP, it is also quite difficult and not suitable for small projects. Google introduced MVVM to resolve these challenges. By separating code into smaller chunks, MVVM simplifies the debugging process.

Through this article, you’ll understand MVVM architecture and implementation. This blog shows how to debug common mistakes resulting from this architecture.

What is MVVM?

The Model is somewhat the same as MVC. we have ViewModels which are going through the view and all the logic is in the ViewModel and no controller is there.

Example: Knockout.js

What is Kotlin?

Kotlin is a static object-oriented programming language that is interoperable with the Java virtual machine, Java libraries and the android.

Kotlin saves time for programmers as the less verbose language provides briefer and less redundant code. Kotlin can be compiled into a javascript text or an LLVM encoder. In many ways, Kotlin is considered a replacement Java. While it is not compatible with code, it is interoperable with Java code and libraries. Kotlin also has its libraries that were built with its community's early development through an API for Android apps.

How to implement MVVM architecture in Android using Kotlin?

  • The first step is to launch Android studio
  • The next step is to create the model
  • The next step is to create the view
  • The next step is to create a recycle view adapter
  • The next step is to create the view model
  • The next step is to create the view model factory
  • The next step is to main activity connecting the code
  • The Final is the result

How to launch Android Studio?

First Launch Android Studio and create a new project. Make sure that you select Kotlin as your programming language.

How to Create the model?

Next is to create the app model. Also referred to as the data class. To avoid misunderstanding, create a package named model inside the java folder. Then, create a class named Blog in the model package.

For simplicity, the class will only have one variable. There is no need to include getters and setters, Kotlin adds them to the class automatically.

Here’s the code for the class. data class Blog(var title: String)

How to Create the View?

The view is what the user displays. The User interface, therefore, needs to be well structured to simplify any confusion and dissatisfaction.

Open the activity_main.xml file and change the Layout from a linear Layout. Set the orientation to vertical, this arranges the User interface components vertically in the Layout. Our app’s first-ever widgets are Edittext, Button, and a RecyclerView.

Make sure all these steps have IDs since they will be vital at a new stage.

How to Create the item_view?

In the Layout, we need to build the design of the element in the RecyclerView. Therefore, build a file named item.xml and include the code sufficient code. The design is easy since the individual can also access one attribute from the data class.

How to Create a RecyclerView Adapter?

A RecyclerView adapter handles the linking of the item.xml layout to the RecyclerView. It also includes a list of items and displays them to the user. The code for the RecyclerView is shown below.

class NoteRecyclerAdapter(val viewModel: MainViewModel, val arrayList:
ArrayList<Blog>, val context: Context):
RecyclerView.Adapter<NoteRecyclerAdapter.NotesViewHolder>() {
override fun onCreateViewHolder(
parent: ViewGroup,
viewType: Int,
): NoteRecyclerAdapter.NotesViewHolder {
var root =
LayoutInflater.from(parent.context).inflate(R.layout.item,parent,false)
return NotesViewHolder(root)
}
override fun onBindViewHolder(holder: NoteRecyclerAdapter.NotesViewHolder,
position: Int) {
holder.bind(arrayList.get(position))
}
override fun getItemCount(): Int {
if(arrayList.size==0){
Toast.makeText(context,"List is empty",Toast.LENGTH_LONG).show()
}else{
}
return arrayList.size
}
inner  class NotesViewHolder(private val binding: View) :
RecyclerView.ViewHolder(binding) {
fun bind(blog: Blog){
binding.title.text = blog.title
binding.delete.setOnClickListener {
viewModel.remove(blog)
notifyItemRemoved(arrayList.indexOf(blog))
}
}
}
}

How to Create the ViewModel?

Create a package ViewModel. Inside this file, built a Kotlin class and name it MainViewModel. The class should extend the Android ViewModel. You might face failure if you failed to include lifecycle dependencies from Jetpack.

The MainViewModel will have mutable live data that holds the array list. It’s vital to use LiveData since it notifies the UserInterface in case of any data change. The MainViewModel is shown below.

class MainViewModel: ViewModel() { var lst = MutableLiveData<ArrayList>() var newlist = arrayListOf() fun add(blog: Blog){ newlist.add(blog) st.value=newlist } fun remove(blog: Blog){ newlist.remove(blog) lst.value=newlist } }

How to Create the ViewModel Factory?

The purpose of a ViewModel factory is to the ViewModelchange. This prevents the app from destroying in case an activity is not found.

The syntax for our MainViewModelFactory is shown below:

class MainViewModelFactory(): ViewModelProvider.Factory{
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
    if(modelClass.isAssignableFrom(MainViewModel::class.java)){
        return MainViewModel() as T
    }
    throw IllegalArgumentException ("UnknownViewModel")
}

How is MainActivity connect the code?

We have built the model, ViewModel, ViewModelfactory, and RecyclerView. These variables need to be instantiated in the MainActivity for the application to execute.

Beginning by showing the RecyclerView and instantiating it. Set out the layout manager for the RecyclerView to LinearLayoutManager. The MainActivity file contains three major methods: initialiseAdapter,observeData, and addData. the initialiseAdapter method assigns a ViewManager to the RecyclerView.

The observeData looks for changes in the viewmodel and send them to the RecyclerAdapter. The addData method takes in the user’s input and updates the list.

class MainActivity : AppCompatActivity() {
private var viewManager = LinearLayoutManager(this)
private lateinit var viewModel: MainViewModel
private lateinit var mainrecycler: RecyclerView
private lateinit var but: Button
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)
    mainrecycler = findViewById(R.id.recycler)
    val application = requireNotNull(this).application
    val factory = MainViewModelFactory()
    viewModel = ViewModelProviders.of(this,factory).get(MainViewModel::class.java)
    but = findViewById(R.id.button)
    but.setOnClickListener {
        addData()
    }

    initialiseAdapter()
}
private fun initialiseAdapter(){
    mainrecycler.layoutManager = viewManager
    observeData()
}

fun observeData(){
    viewModel.lst.observe(this, Observer{
        Log.i("data",it.toString())
        mainrecycler.adapter= NoteRecyclerAdapter(viewModel, it, this)
    })
}


fun addData(){
    var txtplce = findViewById<EditText>(R.id.titletxt)
    var title=txtplce.text.toString()
    if(title.isNullOrBlank()){
        Toast.makeText(this,"Enter value!",Toast.LENGTH_LONG).show()
    }else{
        var blog= Blog(title)
        viewModel.add(blog)
        txtplce.text.clear()
        mainrecycler.adapter?.notifyDataSetChanged()
    }
 }

}

What are the Results?

If there were no mistakes in your code, it should compile and show the User interface in the image below. Whatever you type in the EditText should display in the recycler view once you select the submit button.

If you have any doubts about the above topic or have to get services and consultations and get MVVM architecture and android development using Kotlin. Feel free to contact us. AIRO GLOBAL SOFTWARE will be your strong digital partner.

E-mail id: [email protected]

enter image description here Author - Johnson Augustine
Chief Technical Director and Programmer
Founder: Airo Global Software Inc
LinkedIn Profile: www.linkedin.com/in/johnsontaugustine/

enter image description here

If you have to make a flutter app and are ready to release it on the Apple Store, then you are in the perfect place. In this blog, you will learn the process of how to publish the flutter app on the Apple store. There are some efficient points that you should always remember before publishing the app to the Apple store. Do you know that Apple is very restrictive about user privacy and UI design?. Don’t worry about that, We are going to cover the common problems that a new developer does during the publishing of their first iOS app. If you want to build a flutter app with perfect user design visit a flutter app development company for great works.

What is flutter?

Flutter is a UI toolkit for building fast, beautiful, natively compiled applications for mobile, web, and desktop with one programing language and single codebase. Flutter is a cross-platform development framework that has the ability to write one code and can deploy on different platforms. Actually, it saves a lot of time and effort for developers.

What are the steps to release the flutter ios app on the apple store?

  • First, you have to create an Apple Developer Account
  • Then you should Register Bundle Identifier
  • Next, you have to Get App icon and App screenshot ready
  • Then the next step is app Store Connect Listing Process
  • The last and final step isOpen Project on Xcode and Build

How to create an app developer account?

First, you go to the apple developer account official registration website and build an Apple developer account. Do not forget that an Apple developer account is associated with your email ID. So, choose the correct email ID and keep it a secret. Apple developer accounts have an annual fee that you should have to pay.

Ok, when you are going to publish an app for your user. it is a good exercise to create a separate account for them to avoid problems in the future.

How to register a bundle identifier?

After you register for the developer account, the first most important thing you need to do is register a Bundle ID. Every iOS app is associated with a Bundle ID, which is a rare identifier registered with Apple.

  1. On the official Apple developer account select “Certificates Identifiers and Profiles”. On the left side, the menu selects “Identifiers”.
  2. Click “+” to create a Bundle ID. Select “App ID” on the next following page and select continue.
  3. Select App type and then select “App” and click continue.
  4. On the following page select “Register an App ID” – Add a short description and select Bundle ID as Explicit and type an “App Package Name”
  5. On the next following page, confirm the information given and select Register to register your Bundle ID.

How to create an app icon and screenshot?

Ok now you have a bundle ID, it’s time to start a flutter project to fulfill the Apple instructions. We need to build multiple app icons for different devices. There are various tools available to build iOS icons like app icon generators, Just put a 1024×1024 px image and it will give you all of the apple icons. Now, you can download the zip file and extract it. Next, you can found that a file named “AppIcon.appiconset” inside the “Assets. cassettes” folder. Copy this file and open the flutter project on your Android studio. Select the iOS file in the project directory called your_project_name/ios/Runner/Assets.cassettes/AppIcon.appiconset. Paste and change the copied folder in the given location.

You can change the screen by removing “LauncherImage” with “LaunchImage.images”. Apple has provided the instructions on its official page, Please take an effort to read it.

How to do the app store connect listing process?

Next, you have to go through the apple store connection and select "my App." Select on the “+” icon to create the App. On the pop-up window, write the App name, select language, select the Bundle ID that you made in the last step, and write SKU. Please click on the full access radio button and select “Create”.

Now, on the next following page fill in all of the information. Please be careful when putting the screenshot. Following are the screenshot image dimensions:

  • app screenshot 6.5 display – 1242×2688, 2688×1242, 1284x 2778
  • app screenshot 5.5 display – 1242x 2208, 2208x 1242
  • app screenshot 12.9 3rd. – 2048×2732, 2732x 2048
  • app screenshot 12.9 2nd. – 2048×2732, 2732x 2048

Please Don’t forget the screenshot images should not contain the “flutter debug” tag . You can remove the flutter debug tag by writing the below code in the app.

MaterialApp( debugShowCheckedModeBanner: false,)

How to open the project on Xcode and build?

O the time has arrived to publish the app on Apple Connect. Open flutter project in Android studio, and select tool/firebase/ open ios module on XCode. Your flutter project has been perfectly exported into XCode. The first test app is running correctly or not in Xcode. Connect your iPhone device by a USB cable, and select the “RUN” on the top of the XCode. If there are any mistakes when running Xcode, then close the window, and execute it on Android studio to make the correction in the code.

Once you run the code successfully, On the Xcode window, Navigate to your target’s on settings in Xcode:

  1. In the main sidebar, click the Runner target.
  2. Select the General tab. There, you can change the app name. Do not forget, the bundle identifier should be the same that you have built in the early stage.
  3. Look through the deployment info section, and click device.
  4. If you are using Xcode for the first time, then it will promote you to log in with your Developer ID. Just sign in and, then, click TEAM as your developer account. Then check to automatically manage sign-in.
  5. Rest forms are automatically filled for you; you don’t need to make any changes.
  6. Go to Product/Destination/Build.
  7. Go to Product/Archive. Now you will see a pop-up window. Select the validate app and keep continuing until you get a message that notifies you that it was successful.
  8. Once the app gets validated, select Distribute App and the same pop-up window will appear. Once you get to a correct release of the app on the apple store, that means your build is ready to publish.
  9. It will take 10-20 minutes to appear to build on the apple store connect.
  10. So you are ready to “Submit for review”. Select it; if you forgot any field to be filled then you will get the notification that will appear on top beside the “submit for review” button. Fill in all the details, and submit the app.

You will get an email notification whenever the review has been changed by the Apple team.

If you have any queries about the above topic or have to get services and consultations and get flutter app development solutions. Feel free to contact us. AIRO GLOBAL SOFTWARE will be your strong digital partner. E-mail id: [email protected]

enter image description here

Author - Johnson Augustine
Chief Technical Director and Programmer
Founder: Airo Global Software Inc
LinkedIn Profile: www.linkedin.com/in/johnsontaugustine/

How To Install and Setup Flutter?

- Posted in Flutter by

enter image description here

What is Flutter?

Flutter is Google’s portable UI tool for crafting beautiful, natively combined applications for mobile, web, and desktop from a single base code. Flutter works with the existing original code, is used by developers around the world, and is a free and open-source tool.

Why do we use flutter?

  • The same User interface in All Platforms
  • Reduced base code Development Time
  • Increased Time-to-Market Speed
  • Similar to the Native App Performance
  • Custom, Animated UI of Any Complexity Available
  • Own Rendering Engine

This is the reason why you should prefer Flutter for Flutter app development and why you have to choose the best flutter development company for the best services.OK, next we are going through how to install flutter on windows.

What are the System requirements for installing Flutter?

To install and execute Flutter, your development environment must meet these requirements:

  • Operating Systems: Windows 7 SP1
  • Disk Space: 1.64 GB
  • Flutter depends on the below tools being available in your environment. ***** Windows PowerShell ***** Git for windows 2. x

How we Get the Flutter SDK

  1. Download the flutter installation bundle to get the Flutter SDK:
  2. Then you get the Zip file. Extract the zip file and place the contained flutter in the desired installation location for the Flutter SDK

If you don’t need to install a fixed version of the installation process, you can skip the above steps

How to Update your path?

If you want to execute Flutter commands in the regular Windows, take these steps to add Flutter to the path environment variable:

  • From the search bar, enter ‘env’ and select Edit environment variables for your profile.
  • Under the User variable feature check if there is an entry called Path: * If the entry is there, append the path to flutter\bin using; as a separator. * If there is no entry, create a user variable named Path with the path to flutter\bin as its value.

You have to close and restart the existing console windows for these changes to work.

How to run a flutter doctor?

From a console window that has the Flutter directory in the path, run the below command to see if there are platform dependencies you need to fulfill the setup:

content_copy
C:\src\flutter>flutter doctor

The above syntax checks your flutter environment and shows a list of the status of your installation. Check the output for other software you should need to install.

Android setup

How to install Android Studio:

  1. install Android studio
  2. Start the Studio, and go to the ‘Android Studio Setup Wizard’. Keep starting Android SDK Build-Tools, which are needed by Flutter when developing for Android.
  3. Execute flutter doctor to confirm that Flutter has located your installation of Android Studio. If Flutter cannot locate it, run flutter config --android-studio-dir to set the package that Android Studio is installed to.

How to Set up your Android device

To prepare to execute Flutter app on an Android device, you should need an Android device running Android 4.1.

  1. Enable options and USB debugging on the device.
  2. Use a cable to plug your phone into your computer
  3. In the console, run the flutter devices command to verify that Flutter recognizes your connected Android. By default, Flutter uses the version of the Android where your adb tool is based. If you need Flutter to use a different installation of Android SDK, you must set the ANDROID_SDK_ROOT environment variable to that directory.

How to Agree to Android Licenses?

Before you use Flutter, you must sign the licenses of the Android SDK platform. This option should be done after you installed the tools listed in this blog.

  1. Make sure that you have the latest version of Java 8 installed and that your JAVA_HOME environment variable is set to the JDK’s folder.
  2. Android Studio version 2.2 has come with a JDK, so this should already be done.
  3. Review the terms of each license stressfully before agreeing to them.
  4. Once you are done agreeing, run flutter doctor again to confirm that you are ready to use Flutter.

Additional Windows requirements

For Windows desktop development, you need the below in addition to the Flutter SDK:

  • Visual studio. For Win32 you need the “Desktop development with C++” workload installed, including all of its automatic components. For UWP you need the “Universal Windows Platform development” workload installed, with the optional UWP C++ tools.

If you have any questions about the above topic or have to get services and consultations about flutter app development and other digital solutions. Feel free to contact us. AIRO GLOBAL SOFTWARE will be your strong digital partner. E-mail id: [email protected]

enter image description here

Author - Johnson Augustine
Chief Technical Director and Programmer
Founder: Airo Global Software Inc
inkedIn Profile: www.linkedin.com/in/johnsontaugustine/

enter image description here

If you want an iOS app do you know the pain of distributing apps to your beta testers? Completing the UDIDs into the portal that mobile app testers can work and then trying them to get your app through the ad-hoc network was actually a bit of pain. But now that’s run to change for good in the new and latest version.

Do you know what all features make perfect shiny iPhones and iPods? Of course, the new software packs a punch of a variety of features that are beneficial both for users as well as developers. The testing app that is used called TestFlight will help the developers to make the IOS app smoother. Just to fulfil that wish of yours, we have decided to bring you a blog that will explain the features of TestFlight. In this blog, we will also guide you through the variety of feature functionality and explain how you can make the best use of the Testflight app.

What Is Known As Testflight?

Testflight is a clear simple app that will help you install the beta versions of apps that are used for testing. But now it is so much simpler than it was earlier with testing for iOS app development and app testers. Apple has been to go the simple way with beta testing for iOS.

How To Test Your Ios App In 3 Simple Steps?

  • First, you have to upload the app to the app store connect.
  • Secondly, you have to send an invite to those who are going to test the app
  • At last download test flight app and start testing

How To Release The App To The App Store?

With the test flight app, people are testing what will be the version of the app.you will need to go until the end of the submission process to download the .ipa file to be uploaded to App Store Connect. Use the transporter that is now replaced by the application loader to upload this file to your App Store Connect account, just as you would do if you were to put it on the App Store for users.

How do you send an invite to those who are going to test the app?

Once your .ipa file has been uploaded to the App Store, you can invite different users to test your app. In the industry there are two types of testers you can invite

  • The first one is internal tester: These people are your App Store Connect users. Unless these people are from your team or the people who have been given access to your App Store Connect account, there are some chances that you're ready to invite internal testers to test one of your projects which means your app. If you do, Be aware that you can invite-only 25 internal testers for each project.
  • The second one is external tester: You don’t need to have an App Store Connect account to be an external tester for the app. You can invite any people that you want to test your app, up to 10,000 external testers for each project.

When you invite external testers for testing your app, Apple will check your app and give the approval to allow external testing.

This is the reason why you'll have to provide some information to the Apple review team about your project that means your app they review about:

  • What's the purpose of the app that you made?
  • What do you want people to test your app?
  • who Apple contact during the verification process if needed?

Enter the email of the testers that are testing externally for the verification and add the build to the test. As soon as you have been approved for beta testing, you will receive an email from Apple to inform you. For testers to be ready to start testing your app, go back to App Store Connect and click the Send Invites button under Prerelease for your app.

How to Download Test Flight app and start testing?

The testers that you are invited to will receive an email with a link to test your app. To be ready to test, At first, they will need to download the TestFlight app. After accepting the invitation that you send, they will be going to the TestFlight app and they will be directed to install the app to be tested. The app will appear on the phone's springboard, and also in the TestFlight app. When started, a test session lasts up to 90 days. After that period it's no longer able to test the app unless you upload another build and you start a new round.

What are the advantages of test flight?

  • No need to make a record in App Store Connect to jump into the testing phase
  • Not needed any validation to have anyone testing your app
  • No need to have the UDID of the testers build a test version

What are the disadvantages of test flight?

  • You need to build a record in App Store Connect, but, at the end of the day, you will definitely build one anyway to publish your app.
  • Validation is needed to have external testers to test the app that you made.
  • No clue about how long it takes to review the app
  • Each testing is time-limited If you have any questions about the above topic or have to get mobile app testing services and consultations about and other digital solutions. Feel free to contact us. AIRO GLOBAL SOFTWARE will be your strong digital partner. E-mail id: [email protected]

enter image description here

Author - Johnson Augustine
Chief Technical Director and Programmer
Founder: Airo Global Software Inc
LinkedIn Profile: www.linkedin.com/in/johnsontaugustine/

enter image description here

CodeIgniter is a very famous and most relevant framework among PHP developers. It’s very fast and simple in comparison to another framework that is used in PHP also with less file size.

So till now CodeIgniter 3 was used to develop the projects in PHP and now CodeIgniter 4 has been officially released for use in the projects in PHP. Through this blog, we will understand the main differences between CodeIgniter 3 and CodeIgniter 4.

The main differences are:

  • The difference in downloads
  • The difference in the namespace
  • The difference in compatibility
  • The difference in application structure
  • The difference in controllers
  • The difference in Models
  • The difference in views
  • The difference in libraries

What Are The Differences In Downloads Of Codeigniter 3 And Codeigniter 4

Usually, CodeIgniter 4 can be downloaded by two methods. The first is to use the composer and the second is to use a ready-run zip file from the CodeIgniter official website. CodeIgniter 3 can be downloaded in only one way.

What Are The Difference Between Using Namespaces Of Codeigniter 3 And Codeigniter 4

Ok, Let’s discuss this Codeigniter 4 is built for PHP 7.2+ versions. So it says that it is built for the main latest version of PHP. and everything in this latest version of the framework is namespaced, except for the helpers.CodeIgniter 3 is not used namespace.

What Are The Difference Between The Compatibility Of Codeigniter 3 And Codeigniter 4

It is not compatible with CodeIgniter 3. so if you want to use CodeIgniter 4 then definitely you have to give some more effort to update the version that you using now. because in the CodeIgniter 4 it was very easy to update but in this update, they have added a lot of new variety of features that are the reason it’s not compatible with the CodeIgniter 3.

What Are The Difference Between The Application Structure Of Codeigniter 3 And Codeigniter 4

  • The folder of the application is renamed as an app and the framework is still in system folders, with the same interpretation as before.
  • The framework that provides for a public folder, it intended as the document root for your app
  • There will be a writable folder, to catch cache data, logs, and session data
  • Now there is no nested application because now in CI4 there is a different mechanism to extend the framework component.

What Are The Difference Between Controllers Of Codeigniter 3 And Codeigniter 4

  • In Codeigniter 4, You have to extend Controller instead of CI_Controller that used.
  • In this version, they do not use any constructor to use the magic. now it is the part of the base controller which you will make a great change.
  • The new thing is that Codeigniter 4 provides a Request and Response object to work. It’s more powerful than the Codeigniter 3 way.
  • If you want to use your controller as a Base Controller then make your controller anywhere you like and extend Controller and then use it anywhere you want.

What Are The Difference Between The Models Of Codeigniter 3 And Codeigniter 4

  • The model will not extend the CI model you have to extend the Model
  • In the Codeigniter 4 model, there are more functionalities than Codeigniter 3 including automatic database connection, basic CRUD, in-model validation and automatic pagination.
  • Instead of writing in Codeigniter 3 $this->load->model(x) now you have to write $this->x = new X():
  • Codeigniter 4 has Entity class also to use richer data mapping to database tables;

What Are The Difference Between Views Of Codeigniter 3 And Codeigniter 4

  • Instead of writing in Codeigniter 3 $this->load->view(x) you can use echo view(x);
  • Codeigniter 4 supports view cells to build your response in pieces

One of the main benefits of CodeIgniter framework development is that you can take a simple approach. Here you can easily use the PHP frameworks in order to build a software solution. The proponents of this system are quite simple to use. The interface is also pretty easy – this means that web development can be done in a seamless manner. Airo global software is one of the best web development company in Kerala that can give you quality products and give you the best support.

If you have any doubts about the above topic or have to get services and consultations about app development and other digital solutions. Feel free to contact us. AIRO GLOBAL SOFTWARE will be your strong digital partner. E-mail id: [email protected]

enter image description here

Author - Johnson Augustine
Chief Technical Director and Programmer
Founder: Airo Global Software Inc
LinkedIn Profile: www.linkedin.com/in/johnsontaugustine/