mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-01 13:40:42 +00:00
✨ Android - Add api for showSurvey
This commit is contained in:
parent
f55cc4d582
commit
23f8ae15d3
@ -672,6 +672,22 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows survey with a specific token.
|
||||
* Does nothing if there are no available surveys with that specific token.
|
||||
* Answered and cancelled surveys won't show up again.
|
||||
*
|
||||
* @param surveyToken A String with a survey token.
|
||||
*/
|
||||
@ReactMethod
|
||||
public void showSurveyWithToken(String surveyToken) {
|
||||
try {
|
||||
Instabug.showSurvey(surveyToken);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets user attribute to overwrite it's value or create a new one if it doesn't exist.
|
||||
*
|
||||
|
4
index.js
4
index.js
@ -104,9 +104,9 @@ module.exports = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows Survey with a specific token.
|
||||
* Shows survey with a specific token.
|
||||
* Does nothing if there are no available surveys with that specific token.
|
||||
* Answered and canceled surveys won't show up again.
|
||||
* Answered and cancelled surveys won't show up again.
|
||||
* @param {string} surveyToken - A String with a survey token.
|
||||
*
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user