0

I'm making an Android app which would make the phone go on silent or in vibration mode at a user defined location.

I've learned how to toggle between silent mode to normal mode and to get the current location.

I want to know how can I turn my phone silent at a particular location even the app is not running?. Any help appreciated and atleast provide me some stuff..,Thank you

Jz Another Dev
  • 123
  • 2
  • 10
  • 1
    Can't control the phone without the app running. It at least needs to be running in the background I think. – Billy Ferguson Jul 26 '17 at 12:21
  • @BillyFerguson is right. and as far as i knw Vinod imust be having a service to continuously fetch location, so what you can do is if you are not having app running in background, first make a service for fetching location and when trigger is reached do the desired thing. – Ashwani Jul 26 '17 at 12:25
  • You can run things in the background while the app is open, but the phone is locked. Just put a radius around the location you want and check if your current location is within that radius. Once it is, run the code you wrote to make the phone go silent. – Billy Ferguson Jul 26 '17 at 13:16
  • @BillyFerguson can you give me some reference link .? – Jz Another Dev Jul 26 '17 at 16:22
  • https://stackoverflow.com/questions/15472383/how-can-i-run-code-on-a-background-thread-on-android – Billy Ferguson Jul 26 '17 at 16:41
  • @BillyFerguson is there any open source code available .? – Jz Another Dev Jul 26 '17 at 17:04
  • That link was like 4 lines of code... – Billy Ferguson Jul 26 '17 at 17:06

0 Answers0