Announcing Our Newest Book — Real-World Android by Tutorials!
Take your Android skills to the next level and get solutions to the hard, real-world problems you face every day as an Android developer in our newest book, Real-World Android by Tutorials! By Chris Belanger.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Contents
Announcing Our Newest Book — Real-World Android by Tutorials!
20 mins
- What is Real-World Android by Tutorials?
- Who is this Book For?
- What’s Inside Real-World Android by Tutorials?
- Section I: Developing Real World Apps
- Section II: Modularizing Your App
- Section III: Enhancing Your UI
- Section IV: Securing Your App
- Section V: Maintaining Your App
- About the Authors
- Where to Go From Here?
Section II: Modularizing Your App
As you add new features to your app, the code becomes more complex and difficult to maintain. For this reason, it’s important to separate your app into different libraries to make your code both maintainable and reusable. This also improves the app’s build time, which is a very important metric for your CI.
In this section, you’ll learn how to split your app into different modules. In particular, you’ll learn how to use the dynamic feature option, which optimizes the size of the code your users have to download to use your app.
- Multi-Module Apps: Modularization is one of the most challenging problems you face with big apps. Splitting the app into different modules lets you reduce build time while creating code you can reuse in other apps. In this chapter, you’ll learn how to create a feature module for PetSave, focusing on the navigation.
- Dynamic Features Theory: This chapter covers the fundamental concepts of dynamic features. Dynamic features let you split the app into different modules to reduce the APK size and the download time and cost.
- Building a Dynamic Feature: Mobile apps, especially games and apps with lots of graphic assets, often have large APKs. Google’s dynamic feature option lets you keep your app sleek by splitting it into parts that users can load if and when they actually need them. In this chapter, you’ll learn how to use dynamic features to install PetSave more efficiently.
Section III: Enhancing Your UI
The user interface (UI) is one of the most important aspects of any real world app. How your user interacts with the features of your app is what decides if the app is successful or not.
When you build your app, you have three options for creating your UI. Most of the time you’ll use what the Android SDK provides. In other cases, you customize the existing components. Your third option is to create your own custom components.
In this section, you’ll learn how to enhance the user interface of your app. You’ll create and customize animation using the new Animation Editor, which comes with recent versions of Android Studio. You’ll also learn how to master themes and styles and to create a custom view.
After reading this section, you’ll have a more appealing app and happier users.
- Animations: Animations are vital to making your app both easy and pleasant to use. The Android platform provides several APIs to implement different types of animations. In this chapter, you’ll learn how to use both physics-based and Lottie animation.
- MotionLayout & Motion Editor: Implementing animation in the Android platform can be difficult and time-consuming. It’s very important to use the right tool. In recent releases of Android Studio, the Motion Editor lets you implement different types of animations in a simple and declarative way. In this chapter, you’ll learn how to use Motion Editor and how to integrate MotionLayout into your app.
- Custom Views: The Android platform provides different standard components you can use to create the UI for your app. Most of the time, they’re enough. Sometimes, as in the PetSave app, you need something custom. To create custom UI elements, you use the custom view, which you’ll learn all about in this chapter.
- Style & Theme: Android provides styles and themes to customize the look and feel of the UI components of any app. They allow you to completely change any aspect of the UI of your app in a declarative way by providing a simple XML file. In this chapter, you’ll see how to customize a UI that uses standard components and how to use styles and themes with a custom view.
Section IV: Securing Your App
Making your app more secure is an aspect of development that’s often ignored, but, at the same time, is absolutely vital. Imagine what would happen if somebody would hack your code, stealing important data or even the usernames and passwords of your users. That would be a disaster.
In this section, you’ll learn how to handle security from different points of view. You’ll learn how to protect user data and how to securely connect to a server. Finally, you’ll learn how to make hackers’ lives more difficult, by using different methods to protect your code and your data.
- User Privacy: In this chapter, you’ll learn best practices for securing an Android app. You’ll see how to deal with permissions and how to prevent the most common security risks.
- Securing Data at Rest: Accessing data from local storage has security implications, so Android provides different APIs and tools to avoid unwanted access to your data. Here, you’ll learn how to make your app more secure by encrypting and decrypting data and by using biometrics to implement the user login.
- Securing Data in Transit: In this chapter, you’ll learn to secure the network connections of your app by using HTTPS for network calls, trusting a connection with certificate pinning and verifying the integrity of transmitted data.
- App Hardening: Any mobile app can be vulnerable to different types of attacks from hackers. It’s common to read about hackers breaking apps and stealing important information. Because of this, avoiding code vulnerability and validating the input from the user are very important topics. In this chapter, you’ll learn how to use some of the most important techniques to make your app difficult to hack.
Section V: Maintaining Your App
When you’re developing your real world app, you might think that publishing is your end goal. But really, your work isn’t over just because you’ve released your app. You still need to understand if your app is working properly and what problems your users are experiencing.
In this section, you’ll learn everything you need to know about maintaining and controlling your app after it’s published and available to users. In particular, you’ll learn how to use Firebase for logging crashes, how to enable or disable certain features and how to use A/B tests to understand what solution is the best for your users.
Finally, you’ll see how to optimize your app’s size and how to use Android Studio as a profiling tool.
After reading this section, you’ll be ready to use all the available tools for improving your app’s quality.
- Firebase Integration: Firebase is a powerful tool to manage important aspects of your app. Here, you’ll see how to use Crashlytics to monitor crashes and errors. Then, you’ll see how to use Remote Config to control your app remotely. Finally, you’ll learn how to use Test Lab to test your app on a wide range of devices.
- Release Optimizations: When you build an app, it isn’t enough to implement its features and run tests. You also need to spend time improving your app’s quality through optimization. For example, reducing the APK’s size is important to support old devices and users with slow internet connections. In this chapter, you’ll learn how to optimize your app before release.
- Advanced Debugging: When you implement an app or try to fix a bug, you need some tools to check what’s happening. For example, you experience a crash and don’t know why, or you receive invalid information from the network and need to check the data. This chapter contains everything you need to know about debugging, from memory to network, from battery usage to the definition of the UI and much more.
- App Analysis: Sometimes, your app has problems and you don’t know why. To solve the problem, you need to do some deep investigation, not just into your code but also into code you imported from third-party libraries. In other cases, the problem isn’t the code, but a corrupted file or database. In this chapter, you’ll learn how to examine the bytecode of your app and the files it uses to find bugs and security problems.