Mobile Android SDK configuration and embedding an Activity

Hi guys

I am trying to set the mandatory options so I can play around with this in my app.

I have been following the documentation on both the mobile sdk page and Github readme but cannot seem to successfully set these values with the sdk. Can you see where I am going wrong from these images?

You will notice that I have set the country enum to a variable but that isn’t how the documentation says to interact with the sdk and I assume isn’t going to work.

Hi @Jack ,

That’s correct, Fidel.Country is an Enum type, used to set the Fidel.allowedCountries property. The correct way to use it is:

Fidel.allowedCountries = new Fidel.Country[]{Fidel.Country.UNITED_KINGDOM, Fidel.Country.JAPAN, Fidel.Country.CANADA};

Hey @laka ,

thanks for your response and the usage of allowed countries. My real confusion is why none of the Fidel.{method} fields seem to be working in my environment. I have the sdk installed as can be seen from picture 2, using version 1.5.2. But also in picture 2 you should be able to see that company name, pricacyUrl and delete instructions, that all just take simple strings are not being recognised.

I’m sure it is something simple that I am missing as Native Android isn’t my best area. Would you know why this is the case and what I can do?

Because the documentation says you simply set the value as so:

Fidel.companyName = "Your Company Name" // default: "Company Name".

Which in the above pictures, seems to not be working :confused:

Thanks in advance :slight_smile:

Jack

That’s because you’re trying to set the Fidel properties directly inside the fidelActivity. That activity is a class and can be used to register methods and properties, not call methods. Try moving all your Fidel code inside a method in the fidelActivity class.

Excellent, I should be able to start testing this sdk now haha. I was clearly thinking they were something they were not! I can test the activity now, thank you.

Can the activity be embedded into an existing activity or would that not work? as there is a close icon in the top left of the activity in the docs, indicating that embedding is not really the intention.


image

Thanks for the help

Jack

The SDK can’t be used as a Fragment, so it can’t be embedded for now. It has to use an Activity as the starting point.

Okay no worries, maybe in the future :wink: Thanks a lot for your help!