I have one problem, I need to delete payload item from pubsubitem table from database programmatically according to jid.I'm using openfire and smack api.
It work like everytime when i call leaf.send or publish everytime new entry is added in database.
So, I need to that entry update or delete old one and add new.But not getting any idea how can i do it.Any help appreciated. thanks
leaf.deleteItem(leaf.getSubscriptions().get(0).getJid().toString());
leaf.publish(new PayloadItem("Chandigarh" + "*" + System.currentTimeMillis(),new SimplePayload("Online", "stage:pubsub:simple",
"<book xmlns='" + sharedPreferences.getString("user_id", "") + "," + gpsTracker.getLatitude() + "," + gpsTracker.getLongitude() + "'><title>" + "Offline user" + "</title></book>")));
This is possible by two ways,
If payload item ID is same then automatically updation handled by system.
thankyou