This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Rollbar.init(this, "{access_token}", "production", true, true) | |
| val rollbar = Rollbar.instance() | |
| val originalConfig = rollbar.config() | |
| val id = 123 | |
| // There's essential config in the default 'originalConfig', so start from that. | |
| val config = ConfigBuilder.withConfig(originalConfig) | |
| .endpoint("https://{self_hosted_domain}/api/1/item/") | |
| .sender(null) // working around a bug in their builder. tested version: 1.7.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.example.myapplication"> | |
| <application | |
| android:name=".MainApplication" | |
| ... | |
| android:theme="@style/AppTheme"> | |
| <!-- Remember to declare the CustomHelpCenterActivity --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let model = ZDKHelpCenterOverviewContentModel.defaultContent() | |
| // Use the model to filter content by IDs, tags, etc | |
| ZDKHelpCenterProvider().getHelpCenterOverview(withHelpCenterOverviewModel: model) { (result, _) in | |
| guard let categories = result else { return } | |
| print ("Help Center has \(categories.count) categories") | |
| for category in categories { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let requestConfig = RequestUiConfiguration() | |
| let helpCenter = HelpCenterUi.buildHelpCenterOverviewUi(withConfigs: [requestConfig]) | |
| // Workaround when using an opaque UINavigationBar with a tint | |
| helpCenter.extendedLayoutIncludesOpaqueBars = true; | |
| self.navigationController?.pushViewController(helpCenter, animated: true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let createRequest = ZDKCreateRequest() | |
| createRequest.subject = "Hello?" | |
| createRequest.requestDescription = "Is it me you're looking for?" | |
| let requestProvider = ZDKRequestProvider() | |
| requestProvider.createRequest(createRequest) { (response, error) in | |
| if (error != nil) { | |
| // Display / Handle the error | |
| return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create object | |
| let request = ZDKCreateRequest() | |
| // Set mandatory properties | |
| request.subject = "Hello Provider" | |
| request.requestDescription = "Description" | |
| // Specify which form to use | |
| request.ticketFormId = 1234; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| fun genericErrrorSnackbarShouldHaveExpectedText() { | |
| // Same setup as previous example - omitting | |
| // Simple tests same as previous example - omitting | |
| val snackbarLayout = snackbar.view | |
| // Now we can use standard findViewById | |
| val snackbarTextView = snackbarLayout.findViewById<TextView>(R.id.snackbar_text) | |
| assertThat(snackbarTextView).isNotNull() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <view | |
| class="android.support.design.internal.SnackbarContentLayout" | |
| > | |
| <TextView | |
| android:id="@+id/snackbar_text"/> | |
| <Button | |
| android:id="@+id/snackbar_action" | |
| android:visibility="gone"/> |
NewerOlder