I have implemented Audio and video call using Agora for Android and iOS. What I need now a way to show notification with Accept and Reject buttons for calls.
I have been searching around and found callkeep, flutter-callkeep and flutter_voip_kit but they are using built-in phone app. I want to do it like whatsapp or skype. Can anyone help me out and guide me in right direction. Thanks
I did try something like this recently, will share my insights.
Some points about WhatsApp call in the latest android versions:
Only when the phone is locked you will get a full-screen call notification
For other cases you will get a notification with accept or reject buttons
So the main thing you would need is a message transfer method, for which you could use firebase_messaging package.
For notifying the user you could use awesome_notifications package
Related
I have a Xamarin.Forms application that has a video chat feature. Currently, a video call is made by sending push notifications using Firebase, and is answered by touching the push notification. This is not a good solution, as a push notification may come too late, and it may be easily missed. I would like to use a native android telephony feature, that would let the user make a real phone ringing etc. I know it could be done using Telecom, as shown here:
https://developer.android.com/guide/topics/connectivity/telecom/selfManaged#incoming-calls
But I cannot figure out how practically I can integrate the telecom api with my application. E.g. should I keep push notification, and somehow make the incoming push notification get converted into a real phone call?
The article mentions for example,
onCreateIncomingConnection(PhoneAccountHandle, ConnectionRequest)
The telecom subsystem calls this method when your app calls the addNewIncomingCall(PhoneAccountHandle, Bundle) method to inform the system of a new incoming call in your app.
I don't see where this addNewIncomingCall() method is defined, or to what class it belongs.
Is there any example and/or explanation somewhere that would help me implement this?
I have never developed something in Android before, but now my company has put me on a project which includes android.
My question is this: Is it possible to write an application that runs in the background and waits for triggers (if that is the correct word for it). For instance lets say I want my application to do something as soon as you open your emails or as soon as you get an email. Is there some API that I can use to interact with other applications such as Mail. The application does not have to have any GUI, it will literally just push some information notifications on the mail just received or opened.
I don't require a to technical answer, but rather just yes or no, and indeed yes, where can I get more info on it. Also if it is not possible, is there some workaround to achieve this. I have googled it, but most of the links are how to send an email from your application.
Thanks
EDIT: So it can even be triggered when a notification is received. Then I just want to look at the notification and determine if it is an email?
You could register BroadCastReceiver for the actions that you need to be caught
The android home page displays notifications from different applications.
I would like to read those notifications using my program.
I tried to find information on that in forums and in android help but I was not able to find any information.
My actual goal is to read the notifications and if the notification is about an email from a certain person then I want to perform something in my application.(I use touch down for my email)
Any help is appreciated.
Not possible due to security reasons.
If you want to respond to events then you should try listening to them directly with intents.
You need to create an AccessibilityService and set it to listen to TYPE_NOTIFICATION_STATE_CHANGED events. This way, each time any of the application packages specified while configuring the AccessibilityService generates a new notification, the onAccessibilityEvent callback of your service will be called with all the information about the notification.
I need to know when a notification is created because I want to change the audio mode. Is possible?
Thank you very much.
With the release of Android 4.3 it is possible to get Notifications within a third-party app.
See NotificationListenerService for reference
You can use Notification class, However an answer on SO, suggests that
There is currently no generic way to intercept Notifications sent from other applications.
However if you want to listen something like SMS notifications than this link can be useful for you..
Is there any possible way to control a Dialog in Android from remote server? Let say I have an application and there I created an If Statement. For example: When the number 2 is not equal the number in my remote server, the Dialog should pop out in my application. Is there any simple way to accomplish this? Please guide me, thanks in advance!
Good Question.
First of all to implement push server mechanism before android 2.2 you need to implement a novel workaround. The idea is to invoke a intent. One way to do is to register a broadcast receiver for an event (eg: receiving sms message) , check for the format of the message and invoke the corresponding Intent. ( which will invoke the dialog or you might use Notification).
But if you are using android 2.2 and above, you are lucky. Google introduced Cloud To Device Messaging Framework. Check this link.