I am trying to get the user's set home address from their profile. When testing on device, am consistently seeing it empty when it is set in the profile.
Here is the action used to extract the information:
action (ReturnSelfAddress) {
type (Constructor)
description (Gets address from profile)
collect {
input (mySelf) {
min (Required)
type (self.Self)
}
}
output (geo.SearchTerm)
}
This goes along with a javascript file that extracts the home
address from the self.addressInfos
field.
Here is a screenshot of my profile on the device:
And another of the address.
In testing I was using a real address.
The resulting self object I got from the profile was:
{
addressInfos = [],
birthdayInfo = {
calculatedFromNow = null,
day = 1,
fuzzyFactor = null,
holiday = null,
month = 1,
namedDate = null,
parseTree = null,
year = 1911,
$id = null,
$type = viv.contact.BirthdayInfo
},
contactId = null,
emailInfos = [{
address = [email protected],
emailType = Home,
$id = null,
$type = viv.contact.EmailInfo
}],
isFavorite = null,
nameInfo = {
firstName = Bill,
initial = null,
lastName = Faker,
middleName = null,
nickName = ,
prefix = null,
structuredName = Bill Faker,
suffix = null,
$id = null,
$type = viv.contact.NameInfo
},
phoneInfos = [],
photoInfo = {
caption = null,
dimensions = null,
rotation = null,
size = null,
subtitle = null,
title = null,
url = http://image.to.be.put/here,
$id=null, $type=viv.contact.PhotoInfo
},
relationshipInfos=[],
workInfo=null,
$id=null,
$type=viv.self.Self
}
As you can see the addressInfos
array is empty. How should I access the user's profile addresses?
Please double-check that you have an address filled out in your Samsung account: https://www.samsung.com/us/support/account/info/