New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

carenation-react-native-component

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carenation-react-native-component

React native component for Carenation patient app

latest
npmnpm
Version
4.7.2
Version published
Maintainers
1
Created
Source

Carenation React Native Custom Component

Dependencies

Installation

To use the Carenation React Native Custom Component in your project, follow these steps:

  • Install the component package using npm:
npm install carenation-react-native-component

Usage

Import Carenation components

import { Carenation, CarenationAiRinger } from 'carenation-react-native-component';

Component usage

 <SafeAreaView >
      //hierarchy of this component should be higher so it can appear on all screens
    <View style={{height: '100%', width: '100%', zIndex: 2}}>
    <CarenationAiRinger
      onAccept={handleAccept}
      onDecline={handleDecline}
      onMissed={handleMissed}
    />
  </View>
  <View style={{ flex: 1 }}>
    <Carenation
      ref={carenationCompRef}
      apiKey="your_api_key"
      identifier="your_identifier"
      notificationData="your_notificationData"
      setNotificationData={setNotificationData}
      triggerAiCheckin={triggerAiCheckin}
      domain={domain}
      appointmentCallId={appointmentCallId}
      OnResetAppointmentCallId={resetAppointmentCallId}
    />
  </View>
</SafeAreaView>

Things to add in app

A SampleApp.js is included in the repo to understand the component implementation

Props

Carenation

  • apiKey (string, required): Your API key for authentication.

  • identifier (string, required): The identifier for the user or session.

  • notificationData (optional): Data to be injected into the WebView.

  • setNotificationData (function, required): Function to update notification data.

  • domain (string, optional): The domain of the web application.

  • triggerAiCheckin (Boolean, required): Determine careanation called from notification.

  • appPath (string, optional): The path to the specific application.

  • appointmentCallId (string, required): To get appointment call ID from Provider, Trainer or Nutritionist Calls

  • OnResetAppointmentCallId (function, required): Handle resetting appointment call ID.

CarenationAiRinger

  • onAccept (function, required): Handle call accepted event.

  • onDecline (function, required): Handle call declined event.

  • onMissed (function, required): Returns a event with message is check-in is missed.

Handling Errors

The Carenation component logs errors encountered by the WebView to the console for debugging purposes.

Refs

Carenation

  • carenationCompRef (required): Used Handle call mechanism for Carenation component.

Assets

Copy the ringtone.wav file into the project to use it as the notification tone.

Andriod path android/app/src/main/res/raw/ringtone.wav

IOS path ios/Resources/ringtone.wav

Permissions

Android

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.audio.output" />
<uses-feature android:name="android.hardware.microphone" />

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />

IOS

info.plist

<key>NSCameraUsageDescription</key>
<string>App required camera access</string>
<key>NSMicrophoneUsageDescription</key>
<string>App required microphone access</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>App requires Speech Recognition access</string>

Podfile

setup_permissions([
  'Camera',
  'Microphone'
])

To force play audio in speakers add this code in AppDelegate.m

#import <AVFoundation/AVFoundation.h>

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
[[AVAudioSession sharedInstance] setActive:YES error:nil];

License

Teslon Technologies Pvt. Ltd. (the "Company") Proprietary License

  • License Grant: The Company grants you a non-exclusive, non-transferable, revocable license to use the software provided in this package solely for your internal business purposes.

  • Restrictions: You may not distribute, sublicense, or transfer the software to any third party without the prior written consent of the Company. You may not reverse engineer, decompile, disassemble, or attempt to derive the source code of the software.

  • No Warranty: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FAQs

Package last updated on 28 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts