{"id":15305158,"url":"https://github.com/eddyverbruggen/nativescript-call","last_synced_at":"2025-04-14T23:13:30.708Z","repository":{"id":57308483,"uuid":"166574307","full_name":"EddyVerbruggen/nativescript-call","owner":"EddyVerbruggen","description":"NativeScript plugin to interact with the native Call UI","archived":false,"fork":false,"pushed_at":"2019-05-16T09:49:42.000Z","size":2065,"stargazers_count":8,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T23:13:08.811Z","etag":null,"topics":["call","nativescript","nativescript-plugin","phonecall","webrtc"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EddyVerbruggen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-19T17:31:31.000Z","updated_at":"2024-05-30T16:20:12.000Z","dependencies_parsed_at":"2022-09-10T03:42:42.493Z","dependency_job_id":null,"html_url":"https://github.com/EddyVerbruggen/nativescript-call","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EddyVerbruggen%2Fnativescript-call","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EddyVerbruggen%2Fnativescript-call/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EddyVerbruggen%2Fnativescript-call/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EddyVerbruggen%2Fnativescript-call/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EddyVerbruggen","download_url":"https://codeload.github.com/EddyVerbruggen/nativescript-call/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975328,"owners_count":21192210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["call","nativescript","nativescript-plugin","phonecall","webrtc"],"created_at":"2024-10-01T07:59:24.942Z","updated_at":"2025-04-14T23:13:30.691Z","avatar_url":"https://github.com/EddyVerbruggen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NativeScript Call plugin\n\n[![Build Status][build-status]][build-url]\n[![NPM version][npm-image]][npm-url]\n[![Downloads][downloads-image]][npm-url]\n[![Twitter Follow][twitter-image]][twitter-url]\n\n[build-status]:https://travis-ci.org/EddyVerbruggen/nativescript-call.svg?branch=master\n[build-url]:https://travis-ci.org/EddyVerbruggen/nativescript-call\n[npm-image]:http://img.shields.io/npm/v/nativescript-call.svg\n[npm-url]:https://npmjs.org/package/nativescript-call\n[downloads-image]:http://img.shields.io/npm/dm/nativescript-call.svg\n[twitter-image]:https://img.shields.io/twitter/follow/eddyverbruggen.svg?style=social\u0026label=Follow%20me\n[twitter-url]:https://twitter.com/eddyverbruggen\n\n## Dude, I already have a Phone app on my phone..\nSure 😅\n\nBut what if your app supports VOIP / WebRTC calls? You'll want to have the operating system pop up the\nnative call dialog, right? That's where this plugin comes in.\n\nCurrently iOS only, where we leverage `CallKit`, which is part of the iOS SDK since iOS 10.\n\n## Installation\n```bash\ntns plugin add nativescript-call\n```\n\n## Demo\nCheck the source in the [demo](/demo) folder, or run it on your own device:\n\n```bash\ngit clone https://github.com/EddyVerbruggen/nativescript-call\ncd nativescript-call/src\nnpm i\nnpm run demo.ios\n```\n\n\u003e Usage in NativeScript-Angular and NativeScript-Vue is nothing different from what you'd do in NativeScript-Core.\n\n## API\n\n### `receiveCall`\nThe properties you can pass to this method are:\n\n| Property | Type | Description |\n| --- | --- | --- |\n| appName | `string` | The app's name, as shown on the caller screen. Default the name of your app. |\n| icon | `string` | The name of an icon to show for your app. Loaded from the App_Resources folder (see the demo). |\n| handleType | [`TNSCallHandleType`](https://github.com/EddyVerbruggen/nativescript-call/blob/7fec47292ba3e1452bb001993d5ba88f0ad9dd1d/src/call.common.ts#L3) | Either `\"PHONE\"` (default) or `\"EMAIL\"`. |\n| handleId | `string` | Either a phone number when `handleType` is `\"PHONE\"`, or an email address when `handleType` is `\"EMAIL\"`. |\n| callerName | `string` | The name to be displayed on the call UI. |\n| hasVideo | `boolean` | Whether or not this call supports video. Default `false`. |\n| supportsDTMF | `boolean` | Whether the call can send DTMF (dual tone multifrequency) tones via hard pause digits or in-call keypad entries. Default `false`. |\n\nThe event handlers you can pass to this method are:\n\n| Name | Description |\n| --- | --- | --- |\n| onSpeakerOn | Triggered when the speaker is turned on. |\n| onSpeakerOff | Triggered when the speaker is turned off. |\n\n```typescript\nimport { TNSCall } from \"nativescript-call\";\nconst tnsCall = new TNSCall();\n\ntnsCall.receiveCall(\n    {\n      appName: \"My App\",\n      icon: \"download-from-cloud\", // see demo/app/App_Resources/iOS\n      handleType: \"PHONE\",\n      handleId: \"+31612345678\",\n      callerName: \"Donald J. Drumpf\",\n      hasVideo: true,\n      supportsDTMF: true,\n      onSpeakerOn: () =\u003e console.log(\"Speaker ON\"),\n      onSpeakerOff: () =\u003e console.log(\"Speaker OFF\")\n    })\n    .then(() =\u003e console.log(\"Receive call success\"))\n    .catch(err =\u003e console.log(\"Error receiving call: \" + err));\n```\n\n### `endCall`\n\n```typescript\nimport { TNSCall } from \"nativescript-call\";\nconst tnsCall = new TNSCall();\n\ntnsCall.endCall()\n    .then(() =\u003e console.log(\"Ended call\"))\n    .catch(err =\u003e console.log(\"Error ending call: \" + err));\n```\n\n## Receiving a call when the app is not running\nEither use [Pusher](https://github.com/noodlewerk/NWPusher), or this CURL command:\n\n```shell\ncurl -v -d '{\"userInfo\":\"eddy.verbruggen\",\"aps\":{\"sound\":\"default\"},\"title\":\"Eddy Verbruggen\",\"callType\":\"VIDEO\"}' --header \"apns-topic: com.app.sample\" --http2 --cert ~/Desktop/voip/ck.pem:ggk12 https://api.development.push.apple.com/3/device/DEVICE_VOIP_TOKEN\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddyverbruggen%2Fnativescript-call","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddyverbruggen%2Fnativescript-call","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddyverbruggen%2Fnativescript-call/lists"}