Amira Elsayed Ismail
Amira Elsayed Ismail

Reputation: 9414

setting name and email in zendesk android sdk

This is my first time using of zendesk, and I am facing some problems here

I need to set the name, email and external identifier of user before start any activity to be shown in the tickets screen

here is my code

Identity user = new AnonymousIdentity.Builder().withEmailIdentifier(mEmail).withNameIdentifier(mName).withExternalIdentifier(mIdentifier).build();
ZendeskConfig.INSTANCE.setIdentity(user);

Intent intent = new Intent(ContactUsActivity.this, ContactZendeskActivity.class);
startActivity(intent);

no thing appear in my tickets screen only "Mobile App User", non of my information is shown

can anyone tell me what is the problem here ?

Upvotes: 0

Views: 319

Answers (1)

Barry
Barry

Reputation: 635

Full disclosure: I'm one of the SDK devs. Generally you end up seeing 'Mobile App User' because of the way that the user lookup works.

Before I start, I'd like to point out that withExternalIdentifier is optional. I'd only recommend using it if you know for sure that you'll always have a unique ID there.

If you give us an external ID, we'll try to see if a user exists in your system with that ID. If it does we use that. For security reasons we don't let a mobile identity update the user. If no match was found on the external ID, we then look at the email, and follow the same lookup process.

The only time where the external ID and name will be set is if you are creating a new user. New means one that wasn't found already with the external ID or email that you are supplying.

If you still have issues you can drop us an email to [email protected]

Thanks!

Upvotes: 3

Related Questions