>>413865651. Make sure there's no Purple light dens active in your zone
2. Go to the den you are interested in and save
3. Throw a piece, wait half a second and press Home button. Games hasn't saved yet but you can see if you get red light den or purple den
4. If red light, close the game, open and go step 3 again.
5. If purple light now you have a chance on your rare raid. If it's not what do you want, beat the raid and start again from step 3.
6. If it's the rare mob you are looking for, SAVE. If the pokemon escapes reset, your den will still be there.