added ios backgrounding support to match current android functionality