Assuming I understand completely, your last shot was in Jan 2017, before you visited your boyfriend.
Depo Provera is 99% effective at preventing pregnancies for up to 12 – 14 weeks.
I do not know if you had sex 12 weeks after your last shot (ie, from April 2017 onwards). If you did, there’s a chance of pregnancy, and doctors will request for a pregnancy test before restarting you on Depo Provera contraception.
Can I take the jab again?
Yes, you can restart Depo-Provera, but please bear in mind that use for longer than 2 years MAY increase the risk of osteoporosis, and may not be the most suitable contraception option for your requirements.
I’d suggest for you to consult a doctor formally – he will be able to best advise you on the right contraception choice to suit your needs.
Will I still be protected if I am only taking the jab in an ad-doc basis?
If you abstained from April 2017 onwards, then yes, getting the jab before you visit your boyfriend will protect you from pregnancy, for up to 12 weeks afterwards.
Cheers