Can't update "Last registration" date on user's device
Didn't find what you were looking for?
New post-
Hi there,
May I ask where you are calling updateRegistration() in your Android project? Are you willing to share that bit of code as well as the name of the file where you have applied it so I can take a look?
Kind regards,
Chilun Liu
Senior Technical Support Engineer Airship
The Embassy Tea House,
195-205 Union Street, London, SE1 0LN Portland | San Francisco | London | Paris | New York | New DelhiComment actions -
Hi Chilun Liu,I'm calling to the method updateRegistration() after adding a few tags with information about the registered device; just after the user has made log in successfully. Previously to that, I did the takeOff and all the urban configuration's things.The code I'm using is what follows:
String deviceTagName = String.format("%s%s", Constants.TAG_URBAN_DEVICE, Utils.getDeviceName().toUpperCase());
Set<String> tags = UAirship.shared().getPushManager().getTags();
tags.add(deviceTagName);
tags.add(Utils.isTablet() ? Constants.TAG_URBAN_DEVICE_TYPE_TABLET : Constants.TAG_URBAN_DEVICE_TYPE_SMARTPHONE);
UAirship.shared().getPushManager().setTags(tags);
UAirship.shared().getPushManager().updateRegistration();Comment actions -
Hi again,
When using .setTags, are you expecting the tags to be appended to that device when eventually calling updateRegistraton?
Kind regards,
Chilun Liu
Senior Technical Support Engineer Airship
The Embassy Tea House,
195-205 Union Street, London, SE1 0LN Portland | San Francisco | London | Paris | New York | New DelhiComment actions -
Hi again Chilun Liu,no, I'm not waiting. Are you suggestion that the setTags() methods is asynchronous?
I thought the problem was that the line
UAirship.shared().getPushManager().updateRegistration();
wasn't working properly.Comment actions -
Hi again,
I've taken another look at your updateRegistration call:
UAirship.shared().getPushManager().updateRegistration();
I've only known the call to exist like this (https://docs.airship.com/platform/ios/segmentation/):
UAirship.push().updateRegistration()
Can you use the one I've mentioned above and then see if that gets called?
Kind regards,
Chilun Liu
Senior Technical Support Engineer Airship
The Embassy Tea House,
195-205 Union Street, London, SE1 0LN Portland | San Francisco | London | Paris | New York | New DelhiComment actions -
Hi Chilun Liu,I've tried the solution that you gave me in your last post, but the problem is that your solution is for iOS platforms. I've read the segmentation's documentation for android (https://docs.airship.com/platform/android/segmentation/ ) and always have to use UAirship.shared().getPushManager().[the method you want to use].
Do you have any other idea to try?
Thank youComment actions -
Hi again,
I have spoken about this at length internally and it seems that calling "updateRegistration" immediately after you make the tag change - that doesn't actually occur straight away (I'm still confirming with several departments as to how long you will have to wait, so bear with me whilst I do that).
I've been told that there was a fix for a security issue, so it is suggested that you should update your current Android Java library files to version 10.0.2. There have been several bug fixes and additional features that have been introduced since 9.3.1. See the link to the change log below:
https://github.com/urbanairship/android-library/blob/master/CHANGELOG.md
If you can provide me with the Channel ID (use this link to find it - https://support.airship.com/hc/en-us/articles/360006723352-How-to-find-the-Channel-ID-using-the-Channel-Capture-Tool) for one or several of your Android devices you are testing this with along with the date/times when you attempted to apply the tag changes, then I can do some more digging.
Kind regards,
Chilun Liu
Senior Technical Support Engineer Airship
The Embassy Tea House,
195-205 Union Street, London, SE1 0LN Portland | San Francisco | London | Paris | New York | New DelhiComment actions
Please sign in to leave a comment.
Comments
7 comments