What Every Android App With Calls Should Have
Tags: android, tutorial, beginners, codenewbie
Published: 2022-04-05 09:50:23

In today’s world, mobile communication is everything. We are surrounded by apps for audio and video calls, meetings, and broadcasts. With the pandemic, it’s not just business meetings that have moved from meeting rooms to calling apps. Calls to family, concerts, and even consultations with doctors are all now available on apps.

In this article we’ll cover the features every communication app should have, whether it’s a small program for calls or a platform for business meetings and webinars, and in the following articles, we’ll show you some examples of how to implement them.

## Incoming call notification

Apps can send notifications to notify you of something important. There’s nothing more important for a communication app than an incoming call or a scheduled conference that the user forgot about.

So any app with call functionality has to use this mechanism to notify. Of course, we can show the name and the photo of the caller. Also, for the user’s convenience, we can add buttons to answer or reject the call without unnecessary clicks and opening the app.

![incoming call android](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/20yij4yhtag1qbi198be.png)

You can go even further and change the notification design provided by the system.

![call notification banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zwi9lk4vqkf3b4wi48y9.png)

However, options for Android devices don’t end here. Show a full-screen notification with your design even if the screen is locked! Read the guide on how to make your Android call notification [here](https://forasoft.com/blog/article/how-to-make-a-custom-android-call-notification-455).

![fullscreen call notification](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gizn6o96ewnev9lwep27.gif)

## A notification that does not allow to close the process

The call may take a long time, so the user decides to do something at the same time. He will open another application, for example, a text document. At this moment an unpleasant surprise awaits us: if the system does not have enough resources to display this application, it may simply close ours without a warning! Therefore, the call will be terminated, leaving the user very confused.

Fortunately, there is a way to avoid this by using the [Foreground Service](https://forasoft.com/blog/article/foreground-service-and-deep-links-on-android-601) mechanism. We mark our application as being actively used by the user even if it is minimized. After that, the application might get closed only in the most extreme case, if the system runs out of resources even for the most crucial processes.

The system, for security reasons, requires a persistent small notification, letting the user know that the application is performing work in the background.

It is essentially a normal notification, albeit with one difference: it can’t be swiped away. You don’t need to worry about accidentally wiping it away, so the application is once again defenseless against the all-optimizing system.

You can do with a very small notification:

![small call notification](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vuf02yknfab7bfurv9w5.png)

It appears quietly in the notification panel, without showing immediately to the user, like an incoming call notification. 

Nevertheless, it is still a notification, and all the techniques described in the previous paragraph apply to it – you can add buttons and customize the design.

## Picture-in-picture for video calls

Now the user can participate in a call or conference call and mind his own business without being afraid that the call will end abruptly. However, we can go even further in supporting multitasking! 

If your app has a video call feature, you can show a small video call window (picture-in-picture) for the user’s convenience, even if they go to other app screens. And, starting from Android 8.0, we can show such a window not only in our application but also on top of other applications!

![Picture-in-picture for video calls](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9whept1zewcco8n5hxmy.gif)

You can also add controls to this window, such as camera switching or pause buttons. Read our [guide on PiP](https://forasoft.com/blog/article/picture-in-picture-on-android-tutorial-527) here.

## Ability to switch audio output devices

An integral part of any application with calls, video conferences, or broadcasts is audio playback. But how do we know from which audio output device the user wants to hear the sound? We can, of course, try to guess for him, but it’s always better to guess and provide a choice. For example, with this feature, the user won’t have to turn off the Bluetooth headphones to turn on the speakerphone.

So if you give the user the ability to switch the audio output device at any point in the call, they will be grateful.

The implementation often depends on the specific application, but there is a method that works in almost all cases. We've described it [here](https://forasoft.com/blog/article/implement-audio-output-switching-on-android-575).

## A deep link to quickly join a conference or a call

For both app distribution and UX, the ability to share a broadcast or invite someone to a call or conference is useful. But it may happen that the person invited is not yet a user of your app.

Well, that won’t be for long. You can generate a special link that will take those who already have the app directly to the call to which they were invited and those who don’t have the app installed to their platform’s app store. iPhone owners will go to the App Store, and Android users will go to Google Play. 

In addition, with this link, once the application is installed, it will launch immediately, and the new user will immediately get into the call to which he was invited! Create your own [deep links using our code examples](https://forasoft.com/blog/article/foreground-service-and-deep-links-on-android-601).

## Bottom line

We covered the main features of the system that allows us to improve the user experience when using our audio/video apps, from protecting our app from being shut down by the system right during a call, to UX conveniences like picture-in-picture mode.

Of course, every app is unique, with its own tasks and nuances, so these tips are no clear-cut rules. Nevertheless, if something from this list seems appropriate for a particular application, it’s worth implementing.