Earlier than You Start
This part tells you a number of issues it’s essential to know earlier than you get began, resembling what {hardware} and software program you’ll want, the place to seek out the challenge recordsdata for this ebook and extra.
Part I: Growing Actual World Apps
On this part, you’ll learn to design and implement PetSave for example of an expert, actual world app. You’ll learn to select the suitable architectural sample and methods to construction the code to make the app testable and maintainable.
To make your app simpler to vary, it’s an excellent observe to outline totally different layers with particular duties. Specifically, you’ll learn to design and implement the area layer for the PerSave app. You’ll additionally see methods to entry the community effectively, by implementing the repository sample within the information layer.
On the finish of this part, you’ll have a transparent concept about methods to construction the code of your app.
The Android platform is greater than 10 years previous and the variety of frameworks, libraries and instruments you should utilize to develop your app are numerous. This ebook covers the applied sciences and practices it’s essential to observe in the actual world if you wish to create a profitable Android app.
1
Constructing Android apps is not only a matter of writing code. You additionally want to make use of the most effective structure and construction your recordsdata in a means that makes it simple to use modifications. Retaining excessive cohesion and low coupling is simply one of many major ideas you will study on this chapter, the place you will begin engaged on the PetSave app.
2
The area layer is a group of entity objects and associated enterprise logic, designed to characterize the enterprise mannequin of any app. Right here, you will study what a website layer is and methods to create an excellent one. You will see the variations between entity and worth objects together with some great benefits of utilizing the repository abstraction. Lastly, you will check the area logic of your app.
3
Each helpful app permits customers to entry data that is both saved domestically or fetched from the community. That is what a knowledge layer helps you do. On this chapter, you will study what the info layer is and what selections you’ve if you want one. You will be launched to the repository sample and learn to implement it from the design to the testing section.
4
Most apps entry information from the community, which introduces totally different sorts of issues, like latency and connectivity prices. To enhance efficiency and cut back prices, it is a good observe to retailer information domestically. Due to this fact, it’s essential to implement the repository sample as a cache or easy native retailer. On this chapter, you will learn to implement and check the repository sample within the PetSave app utilizing Room and Hilt.
5
PetSave permits customers to seek out animals near them primarily based on sure standards. There are a number of architectural design patterns you should utilize to create this characteristic. Right here, you will use MVVM and Unidirectional Information Move to implement the “Animals Close to You” characteristic. You will even have the chance to learn to use basic libraries like StateFlow, ViewModel and ViewBinding.
6
PetSave’s major characteristic is to allow you to seek for pets primarily based on sure standards. On this chapter, you will use a top-down method to implement the search, from defining the UI to fetching the info.
7
Part II: Modularizing Your App
As you add new options to your app, the code turns into extra complicated and troublesome to keep up. Because of this, it’s essential to separate your app into totally different libraries to make your code each maintainable and reusable. This additionally improves the app’s construct time, which is a vital metric to your CI.
On this part, you’ll learn to cut up your app into totally different modules. Specifically, you’ll learn to use the dynamic characteristic choice, which optimizes the dimensions of the code your customers need to obtain to make use of your app.
Modularization is likely one of the most difficult issues you face with large apps. Splitting the app into totally different modules enables you to cut back construct time whereas creating code you’ll be able to reuse in different apps. On this chapter, you will learn to create a characteristic module for PetSave, specializing in the navigation.
8
This chapter covers the elemental ideas of dynamic options. Dynamic options allow you to cut up the app into totally different modules to scale back the APK measurement and the obtain time and value.
9
Cellular apps, particularly video games and apps with plenty of graphic property, typically have giant APKs. Google’s dynamic characteristic choice enables you to maintain your app smooth by splitting it into components that customers can load if and after they really need them. On this chapter, you will learn to use dynamic options to put in PetSave extra effectively.
10
Part III: Enhancing Your UI
The consumer interface (UI) is likely one of the most essential elements of any actual world app. How your consumer interacts with the options of your app is what decides if the app is profitable or not.
If you construct your app, you’ve three choices for creating your UI. More often than not you’ll use what the Android SDK supplies. In different circumstances, you customise the present elements. Your third choice is to create your personal customized elements.
On this part, you’ll learn to improve the consumer interface of your app. You’ll create and customise animation utilizing the brand new Animation Editor, which comes with latest variations of Android Studio. You’ll additionally learn to grasp themes and types and to create a customized view.
After studying this part, you’ll have a extra interesting app and happier customers.
Animations are very important to creating your app each simple and nice to make use of. The Android platform supplies a number of APIs to implement several types of animations. On this chapter, you will learn to use each physics-based and Lottie animation.
11
Implementing animation within the Android platform could be troublesome and time-consuming. It is crucial to make use of the suitable software. In latest releases of Android Studio, the Movement Editor enables you to implement several types of animations in a easy and declarative means. On this chapter, you will learn to use Movement Editor and methods to combine MotionLayout into your app.
12
The Android platform supplies totally different commonplace elements you should utilize to create the UI to your app. More often than not, they’re sufficient. Generally, as within the PetSave app, you want one thing customized. To create customized UI components, you employ the customized view, which you will study all about on this chapter.
13
Android supplies types and themes to customise the appear and feel of the UI elements of any app. They assist you to utterly change any facet of the UI of your app in a declarative means by offering a easy XML file. On this chapter, you will see methods to customise a UI that makes use of commonplace elements and methods to use types and themes with a customized view.
14
Part IV: Securing Your App
Making your app safer is a side of growth that’s typically ignored, however, on the identical time, is totally very important. Think about what would occur if someone would hack your code, stealing essential information and even the usernames and passwords of your customers. That will be a catastrophe.
On this chapter, you’ll learn to deal with safety from totally different factors of view. You’ll learn to defend consumer information and methods to securely hook up with a server. Lastly, you’ll learn to make hackers’ lives tougher, by utilizing totally different strategies to guard your code and your information.
On this chapter, you will study greatest practices for securing an Android app. You will see methods to take care of permissions and methods to stop the commonest safety dangers.
15
Accessing information from native storage has safety implications, so Android supplies totally different APIs and instruments to keep away from undesirable entry to your information. Right here, you will learn to make your app safer by encrypting and decrypting information and by utilizing biometrics to implement the consumer login.
16
On this chapter, you’ll study to safe the community connections of your app by utilizing HTTPS for community calls, trusting a reference to certificates pinning and verifying the integrity of transmitted information.
17
Any cell app could be susceptible to several types of assaults from hackers. It’s normal to examine hackers breaking apps and stealing essential data. Due to this, avoiding code vulnerability and validating the enter from the consumer are crucial subjects. On this chapter, you will learn to use a number of the most essential strategies to make your app troublesome to hack.
18
Part V: Sustaining Your App
If you’re growing your actual world app, you may assume that publishing is your finish aim. However actually, your work isn’t over simply since you’ve launched your app. You continue to want to grasp in case your app is working correctly and what issues your customers are experiencing.
On this part, you’ll study all the things it’s essential to learn about sustaining and controlling your app after it’s printed and obtainable to customers. Specifically, you’ll learn to use Firebase for logging crashes, methods to allow or disable sure options and methods to use A/B exams to grasp what resolution is the most effective to your customers.
Lastly, you’ll see methods to optimize your app’s measurement and methods to use Android Studio as a profiling software.
After studying this part, you’ll be prepared to make use of all of the obtainable instruments for bettering your app’s high quality.
Firebase is a robust software to handle essential elements of your app. Right here, you will see methods to use Crashlytics to watch crashes and errors. Then, you will see methods to use Distant Config to regulate your app remotely. Lastly, you will learn to use Check Lab to check your app on a variety of units.
19
If you construct an app, it is not sufficient to implement its options and run exams. You additionally have to spend time bettering your app’s high quality by means of optimization. For instance, lowering the APK’s measurement is essential to assist previous units and customers with gradual web connections. On this chapter, you will learn to optimize your app earlier than launch.
20
If you implement an app or attempt to repair a bug, you want some instruments to test what’s taking place. For instance, you expertise a crash and do not know why, otherwise you obtain invalid data from the community and have to test the info. This chapter comprises all the things it’s essential to learn about debugging, from reminiscence to community, from battery utilization to the definition of the UI and way more.
21
Generally, your app has issues and you do not know why. To unravel the issue, it’s essential to do some deep investigation, not simply into your code but in addition into code you imported from third-party libraries. In different circumstances, the issue is not the code, however a corrupted file or database. On this chapter, you will learn to study the bytecode of your app and the recordsdata it makes use of to seek out bugs and safety issues.
22