You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Steve, I am trying to implement a provider on android. I was able to get it working on iOS by doing this:
exports.searchHelpCenter = function(query) {
return new Promise(function(resolve, reject) {
openZendesk().then(function(controller) {
let provider = ZDKHelpCenterProvider.new();
provider.init().searchForArticlesUsingQueryWithCallback(query, function(results, error) {
var jsResults = utilsModule.ios.collections.nsArrayToJSArray(results);
resolve(jsResults);
})
})
})
}
But I'm having a hard time figuring out how to do it on the Android side. Could you provide some pointers?
Here's what I have so far, which is essentially nothing:
exports.searchHelpCenter = function(query) {
return new Promise(function(resolve, reject) {
if(account.initialized) {
var activity = frameModule.topmost().android.activity;
var MyZendeskCallback = com.zendesk.service.ZendeskCallback.extend({
onSuccess: function(args){
if(account.anonymous){
loadAnonUser();
} else {
loadJwtUser();
}
let provider = new com.zendesk.sdk.network.HelpCenterProvider();
provider.helpCenterProvider();
// I have no idea what im doing
resolve();
},
onError: function(error){
console.log(error);
}
});
initSdk(activity, new MyZendeskCallback())
} else {
reject("Zendesk account info not initalized, please call the init function on the module.");
}
})
}
Hey Steve, I am trying to implement a provider on android. I was able to get it working on iOS by doing this:
But I'm having a hard time figuring out how to do it on the Android side. Could you provide some pointers?
Here's what I have so far, which is essentially nothing:
I'm working off of these docs: https://zdmobilesdkdocdev.herokuapp.com/android-sdk-providers/com/zendesk/sdk/network/HelpCenterProvider.html
The text was updated successfully, but these errors were encountered: