Android - Add api for showSurvey

This commit is contained in:
Salma ElTarzi 2018-01-04 11:36:49 +02:00
parent f55cc4d582
commit 23f8ae15d3
2 changed files with 18 additions and 2 deletions

View File

@ -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.
*

View File

@ -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.
*
*/