how to force to show iOS Green CallKit Bar - ios

Firstly, I must explain this, I know this green bar appears if your app has support for CallKit and user went to background state from app, And these all works perfectly from my VOIP app.
But I want to implement something like Whatsapp iOS App which user can go to back instant message screen from a voice call and even client is in the active state, a green bar appears.
I do not know how WhatsApp has implemented this feature. But I guess it can be custom view (green bar when the app is in an active state but not in call screen).
Do you guys have any idea how can I implement this feature? Or Do the CallKit has any methods or something else to force to show green bar if the call screen is not appearing but also app is not in background state??

Can't you just put your colored bar at the top? I am not sure if your app is using navigation controllers, but if not you should be able to align a UIView between superview.top and safearea.top, and set it's backgroundColor to anything you want.

Related

In-call status bar for app

I would like to know if there is a way to make your app show a status bar when the app is performing a specific function. Sort of like Shazam does when Auto Shazam is on, but this might be because the microphone and not something in Shazam's app code but I am wondering if there is a way to programmatically achieve this. Preferably in Swift but Obj-C also works.
This isn't done directly by the app, this is done by the OS when the app is using one of a few features in the background
The bar is red when an app is using the microphone in the background.
The bar is blue when an app is accessing location in the background.
The bar is also blue when a device is connected to the Personal Hotspot.
The bar is green when the telephone (including WhatsApp) is being used.
There may be more colours for other scenarios, but these are the ones I've come across.
I don't know of a way to add this bar on demand.

iOS Multitask App Switcher Custom Image

im developing an iOS App and i would like it to behave like PayPal when the user double taps the home button.
For those who dont know the PayPal app displays a custom image when the app is displayed on the multitask switcher but it doesnt when a notification arrives or when the user pulls the notifications bar.
My issue comes when implementing this, im using the event applicationWillResignActive to display my custom image (as applicationEnteredBackground is not called for this). But this method is called on events on which i dont want the app to display the image (such as notifications, calls, pulling the top bar, etc).
Is there any way of setting this image only when the home button is double tapped?
Thank you!
From what I see, PayPal doesn't cover the viewport with a custom image immediately – when I double tap the Home button, it remains rendered normally until I do something else – but most probably on applicationDidEnterBackground:. After switching to Home screen or another application, the PayPal preview becomes covered.
On the other hand, my mobile banking application does that immediately when applicationWillResignActive: is triggered.
These are AFAIK the only two approaches you can achieve.

Is there a way to show the red status bar without recording?

What I want is that when my app just enter background, showing a notification view with custom text and keeping stay for few seconds. It can be look like banner notification or the red status bar with recording/calling. Is that possible? Any idea? Thanks.
here is the UI effect what I want

VOIP App window (in foreground) blocked from receiving user input during Active Cellular Call

During an active VOIP call, my app is put into the background when an incoming cellular call is received and answered. If, while on the cellular call, I bring my app back to the foreground the app view appears but is unresponsive. The "Touch to return to call" banner appears at the top of the view in green but the app view appears as if there is a darker transparent window overlaid on top of it preventing the view from receiving input. If I put my app into the background, bring another app to the foreground and then bring my app back to the foreground everything works as expected so the problem seems to be specific to active cell calls and/or the green banner only? In Settings->Notifications->Phone I tried turning Notification Center OFF and Alert Style NONE in the hopes of removing the banner to see if the problem still exists but these settings do not effect that banner. In addtion to the App window appearing to have a transparent window overlaid on it, if I touch the window I'm able to drag the entire app window (or view) in all directions (up down side to side) and it has a bounce effect (like tableview vertical scroll) when I release it.
If I dont know the problem I cannot fix it (:
Thanks..
Are you sure there's no view being added on top your view which might be intercepting all your events? My second guess would've been that your app received a memory warning and unloaded a bunch of views. However, that's not very likely since you still see all the views.
I don't know what you really mean to "bring your app back to the foreground",but I can tell you for sure that you cannot call in the same thread the UI and the incoming call, so for situations like this when you want to render some view during a call you can try something like this:
public void InvokeGUIThread(Action action)
{
Dispatcher.Invoke(action);
}
For example if you want to set a text in a textblock do something like this:
InvokeGUIThread(() =>
{
textBlockSome.Text = e.Item.ToString();
});

how to get a handle on the status bar in iOS

I have an audio recording application. And when it is recording in the background, I see a red horizontal bar on the top with my project name on it. I want to get a handle on that bar so that I can display additional things there. How do I get a handle on it and what exactly is that bar called?
If your app is not running in the foreground you don't have access to the screen, so you can't get a handle to the status bar. And even if you could, you wouldn't be able to change it.

Resources