Mock location only when application is in foreground

Can help with:
    java.lang.IllegalArgumentException: Provider "wonderpush-demo" unknown
Fix project setup