Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Thriving in Android Development Using Kotlin
  • Table Of Contents Toc
  • Feedback & Rating feedback
Thriving in Android Development Using Kotlin

Thriving in Android Development Using Kotlin

By : Gema Socorro Rodríguez
4.5 (6)
close
close
Thriving in Android Development Using Kotlin

Thriving in Android Development Using Kotlin

4.5 (6)
By: Gema Socorro Rodríguez

Overview of this book

With resources on Android and Kotlin abound, it’s difficult to find content that focuses on resolving common challenges faced by app developers. This book by Gema Socorro Rodríguez – a Google Developer Expert for Android with over 15 years of experience and a proven track record as an effective instructor – is designed to bridge the gap between theory and real-world application. It equips you with the skills to tackle everyday problems in Android development through hands-on projects. Under Gema's expert guidance, you’ll build three sophisticated Android projects. You'll start your development journey by building a WhatsApp-like application, learning how to process asynchronous messages reactively, render them using Jetpack Compose, and advance to creating and uploading a backup of these messages. Next, you’ll channel your creativity into Packtagram, an Instagram-inspired app that offers advanced photo-editing capabilities using the latest CameraX libraries. Your final project will be a Netflix-style app, integrating video playback functionality with ExoPlayer for both foreground and background operations, and implementing device casting features. By the end of this book, you'll have crafted three fully functional, multi-platform projects and gained the confidence to solve the most common challenges in Android development.
Table of Contents (15 chapters)
close
close
Free Chapter
1
Part 1:Creating WhatsPackt, a Messaging App
5
Part 2:Creating Packtagram, a Photo Media App
9
Part 3:Creating Packtflix, a Video Media App

Integrating CameraX into our Packtagram app

Now that we know more about CameraX, let’s start integrating it into our app. First, we will need to deal with the camera permissions, providing a way for the user to accept them. Then, we will set up our camera preview and add the camera capture functionality to our code.

Setting up the permissions checker with Accompanist

There are several ways to check if the camera permissions have been granted, and if not, to request them: we could do this manually or use a library. In this case, we will use the Accompanist library, as we introduced at the beginning of this chapter.

Before requesting any permission at runtime, it’s fundamental to declare the same permissions in the app’s AndroidManifest.xml file. This declaration informs the Android operating system of the app’s intentions. For the camera permission, you need to add the following line within the <manifest> tag:

<uses-permission android...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY