google cloud messaging - ListView: instantly updating and time comparision -


i have work on application in getting list of orders(with details , display_time) , have show them in list view, condition have show particular order on exact display_time.

for example below orders display time:

order_id: 101 | display_time (hh:mm:ss): 09:10:00

order_id: 102 | display_time (hh:mm:ss): 09:30:00

then requirement is:

  • we have show orders on list on exact display time.
  • all order should come instantly entered in database.

edit

the first thing need is:

  • to order database (sql server) instantly without hitting api. push notification.

then second need is:

  • to compare device's time , order's display_time , if matched make visible order in listview. have each order think.

i don't know how can this.

so please suggest how can above task.

i hope understand correctly. want list of items in order of time earliest latest.

here 1 algorithm , enhanced.

  1. allocate 100 (arbitrary) items/rows in listview.
  2. if have 2 items or orders initially, make other 98 rows not visible (state).
  3. if new order entered, add new order 1 of non-visible rows. , make visible of course.
  4. the issue in case, may have reorder items above new order. manipulation of text in rows. data structure necessary support this.

i claim algorithm fast. think start.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -