Skip to content

AndroidSuccessTypes is undefined #89

Description

@aminmeshk

I'm using React Native v0.63.2, TypeScript v4.0.2, react-native-sms v1.11.0
When I want to call this method with AndroidSuccessTypes for successTypes, it gives runtime error:

import SendSMS, { AndroidSuccessTypes } from 'react-native-sms';

SendSMS.send(
      {
        body: 'Hello World!',
        recipients: ['01234567890'],
        successTypes: [AndroidSuccessTypes.sent, AndroidSuccessTypes.queued],
        allowAndroidSendWithoutReadPermission: true,
      },
      sendSmsCompletedHandler,
    );

[Sun Sep 20 2020 09:32:02.246] ERROR TypeError: Cannot read property 'sent' of undefined, js engine: hermes

And when I log the AndroidSuccessTypes , it is actually undefined:
console.log(AndroidSuccessTypes);
Output:
[Sun Sep 20 2020 09:45:56.101] LOG undefined

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions