Giter Club home page Giter Club logo

Comments (11)

Ranjithsp6 avatar Ranjithsp6 commented on June 9, 2024 1

If onDidReceiveIncomingPush is not called when the app is not running then how to get the payload data in this case. Can you let me know guys the possibilities to get the payload

from flutter_ios_voip_kit.

PeppeTapick avatar PeppeTapick commented on June 9, 2024 1

If onDidReceiveIncomingPush is not called when the app is not running then how to get the payload data in this case. Can you let me know guys the possibilities to get the payload

I have the same problem.
Is there any chance to get the payload from app terminated?

from flutter_ios_voip_kit.

PeppeTapick avatar PeppeTapick commented on June 9, 2024 1

from flutter_ios_voip_kit.

masashi-sutou avatar masashi-sutou commented on June 9, 2024

@saurav0171 Thank you for reporting.

onDidReceiveIncomingPush is not called when the app is not running, because app is not yet running when didReceiveIncomingPushWith is called. This wasn't well explained, so I'll add a comment in the next version.

On the other hand, onDidAcceptIncomingCall can be called even if the app is not running.
This is because the app is already running when the incoming call screen is displayed for CallKit.

Please make sure the app is calling FlutterIOSVoIPKit.instance.onDidAcceptIncomingCall in the Dart class(e.g.: main.dart) that is called immediately after the app is launched with VoIP notifications.

from flutter_ios_voip_kit.

saurav0171 avatar saurav0171 commented on June 9, 2024

from flutter_ios_voip_kit.

saurav0171 avatar saurav0171 commented on June 9, 2024

Moreover, when app is opened via Voip Notification, it runs from very beginning and FlutterIOSVoIPKit.instance.onDidAcceptIncomingCall didn't call.

from flutter_ios_voip_kit.

saurav0171 avatar saurav0171 commented on June 9, 2024

Can you please let me know the method which is triggered in dart file when the app first opens via Voip Notifications?

from flutter_ios_voip_kit.

masashi-sutou avatar masashi-sutou commented on June 9, 2024

Steps to reproduce:
1: Voip Notification hits when app is in terminated state.
2: Call picked and it went into app from the beginning and didnt go into

Is the incoming call screen of CallKit displayed at 2?
If you see the incoming call screen of CallKit, is your app running after tapped Accept button(swipe when iPhone is locked)?

Can you please let me know the method which is triggered in dart file when the app first opens via VoIP Notifications?

There is no such method. This is because when the VoIP notification arrives, the app isn't running yet, so I can't call the Dart code (If it is possible to call, it will be helpful to give a PR). If your app launches after you accept(swipe or accept button) on the incoming screen I think it will be triggered callbacks in main.dart.

import 'package:flutter/material.dart';
import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart';

void main() {
  runApp(MaterialApp(
    home: Home(),
  ));
}

class Home extends StatefulWidget {
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  final voIPKit = FlutterIOSVoIPKit.instance;

  @override
  void initState() {
    super.initState();
    voIPKit.onDidAcceptIncomingCall = (String channelId, String callerId) {
      // Use local storage(e.g.: shared_preferences) to save the logs and check if it has been invoked.
    };

    voIPKit.onDidRejectIncomingCall = (String channelId, String callerId) {
      // Use local storage(e.g.: shared_preferences) to save the logs and check if it has been invoked.
    };
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('example'),
      ),
      body: Container(),
    );
  }
}

from flutter_ios_voip_kit.

saurav0171 avatar saurav0171 commented on June 9, 2024

Thanks buddy. You are a true genius.

from flutter_ios_voip_kit.

saurav0171 avatar saurav0171 commented on June 9, 2024

from flutter_ios_voip_kit.

rekonvald avatar rekonvald commented on June 9, 2024

Hi @PeppeTapick, have you found solution? have the same problem(

from flutter_ios_voip_kit.

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.