walterholohan / react-native-crisp-chat-sdk

React-Native bridge for Crisp Chat iOS and Android SDK's
MIT License
70 stars 26 forks source link

setUserEmail for Android #10

Closed adrielschmitz closed 3 years ago

adrielschmitz commented 3 years ago

When trying to use the setUserEmail method on the android platform, I realized that the email was not set. Looking at the dependencies I realized that there is a condition to only set the email if it is in IOS if (Platform.OS === 'ios'). I thought about using CrispChatSDK.setUserEmail, which was already done in the old version. However, I get an error that says "undefined is not a function". 2020-11-18T15_24_55 117Z

walterholohan commented 3 years ago

Hey @adrielschmitz, yes with the new release 0.3.0 I am using Crisp's new android SDK which is still in beta version but has not exposed any of the API methods such as setUserEmail(). But they plan on releasing that functionality. So, for now, setUserEmail() is only available on iOS. I have noted that in the README but will try call it out more so people don't miss it.

adrielschmitz commented 3 years ago

Understand. I'll have to wait for them to release then. Do you think I keep the issue open to serve as a warning to other people?

walterholohan commented 3 years ago

Yep please do. The minute Crisp release a new android version I will update this library.

4rno commented 3 years ago

Hi, a little update for this thread,

@walterholohan it seems that Crisp released 2 days ago a new android version of the SDK (available on master), and it is now possible to use methods like setUserEmail and setUserNickname.

I launched their demo and added both methods in the Application.java. And it works.

[...]
Crisp.configure(getApplicationContext(), "7598bf86-9ebb-46bc-8c61-be8929bbf93d");
Crisp.setUserEmail("john@doe.com");
Crisp.setUserNickname("John Doe");
[...]
walterholohan commented 3 years ago

Thanks @4rno for the heads up. Hopefully ill get time over the coming days to upgrade and use the latest android sdk from Crisp

walterholohan commented 3 years ago

@4rno @adrielschmitz I just released version 0.6.0 which has the updated Android SDK and some new API methods

4rno commented 3 years ago

@walterholohan Thank you so much, I will integrate the 0.6.0 in my project on monday !