android - More efficient way of indicating whether message is read or not? -
okay. have working fine in asynctask there's got less cumbersome way of doing it.
in app have "news" bar show "!" if message has not been read or new. if has been read there no "!" until new message arrives.
how accomplish download , parse json file @ regular intervals. convert message hash code , compare value hash code saved in file of previous message downloaded. additionally have "readstatus" file "read" or "unread" value written it.
when user clicks "news" bar read message rewrites "readstatus" file "read" value. whenever asynctask downloads , parses json data , coverts hash code, if hash code doesn't match saved hash code value or if match value of "readstatus" file "unread" "!" appears. also, in event of non-matching hash codes, not trigger "!" rewrites "readstatus" file "unread" value.
this whole process seems overly laborious though i'm having tough time figuring out more efficient, less code-intensive way of accomplishing same result. considerably more experience have suggestions?
thanks!
Comments
Post a Comment