renanoliveira / cordova-phone-call-trap Goto Github PK
View Code? Open in Web Editor NEWCordova PhoneCall Trap
License: MIT License
Cordova PhoneCall Trap
License: MIT License
Hi, I tried implementing this to IOS and the call onCall function is only called once, after that other events are not being pushed to the function.
I saw in that link that was added the identifier of the incoming call to this module:
Link: https://github.com/renanoliveira/cordova-phone-call-trap/pull/15/files
How to use it on the cord? Do you have a simple example of how to use it?
The plugin fails while use these plugin in cordova project with below version
Cordova- 6.3.1
android-5.1.1
I tested this plugin without PROCESS_OUTGOING_CALLS permission, it seems work right. Is there any reason for PROCESS_OUTGOING_CALLS?
I find that there are no cordova plugs can watch phone status for IOS.
Will this plugin support IOS?
How can i know for which sim is call if i have dual sim android device?
Is possible to detect the calling number in JavaScript?
Getting error while build as "duplicate case label
case TelephonyManager.CALL_STATE_RINGING:"
how to import it ??? :)
It would be useful if instead of the state as a string on the JS listener you'll receive an object with two properties: state
and incomingNumber
.
Is it possible to record call conversations in ionic by using this plugin?
I used the same example provided
declare var PhoneCallTrap : any;
I have used the above declaration but still I am unsuccessful. Please help
Error: Uncaught (in promise): ReferenceError: PhoneCallTrap is not defined
ReferenceError: PhoneCallTrap is not defined
at http://localhost:8100/build/main.js:262:13
at t.invoke (http://localhost:8100/build/polyfills.js:3:14976)
at Object.onInvoke (http://localhost:8100/build/vendor.js:4982:33)
at t.invoke (http://localhost:8100/build/polyfills.js:3:14916)
at r.run (http://localhost:8100/build/polyfills.js:3:10143)
at http://localhost:8100/build/polyfills.js:3:20242
at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15660)
at Object.onInvokeTask (http://localhost:8100/build/vendor.js:4973:33)
at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15581)
at r.runTask (http://localhost:8100/build/polyfills.js:3:10834)
at c (http://localhost:8100/build/polyfills.js:3:19752)
at http://localhost:8100/build/polyfills.js:3:20273
at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15660)
at Object.onInvokeTask (http://localhost:8100/build/vendor.js:4973:33)
at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15581)
at r.runTask (http://localhost:8100/build/polyfills.js:3:10834)
at o (http://localhost:8100/build/polyfills.js:3:7894)
at e.invokeTask [as invoke] (http://localhost:8100/build/polyfills.js:3:16823)
at p (http://localhost:8100/build/polyfills.js:2:27648)
at HTMLDocument.v (http://localhost:8100/build/polyfills.js:2:27893)
I am using ionic 3.9.2
Hello, your plugin works fine, congrats.
How can i detect the incoming call when the app is in background? Thanks
This is not working on ionic 6 using cordova android 11
Please help me out how i can resolve this issue in android application.
Many Thanx in advance.
Getting PhoneCallTrap undefined on the window scope.
Using cordova 6.2
Ionic 2
Angular 2, typescript.
thanks.
Hi I am using this Plugin in Ionic so in Angular 5.
Code Snippet -
registerPhoneCallListener() {
console.log('Registering phone call trap.');
PhoneCallTrap.onCall(function(state) {
console.log("CHANGE STATE: " + state);
alert('State Chnage Alert In Call Trap ' + state);
switch (state) {
case "RINGING":
console.log("Phone is ringing");
break;
case "OFFHOOK":
console.log("Phone is off-hook");
break;
case "IDLE":
console.log("Phone is idle");
break;
}
}, function() {
console.error('Error during registering phone call trap.');
alert('1. Alert In Call Trap');
});
PhoneCallTrap.errorCallback(
function() {
alert('Alert In Call Trap');
}
);
}
With this run, getting following console logs. Alert is what i was trying, but did not work.
Console -
console.log: Registering phone call trap.
[23:58:59] console.log: WARNING: PhoneCallTrap errorCallback not implemented
[23:59:00] console.error: Error during registering phone call trap.
Please help here.
Hi guys im new at ionic and i install this plugin, i already import the module of js on app.component.ts, like this ```
`import {PhoneCallTrap} from 'io.gvox.plugin.phonecalltrap/www/PhoneCallTrap';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage:any = HomePage;
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
platform.ready().then(() => {
PhoneCallTrap.onCall(function(result) {
console.log("CHANGE STATE: " + result.state);
console.log("CALLER ID: " + result.number); // only in ringing state
switch (result.state) {
case "RINGING":
console.log("Phone is ringing", result.number);
break;
case "OFFHOOK":
console.log("Phone is off-hook");
}
});
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.styleDefault();
splashScreen.hide();
});
}
};`
but when i do ionic serve, my console give me an error: Uncaught (in promise): TypeError: Cannot read property 'onCall' of undefined
TypeError: Cannot read property 'onCall' of undefined
Can you help me?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.