{"_id":"59fcb0695f893200262cfe59","project":"55843604fd8d910d007b9502","version":{"_id":"558444ceafccfd0d00fcb2bb","forked_from":"55843604fd8d910d007b9505","project":"55843604fd8d910d007b9502","__v":66,"createdAt":"2015-06-19T16:35:26.435Z","releaseDate":"2015-06-19T16:35:26.435Z","categories":["558444cfafccfd0d00fcb2bc","558444cfafccfd0d00fcb2bd","55ad4ce733616a0d00599d2e","55ad4cef6aadf20d0015b764","55ad4cf36aadf20d0015b765","55ad4cfb24cf160d0013584f","55ad4d0024cf160d00135850","55ad4d0a24cf160d00135851","55ad4d0d24cf160d00135852","55ad4d126aadf20d0015b766","55ad4d1624cf160d00135853","55ad4d1933616a0d00599d2f","55ad4d2233616a0d00599d30","55ad4d2e24cf160d00135854","55d35b6bf77e6d0d00b1b092","55d3649a0168850d0073f14a","55d366d40168850d0073f15a","55d37fcff77e6d0d00b1b13f","55d383e50168850d0073f1e1","55d3ac26c336ec0d007c2251","55d3c51cb2330119009c31db","55d3c59bfe37111900e536f3","55d3c5a7fe37111900e536f4","55d3c5b4fe37111900e536f5","55d3c5d4fe37111900e536f6","55d3c5d6b2330119009c31df","55d3c5d71f478b170077c164","55d3c687b2330119009c31e4","55d3c6a4fe37111900e536f9","55d3c6befe37111900e536fa","55d3c6e8d2c66f0d00497f93","55d49dcfd7c16b2d007de905","55d4ca8f5082980d0009c79b","55d4cab9c95a3d2f0069ad3d","55d4d279c95a3d2f0069ad60","55d4d9355082980d0009c7e1","55d4f6b5988e130d000b3eb1","55d64dc8e60a2f0d00b88ecb","5627ca43fcbbc621004ec07d","56c64a0d8f98b50d0012c37c","56f1b8b13eb62a34003ea041","56f1b9df4476fb2200795e8c","57f6907dca5e5d1700039ae9","591dd06ca266c423002ec4ca","59234825e465c11900922518","5936f82eaa591e0027638d57","59972f54fd7078001992c136","599c6da8f180820025f14909","59b054613c3e1b0019cf27d9","59b1ceca2d6231003ad73e5f","59b1cf1857911600382e0dc4","59b1cf2730f3d60010c30ef7","59b1cf385d4b89003035441a","59b1cf5857911600382e0dc6","59bc2c4e26ac9b0010a8b753","59bc2ce20b3eb30010657b70","59f0c793ba3bc90030f413ab","59f0cd62f5ecda00325294b9","59fb55a8e8d0f600101aedc3","59fcb05c067f8d0028613f86","5a2af4a1bc5fba00283909c1","5a83673b0e56010012138c12","5a972f2e77b85a0070e4ebe2","5aa300224ed4b40012c53e1d","5acd20095efd8d000359bb3c","5ad50889c05179000306021e","5af0927a8779670003daff34"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3"},"category":{"_id":"59fcb05c067f8d0028613f86","project":"55843604fd8d910d007b9502","version":"558444ceafccfd0d00fcb2bb","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-11-03T18:07:24.030Z","from_sync":false,"order":4,"slug":"site-intercept-android-sdk","title":"Mobile Android Intercept SDK"},"user":"5919f13aff66b00f00f1948c","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-11-03T18:07:37.162Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"This reference guide covers the following APIs:\n\n- [Qualtrics Class](#qualtrics-class)\n- [InitializationResult Class](#initializationresult-class)\n- [IQualtricsCallback Interface](#iqualtricscallback-interface)\n- [IQualtricsInitializationCallback Interface](#iqualtricsinitializationcallback-interface)\n- [Properties Class](#properties-class)\n- [TargetingResult Class](#targetingresult-class)\n- [TargetingResultStatus Enum](#targetingresult-enum)\n\n[block:api-header]\n{\n  \"title\": \"Qualtrics Class\"\n}\n[/block]\nThe **Qualtrics** class lets your app communicate with Qualtrics App Feedback. The **Qualtrics** class is represented as a singleton, and the singleton is accessible through its **instance()** method. You can initialize the **Qualtrics** singleton with an intercept ID. To find the intercept ID, see [Intercept ID for App Feedback](doc:intercept-id-for-site-intercept).\n\nFor more information about App Feedback and its key concepts, see [App Feedback Basics](https://www.qualtrics.com/support/website-app-feedback/common-use-cases/mobile-app-feedback-project/).\n\n## Usage\n\nThe Android app first initializes the **Qualtrics** singleton with the current **Context** (as the **context** parameter with the **initialize**... method). You can initialize the singleton in the app's main activity **onCreate** method. \n\nWhen you want to display a creative, use the **evaluateTargetingLogicWithCompletion** method to check the intercept's display logic on the server asynchronously. After evaluation of the intercept is complete, the method calls the completion callback (defined in a private subclass which implements the **IQualtricsCallback** interface) which returns a **TargetingResult** object to indicate to the app whether the creative should be displayed.\n\n## Field\n\n### properties\n\n**Properties properties**\n\nThe **properties** object stores values that can be used throughout the app. Values placed in the map could include information such as the number of times the user has navigated to a specified view controller, location information, latency times, or other values that can be collected by the Android device. See [Properties Class](#section-properties-class).\n\n## Methods\n\n### display\n\nboolean display(Context context)\n\nThis method displays the specified creative. Typically, you need to check whether the creative should be displayed by evaluating an intercept's logic using the **evaluateTargetingLogicWithCompletion** method.\n\n###### Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Qualtrics.instance().display(MainActivity.this);\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n### evaluateTargetingLogicWithCompletion\n\n**void evaluateTargetingLogic(IQualtricsCallback callback)**\n\nThis method asynchronously evaluates the current intercept and calls the specified completion callback with a **TargetingResult** object. The **TargetingResult** object indicates the result of the evaluation through the **passed()** method. See [IQualtricsCallback Interface](#iqualtricscallback-interface) for more information about implementing the callback.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Qualtrics.instance().evaluateTargetingLogic(new MyCallback());\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n### initialize\n\n**void initialize(String brandId, String zoneId, String interceptId, Context context)**\n**void initialize(String brandId, String zoneId, String interceptId, Context context, IQualtricsInitializationCallback callback)**\n\nThis method initializes the **Qualtrics** singleton using the specified brand ID, zone ID, intercept ID, context, and, optionally, callback.  You typically call this method in an activity's (or application's) **onCreate** method. To find the necessary intercept ID, see [Intercept ID for App Feedback](doc:intercept-id-for-site-intercept). \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \":::at:::Override\\nprotected void onCreate(Bundle savedInstanceState) {\\n        \\n  super.onCreate(savedInstanceState);\\n  setContentView(R.layout.activity_main);\\n\\n  Qualtrics.instance().initialize(\\\"BRAND ID\\\", \\\"Project ID\\\", \\\"INTERCEPT ID\\\", context);\\n\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n### instance\n\n**static Qualtrics instance()**\n\nReturns the **Qualtrics** singleton object.\n\n### registerViewVisitWithViewName\n\n**public void registerViewVisit(String viewName)**\n\nYou can use this method to record visits to a particular view. For more information about Intercept statistics, see [User Analytics with the Mobile App SDK](doc:page-view-and-impressions-with-the-mobile-sdk).\n\n###### Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Qualtrics.instance().registerViewVisit(\\\"experiment\\\");\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n### resetTimer\n\n**public void resetTimer()**\n\nThis method resets the usage timer that is available to the intercept on the server as **Time Spent in App**.\n\n### resetViewCounter\n\n**public void resetViewCounter()**\n\nThis method resets the view count to zero. It is available to the intercept as the **View Count** value in the intercept display logic.\n\n\n[block:api-header]\n{\n  \"title\": \"InitializationResult Class\"\n}\n[/block]\nEncapsulates the result of initialization of App Feedback. Implementers of the **IQualtricsInitializationCallback.run()** method have access to an instance of this class.\n\n## Methods\n\n### getMessage\n\n**String getMessage()**\n\nReturns a string that indicates the status of App Feedback initialization.\n\n### passed\n\n**boolean passed()**\n\nIndicates whether initialization of App Feedback was successful.\n[block:api-header]\n{\n  \"title\": \"IQualtricsCallback Interface\"\n}\n[/block]\nYou need to create a class that implements the **IQualtricsCallback** interface (or use a lambda function) in order to receive asynchronous notifications that evaluation of an intercept is complete. The only method you need to implement is **run**.\n\n## Method\n\n### run\n\n**void run(TargetingResult targetingResult)**\n\nThis method will be called when an intercept is triggered. Should be implemented to display a creative as shown in the following code example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"private class MyCallback implements IQualtricsCallback {\\n  @Override\\n  public void run(TargetingResult targetingResult) {\\n    if (targetingResult.passed()) {\\n      Qualtrics.instance().display(MainActivity.this);\\n    }\\n  }\\n}\\n\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"IQualtricsInitializationCallback Interface\"\n}\n[/block]\n## Method\n\n### run\n\n**void run(InitializationResult initializationResult)**\n\nCalled upon completion of initialization of App Feedback and allows access to initialization status through the **initializationResult**.\n\n[block:api-header]\n{\n  \"title\": \"Properties Class\"\n}\n[/block]\nThe **Properties** class allows you to store values that are sent back to the server and can be used as embedded data in surveys. For more information about using property values in surveys, see [Using Embedded Data](getting-started-si-with-android#section-using-embedded-data).\n\n## Methods\n\n### setString\n\n**public void setString(String key, String value)**\n\nSets the string value for the specified key. The value is sent back to the server and can be used in the intercept. For an example, see [Using Embedded Data](getting-started-si-with-android#section-using-embedded-data).\n\n###### Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Qualtrics.instance().properties.setString(\\\"firstName\\\", \\\"John\\\");\",\n      \"language\": \"java\",\n      \"name\": null\n    }\n  ]\n}\n[/block]\n### setNumber\n\n**public void setNumber(String key, Double value)**\n\nSets the double value for the specified key. The value is sent back to the server and can be used in the intercept. For an example, see [Using Embedded Data](getting-started-si-with-android#section-using-embedded-data).\n\n###### Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Qualtrics.instance().properties.setNumber(\\\"age\\\", 25.0);\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"TargetingResult Class\"\n}\n[/block]\n## Methods\n\n### getError\n\n**Exception getError()**\n\nThis method returns an exception from the last evaluation of the intercept if applicable.\n\n### getSurveyUrl\n\n**String getSurveyUrl()**\n\nThis method returns the link to the survey in the current creative. The link can be used by app code to display the survey instead of calling **displayWithCurrentView**.\n\nThe following code example shows how to obtain the survey link from a returned **TargetingResult** and log it to the debug console.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"private class MyCallback implements IQualtricsCallback {\\n  @Override\\n  public void run(TargetingResult targetingResult) {\\n    if (targetingResult.passed()) {\\n      android.util.Log.d(\\\"DEBUG\\\", targetingResult.getSurveyUrl());\\n\\n    }\\n  }\\n}\\n\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n### getTargetingResultStatus\n\n**TargetingResultStatus getTargetingResultStatus()**\n\nReturns the results of the evaluation as a **TargetingResultStatus** enum.\n\n### passed\n\n**boolean passed()**\n\nThis method indicates the state of the server-side evaluation of the intercept. If it is **TRUE**, evaluation was successful and the creative should be displayed.\n\nThe following code example shows a typical use of the **passed** property.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"private class MyCallback implements IQualtricsCallback {\\n  @Override\\n  public void run(TargetingResult targetingResult) {\\n    if (targetingResult.passed()) {\\n      Qualtrics.instance().display(MainActivity.this);\\n    }\\n  }\\n}\\n\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n### recordClick\n\n**public void recordClick()**\n\nThe method records a click that is reported back to the server. It is associated with the intercept that was used to initialize the **Qualtrics** singleton. You can view the click statistics in the **View Stats** tab for the intercept. For more information, see [User Analytics with the Mobile App SDK](doc:page-view-and-impressions-with-the-mobile-sdk).\n\n###### Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"targetingResult.recordClick();\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n### recordImpression\n\n**public void recordImpression()**\n\nThis method reports an impression associated with the intercept when initializing the **Qualtrics** object (using the **initializeWithIntercept** method) back to the server. The impressions are reported in the **View Stats** tab for that intercept in the server user interface. For more information, see [User Analytics with the Mobile App SDK](doc:page-view-and-impressions-with-the-mobile-sdk).\n\n###### Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"targetingResult.recordImpression();\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"TargetingResultStatus Enum\"\n}\n[/block]\nThe **TargetingResultStatus** enum indicates the status of the evaluation of the specified intercept.\n\n### Values\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Value\",\n    \"h-1\": \"Meaning\",\n    \"0-0\": \"**passed**\",\n    \"1-0\": \"**failedLogic**\",\n    \"2-0\": \"**sampledOut**\",\n    \"3-0\": \"**multipleDisplayPrevented**\",\n    \"4-0\": \"**error**\",\n    \"0-1\": \"Targeting logic passed successfully.\",\n    \"1-1\": \"The targeting logic did not pass.\",\n    \"2-1\": \"The targeting logic passed, but the intercept sampling rate prevented the survey invitation from appearing.\",\n    \"3-1\": \"The survey invitation has a **Prevent Repeated Display** option set. This prevents the survey invitation from appearing again for a specified time period.\",\n    \"4-1\": \"An error occurred when attempting to evaluate targeting logic. Use the **getError** method on the **TargetingResult** object to determine more about this error.\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]","excerpt":"","slug":"si-android-sdk-reference","type":"basic","title":"App Feedback Android API Reference"}

App Feedback Android API Reference


This reference guide covers the following APIs: - [Qualtrics Class](#qualtrics-class) - [InitializationResult Class](#initializationresult-class) - [IQualtricsCallback Interface](#iqualtricscallback-interface) - [IQualtricsInitializationCallback Interface](#iqualtricsinitializationcallback-interface) - [Properties Class](#properties-class) - [TargetingResult Class](#targetingresult-class) - [TargetingResultStatus Enum](#targetingresult-enum) [block:api-header] { "title": "Qualtrics Class" } [/block] The **Qualtrics** class lets your app communicate with Qualtrics App Feedback. The **Qualtrics** class is represented as a singleton, and the singleton is accessible through its **instance()** method. You can initialize the **Qualtrics** singleton with an intercept ID. To find the intercept ID, see [Intercept ID for App Feedback](doc:intercept-id-for-site-intercept). For more information about App Feedback and its key concepts, see [App Feedback Basics](https://www.qualtrics.com/support/website-app-feedback/common-use-cases/mobile-app-feedback-project/). ## Usage The Android app first initializes the **Qualtrics** singleton with the current **Context** (as the **context** parameter with the **initialize**... method). You can initialize the singleton in the app's main activity **onCreate** method. When you want to display a creative, use the **evaluateTargetingLogicWithCompletion** method to check the intercept's display logic on the server asynchronously. After evaluation of the intercept is complete, the method calls the completion callback (defined in a private subclass which implements the **IQualtricsCallback** interface) which returns a **TargetingResult** object to indicate to the app whether the creative should be displayed. ## Field ### properties **Properties properties** The **properties** object stores values that can be used throughout the app. Values placed in the map could include information such as the number of times the user has navigated to a specified view controller, location information, latency times, or other values that can be collected by the Android device. See [Properties Class](#section-properties-class). ## Methods ### display boolean display(Context context) This method displays the specified creative. Typically, you need to check whether the creative should be displayed by evaluating an intercept's logic using the **evaluateTargetingLogicWithCompletion** method. ###### Example [block:code] { "codes": [ { "code": "Qualtrics.instance().display(MainActivity.this);", "language": "java" } ] } [/block] ### evaluateTargetingLogicWithCompletion **void evaluateTargetingLogic(IQualtricsCallback callback)** This method asynchronously evaluates the current intercept and calls the specified completion callback with a **TargetingResult** object. The **TargetingResult** object indicates the result of the evaluation through the **passed()** method. See [IQualtricsCallback Interface](#iqualtricscallback-interface) for more information about implementing the callback. [block:code] { "codes": [ { "code": "Qualtrics.instance().evaluateTargetingLogic(new MyCallback());", "language": "java" } ] } [/block] ### initialize **void initialize(String brandId, String zoneId, String interceptId, Context context)** **void initialize(String brandId, String zoneId, String interceptId, Context context, IQualtricsInitializationCallback callback)** This method initializes the **Qualtrics** singleton using the specified brand ID, zone ID, intercept ID, context, and, optionally, callback. You typically call this method in an activity's (or application's) **onCreate** method. To find the necessary intercept ID, see [Intercept ID for App Feedback](doc:intercept-id-for-site-intercept). [block:code] { "codes": [ { "code": "@Override\nprotected void onCreate(Bundle savedInstanceState) {\n \n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n Qualtrics.instance().initialize(\"BRAND ID\", \"Project ID\", \"INTERCEPT ID\", context);\n\n}", "language": "java" } ] } [/block] ### instance **static Qualtrics instance()** Returns the **Qualtrics** singleton object. ### registerViewVisitWithViewName **public void registerViewVisit(String viewName)** You can use this method to record visits to a particular view. For more information about Intercept statistics, see [User Analytics with the Mobile App SDK](doc:page-view-and-impressions-with-the-mobile-sdk). ###### Example [block:code] { "codes": [ { "code": "Qualtrics.instance().registerViewVisit(\"experiment\");", "language": "java" } ] } [/block] ### resetTimer **public void resetTimer()** This method resets the usage timer that is available to the intercept on the server as **Time Spent in App**. ### resetViewCounter **public void resetViewCounter()** This method resets the view count to zero. It is available to the intercept as the **View Count** value in the intercept display logic. [block:api-header] { "title": "InitializationResult Class" } [/block] Encapsulates the result of initialization of App Feedback. Implementers of the **IQualtricsInitializationCallback.run()** method have access to an instance of this class. ## Methods ### getMessage **String getMessage()** Returns a string that indicates the status of App Feedback initialization. ### passed **boolean passed()** Indicates whether initialization of App Feedback was successful. [block:api-header] { "title": "IQualtricsCallback Interface" } [/block] You need to create a class that implements the **IQualtricsCallback** interface (or use a lambda function) in order to receive asynchronous notifications that evaluation of an intercept is complete. The only method you need to implement is **run**. ## Method ### run **void run(TargetingResult targetingResult)** This method will be called when an intercept is triggered. Should be implemented to display a creative as shown in the following code example: [block:code] { "codes": [ { "code": "private class MyCallback implements IQualtricsCallback {\n @Override\n public void run(TargetingResult targetingResult) {\n if (targetingResult.passed()) {\n Qualtrics.instance().display(MainActivity.this);\n }\n }\n}\n", "language": "java" } ] } [/block] [block:api-header] { "title": "IQualtricsInitializationCallback Interface" } [/block] ## Method ### run **void run(InitializationResult initializationResult)** Called upon completion of initialization of App Feedback and allows access to initialization status through the **initializationResult**. [block:api-header] { "title": "Properties Class" } [/block] The **Properties** class allows you to store values that are sent back to the server and can be used as embedded data in surveys. For more information about using property values in surveys, see [Using Embedded Data](getting-started-si-with-android#section-using-embedded-data). ## Methods ### setString **public void setString(String key, String value)** Sets the string value for the specified key. The value is sent back to the server and can be used in the intercept. For an example, see [Using Embedded Data](getting-started-si-with-android#section-using-embedded-data). ###### Example [block:code] { "codes": [ { "code": "Qualtrics.instance().properties.setString(\"firstName\", \"John\");", "language": "java", "name": null } ] } [/block] ### setNumber **public void setNumber(String key, Double value)** Sets the double value for the specified key. The value is sent back to the server and can be used in the intercept. For an example, see [Using Embedded Data](getting-started-si-with-android#section-using-embedded-data). ###### Example [block:code] { "codes": [ { "code": "Qualtrics.instance().properties.setNumber(\"age\", 25.0);", "language": "java" } ] } [/block] [block:api-header] { "title": "TargetingResult Class" } [/block] ## Methods ### getError **Exception getError()** This method returns an exception from the last evaluation of the intercept if applicable. ### getSurveyUrl **String getSurveyUrl()** This method returns the link to the survey in the current creative. The link can be used by app code to display the survey instead of calling **displayWithCurrentView**. The following code example shows how to obtain the survey link from a returned **TargetingResult** and log it to the debug console. [block:code] { "codes": [ { "code": "private class MyCallback implements IQualtricsCallback {\n @Override\n public void run(TargetingResult targetingResult) {\n if (targetingResult.passed()) {\n android.util.Log.d(\"DEBUG\", targetingResult.getSurveyUrl());\n\n }\n }\n}\n", "language": "java" } ] } [/block] ### getTargetingResultStatus **TargetingResultStatus getTargetingResultStatus()** Returns the results of the evaluation as a **TargetingResultStatus** enum. ### passed **boolean passed()** This method indicates the state of the server-side evaluation of the intercept. If it is **TRUE**, evaluation was successful and the creative should be displayed. The following code example shows a typical use of the **passed** property. [block:code] { "codes": [ { "code": "private class MyCallback implements IQualtricsCallback {\n @Override\n public void run(TargetingResult targetingResult) {\n if (targetingResult.passed()) {\n Qualtrics.instance().display(MainActivity.this);\n }\n }\n}\n", "language": "java" } ] } [/block] ### recordClick **public void recordClick()** The method records a click that is reported back to the server. It is associated with the intercept that was used to initialize the **Qualtrics** singleton. You can view the click statistics in the **View Stats** tab for the intercept. For more information, see [User Analytics with the Mobile App SDK](doc:page-view-and-impressions-with-the-mobile-sdk). ###### Example [block:code] { "codes": [ { "code": "targetingResult.recordClick();", "language": "java" } ] } [/block] ### recordImpression **public void recordImpression()** This method reports an impression associated with the intercept when initializing the **Qualtrics** object (using the **initializeWithIntercept** method) back to the server. The impressions are reported in the **View Stats** tab for that intercept in the server user interface. For more information, see [User Analytics with the Mobile App SDK](doc:page-view-and-impressions-with-the-mobile-sdk). ###### Example [block:code] { "codes": [ { "code": "targetingResult.recordImpression();", "language": "java" } ] } [/block] [block:api-header] { "title": "TargetingResultStatus Enum" } [/block] The **TargetingResultStatus** enum indicates the status of the evaluation of the specified intercept. ### Values [block:parameters] { "data": { "h-0": "Value", "h-1": "Meaning", "0-0": "**passed**", "1-0": "**failedLogic**", "2-0": "**sampledOut**", "3-0": "**multipleDisplayPrevented**", "4-0": "**error**", "0-1": "Targeting logic passed successfully.", "1-1": "The targeting logic did not pass.", "2-1": "The targeting logic passed, but the intercept sampling rate prevented the survey invitation from appearing.", "3-1": "The survey invitation has a **Prevent Repeated Display** option set. This prevents the survey invitation from appearing again for a specified time period.", "4-1": "An error occurred when attempting to evaluate targeting logic. Use the **getError** method on the **TargetingResult** object to determine more about this error." }, "cols": 2, "rows": 5 } [/block]