@Override public void updateMessage(long id, String title, String body, int radius, long expiry) throws RemoteException { MosaicMessage message = messages.get((Long) id); message.setTitle(title); message.setBody(body); message.setRadius(radius); message.setExpiry(expiry); new UpdateMessageTask(MosaicService.this, message).execute(); }
@Override public void insertMessage( String title, String body, int latE6, int lonE6, int radius, long expiry) throws RemoteException { MosaicMessage message = new MosaicMessage(); message.setTitle(title); message.setBody(body); message.setLatitudeE6(latE6); message.setLongitudeE6(lonE6); message.setRadius(radius); message.setCreated(System.currentTimeMillis()); message.setUserId(mosaicUser.getId()); new InsertMessageTask(MosaicService.this, message).execute(); }