Title: serviceInfo.getAttributes is empty in onServiceResolved in Android 5.1 to 6.0 (Network Service Discovery)
Tags: java;android;android-studio;nsd
Question: I am trying to read TXT records in my app .ATTRIBUTES TEST is {}.
public void onServiceResolved(NsdServiceInfo serviceInfo) {
Log.e("ATTRIBUTES TEST",serviceInfo.getAttributes()+"");
}



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2017:00:06/07/17', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<java><android><android-studio><nsd>', 'Title': 'serviceInfo.getAttributes is empty in onServiceResolved in Android 5.1 to 6.0 (Network Service Discovery)', 'ViewCount': 295, 'id': 44414009, 'user_AboutMe': '', 'user_AccountId': 9774810.0, 'user_DisplayName': 'LanguageMaster', 'user_Reputation': 31.0, 'user_Views': 15.0, 'user_id': 7245259.0}}