Urban Airship Android addTag response?

188 views Asked by At

I might be misunderstanding how this works, but is there no way to get a response when adding a tag?

After reading the documentation, I see to added a device to a tag. I use the following.

public void addTag(String tag) {
    UAirship.shared().getPushManager().editTags().addTag(tag).apply();
}

Looking at Urban Airships documentation for apply, http://docs.urbanairship.com/reference/libraries/android/latest/reference/com/urbanairship/push/TagEditor.html#apply()

It shows that it does not return anything. So is there no way to know for sure that a device was successfully added to a tag? I feel like I am misunderstanding how this works since it seems that this is making an API call essentially so there is a chance it could fail.

1

There are 1 answers

0
ralepinski On BEST ANSWER

Currently the Urban Airship SDKs will automatically handle the retry internally if the tag operation fails to complete. Its more of a set and forget about it type operation.

For channel tags, like the example above, tags are applied during channel registration. You can listen for channel updates in the Airship Receiver's onChannelUpdated. For tag groups no such callback is available at the moment. If you would like better feedback, you please contact Urban Airship support to request an enhancement.