Hi, I implemented Caching Extension in Android and found some problems with CustomMessage.
When u send CustomMessage to me in “messagesRequest.fetchPrevious()” that u give me JSON like this:
CustomMessage{
subType=‘null’,
customData=null,
id=1204,
muid=‘null’,
sender=User{
uid=‘5d25c57f6bff1f68194bef43’,
name=‘Rene Voly’,
email=‘null’,
avatar=‘link_link_link’
width=1920’,
link=‘null’,
role=‘null’,
metadata=null,
credits=0,
status=‘available’,
statusMessage=‘null’,
lastActiveAt=1563008085,
hasBlockedMe=false,
isBlockedByMe=false
},
receiverUid=‘5d299b296bff1f7d1c40e544’,
type=‘custom’,
receiverType=‘group’,
category=‘custom’,
sentAt=1563008455,
deliveredAt=0,
readAt=0,
metadata={
“type”:“in_trouble.off”
}
}
but
when I insert this message to cache and try to restore it(when no internet connection) i get JSON like this:
TextMessage{
text=‘null’,
metadata={
“type”:“in_trouble.off”
},
id=1505,
muid=‘null’,
sender=User{
uid=‘5d1a14e26bff1f2bff794892’,
name=‘Stepan Revytskyi’,
email=‘null’,
avatar=‘link_link_link’
width=1920’,
link=‘null’,
role=‘null’,
metadata=null,
credits=0,
status=‘available’,
statusMessage=‘null’,
lastActiveAt=1563215143,
hasBlockedMe=false,
isBlockedByMe=false
},
receiverUid=‘5d2cc5bb6bff1f6acd137af2’,
type=‘custom’,
receiverType=‘group’,
category=‘custom’,
sentAt=1563215319,
deliveredAt=0,
readAt=0
}
I think it’s problem in your SKD, u doesn’t insert all fields in cache and that’s why system can’t cast JSON to CustomMessage.
Hi, I implemented Caching Extension in Android and found some problems with CustomMessage. When u send CustomMessage to me in “messagesRequest.fetchPrevious()” that u give me JSON like this: CustomMessage{ subType=‘null’, customData=null, id=1204, muid=‘null’, sender=User{ uid=‘5d25c57f6bff1f68194bef43’, name=‘Rene Voly’, email=‘null’, avatar=‘link_link_link’
width=1920’, link=‘null’, role=‘null’, metadata=null, credits=0, status=‘available’, statusMessage=‘null’, lastActiveAt=1563008085, hasBlockedMe=false, isBlockedByMe=false }, receiverUid=‘5d299b296bff1f7d1c40e544’, type=‘custom’, receiverType=‘group’, category=‘custom’, sentAt=1563008455, deliveredAt=0, readAt=0, metadata={ “type”:“in_trouble.off” } }
but when I insert this message to cache and try to restore it(when no internet connection) i get JSON like this: TextMessage{ text=‘null’, metadata={ “type”:“in_trouble.off” }, id=1505, muid=‘null’, sender=User{ uid=‘5d1a14e26bff1f2bff794892’, name=‘Stepan Revytskyi’, email=‘null’, avatar=‘link_link_link’
width=1920’, link=‘null’, role=‘null’, metadata=null, credits=0, status=‘available’, statusMessage=‘null’, lastActiveAt=1563215143, hasBlockedMe=false, isBlockedByMe=false }, receiverUid=‘5d2cc5bb6bff1f6acd137af2’, type=‘custom’, receiverType=‘group’, category=‘custom’, sentAt=1563215319, deliveredAt=0, readAt=0 }
I think it’s problem in your SKD, u doesn’t insert all fields in cache and that’s why system can’t cast JSON to CustomMessage.