Giter VIP home page Giter VIP logo

Comments (13)

wesleytoshio avatar wesleytoshio commented on July 25, 2024 4

class IncomingCallActivity

help me to create class IncomingCallActivity? any exemplo?

from flutter_callkeep.

LinusU avatar LinusU commented on July 25, 2024 2

displayCustomIncomingCall is for usage without having the "Telephone Account" and the connection services. It simply creates a notification with a full screen intent.

In order to use it you need to create a secondary Activity in your app, using native code. Some quick steps that might not be complete:

  • Add the full screen intent permission
    <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />

  • Add the activity to the Android Manifest:

          <activity
               android:name=".IncomingCallActivity"
               android:exported="true"
               android:showOnLockScreen="true" />
    
  • Build the activity that will be showed when displaying the call. I used Android Studio for this.

    public class IncomingCallActivity extends Activity ...
    
  • Trigger showing the screen, this can be done from a background isolate (e.g. Firebase handleBackgroundMessage as well!)

       await CallKeep.displayCustomIncomingCall(
         'com.yourcompany.yourapp', // Change this
         'IncomingCallActivity',
         icon: 'notification_icon', // Make sure you have this icon in your assets
         extra: <String, dynamic>{
           // Here you can pass any key value pairs that you can read using `getIntent().getStringExtra("key")` in the native activity
         },
       )
    

from flutter_callkeep.

gopalkrishan123 avatar gopalkrishan123 commented on July 25, 2024 1

@LinusU Thank you.

from flutter_callkeep.

LinusU avatar LinusU commented on July 25, 2024 1

@VictorUvarov android/app/src/main/res/drawable/notification_icon.png

from flutter_callkeep.

ghenry avatar ghenry commented on July 25, 2024 1

from flutter_callkeep.

VictorUvarov avatar VictorUvarov commented on July 25, 2024

@LinusU Where exactly does the icon have to be located?

from flutter_callkeep.

MaheshPeri19 avatar MaheshPeri19 commented on July 25, 2024

Hi,

I am from completely iOS background. I am not aware of android.

Can anyone give complete IncomingCallActivity with accept and reject callbacks.

I am using displayCustomIncoming call method instead of displayincomingCall() because i dont want to use "Telephone Account" and the connection services. Incoming call notification is coming, but i need accept or reject call backs when clicks on any of the buttons.

Please any one help me with complete IncomingCallActivity with accept and reject callbacks/actions.

from flutter_callkeep.

MaheshPeri19 avatar MaheshPeri19 commented on July 25, 2024

Thank you for your quick reply.

Yes. I have already used this project https://github.com/flutter-webrtc/callkeep and it is working fine for me. But the problem is " i dont want to use "Telephone Account" and the connection services". Thats why i am checking with displayCustomIncomingCall() with accept reject button action call backs.

from flutter_callkeep.

ghenry avatar ghenry commented on July 25, 2024

from flutter_callkeep.

MaheshPeri19 avatar MaheshPeri19 commented on July 25, 2024

Actually it is not clear to me.

Screenshot_20201121-201752

I am working on video calling webrtc app. So when end user gets incoming call and clicks on answer button, i can open video camera screen and initiates the video call. If reject button, dismissing alert.

So, in my case nothing doing with android native phone accounts and call logs. And also unwantedly need to ask phone account and call logs permissions etc.

from flutter_callkeep.

ghenry avatar ghenry commented on July 25, 2024

from flutter_callkeep.

MaheshPeri19 avatar MaheshPeri19 commented on July 25, 2024

Okay. Got your point. I will check whatsapp and skype call with gsm call. Then i can move forward into this issue.

Thank you.

from flutter_callkeep.

ghenry avatar ghenry commented on July 25, 2024

from flutter_callkeep.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.