You can't delete something from the queue, but you could flag things as skippable with something like this:
private static Collection<Object> cancelledThingIds;
public static void cancelThing(Object thingId){
cancelledThingIds.add(thingId);
}
@Override
protected void onHandleIntent(Intent intent) {
if (intent != null) {
final Object thing = intent.getExtra(EXTRA_THING);
if(cancelledThingIds.contains(thing.getId()))
cancelledThingIds.remove(thing);
else{
processThing(thing);
}
}
}
The retrying of items is much more straightforward though - simply create a new fresh intent for your intentservice and start it again. You could include something like a "attempt number" extra within the intent so you can do something else if you've tried too many times.