1. Are you ready for the Galaxy S20? Here is everything we know so far!

Detect if an approved device is nearby

Discussion in 'Android Apps & Games' started by RobSue, Jul 17, 2017.

  1. RobSue

    RobSue Newbie
    Thread Starter

    My wife is using a Samsung Tab S tablet with a plan that gives her less download than she uses.
    She also has a Galaxy S4 phone with more download than she uses.
    The plan is to create a Tasker profile to turn off the phone WiFi hotspot when she gets close to home and turn it on when she's away from home.
    The problem is that leaving WiFi hotspot on the whole time she's away could be a major and unnecessary drain on the battery.
    The question is: Is there any way of setting up her phone to "know" when the Tab S is nearby, or even better, when the Tab S screen has been activated so that the Hotspot can be activated at the right time?
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Here is a stripped-down version of what I use. Turn WiFi on if near xxxxxxxx. Turn WiFi off if not near xxxxxxxx. (Change xxxxxxxx to be your SSID.)

    The HotSpot would have to be on for this to work.

    Profile: tlaOfficeFar
    State: Not Wifi Connected [ SSID:xxxxxxxx MAC:* IP:* Active:Yes ]
    Enter: tlaOfficeFarEnter
    A1: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
    A2: Variable Split [ Name:%WIFII Splitter: Delete Base:Off ]
    A3: WiFi [ Set:Off ] If [ %WIFII2 !~ CONNECTION ]

    Profile: tlaOfficeNear
    State: Wifi Near [ SSID:xxxxxxxx MAC:* Capabilities:* Min. Activate Signal Level:4 Channel:0 Toggle Wifi:Off ]
    Enter: tlaOfficeNearEnter
    A1: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
    A2: WiFi [ Set:On ]

    … Thom
     
  3. What have you developed so far? You can long press on the task name and select settings / export / Description to Clipboard and then paste it into a post here.

    ... Thom
     
  4. RobSue

    RobSue Newbie
    Thread Starter

    All I have so far is a geo based profile that turns off the phone WiFi hotspot when she gets close to home and turn it on when she's away from home. .Your profile seems to do the same by checking the wifi status every hour.

    The next step is to turn on the Hotspot when away from home AND the Tab S is around. I can easily turn the Hotspot on when away from home but I only want to do that when the Tab S is nearby. How would I do that?
     
  5. My app is checking every minute. It turns WiFi off when away from the signal and on when near the signal.

    My experience is that GPS location triggering is unpredictable and can not be relied on.

    The answer to your question is to have one device determine where it is and send an intent to the other device. The other device reads the incoming intent and determines how close the other device is. If close enough it turns on the hotspot.

    ... Thom
     
  6. RobSue

    RobSue Newbie
    Thread Starter

    That sounds perfect.How do I send an intent? Never heard of that
     
  7. I suggest you Google "Tasker intent".

    You need to be aware that your solution is going to be a little complicated. There are tutorials online that can get you started. You then need to prototype something and get it working.

    GPS sensing is pretty flaky. Tower sensing is even more flaky. What works for one person may not work for another do to their physical location.

    ... Thom
     
    buathonghadchaiyapom likes this.

Tasker

Tasker Forum

net.dinglisch.android.taskerm

⚙No repetitive tasks for you, let your Android device handle it!⚙
Total Automation, From Settings to SMS. Here are only some
of the things you could do with Tasker. Its real power is the flexibility to combine contexts and tasks however you wish: https://tasker.joaoapps.com/exampleuses.htmlAutomations
Make your phone a true smart
phone! Why remember to change the volume every day when you leave home when your phone can do it for you? Automate stuff based on the app you're in
, the time of day
, your location
, your Wi-Fi network
, Received SMS or Calls
, the currently playing song
and many other (130+) states and events! Check out how easy it is to create an automation: https://www.youtube.com/watch?v=s6EAbLW5WSkActions
350+ actions allow you to truly customize your phone like never before! Send SMS, create notifications, change almost any system setting like Wifi Tether, Dark Mode, Always On Display, change any volume, control Do Not Disturb, open apps, file manipulation, control music playback, get your location... you get the idea. If you can think of it, Tasker can probably do it for you! Note: root is NOT (I repeat NOT) required for majority of the functions.
However, a few of the actions (like the Airplane Mode action and the Mobile Data action on some devices) require root. Regarding those few actions that do require root, this is because of Android security policies that developers cannot work around. ☑ Other Triggers
Manually trigger your actions via launcher shortcuts, quick setting tiles, widgets, long-pressing volume buttons, media buttons (like the ones on your BT headsets or headphones), Bixby button, Navigation Bar, Notificaitons and more! ☑ Join - Remote Tasker
Adding Join (https://play.google.com/store/apps/details?id=com.joaomgcd.join) to the mix will even allow you to trigger tasks from another Android device or PC! ☑ Scenes
Design your own UI and use it to display any info you want or trigger any task! ☑ App Creation
Create your own standalone apps to share or sell with the Tasker App Factory (https://play.google.com/store/apps/details?id=net.dinglisch.android.appfactory)! ☑ Developer Friendly
A lot of 3rd party developers already allow you to perform actions in their apps and listen to their events/states through Tasker! Check out a list of plugins https://tasker.joaoapps.com/pluginlist.html. You can also call most of the Web APIs from Tasker with the powerful HTTP Auth and HTTP Request actions! Check out an example https://youtu.be/yAt2D1XmgUI. ☑ 7 day trial - one time payment to unlock
Get it here: https://tasker.joaoapps.com/download.htmlUseful Links
Starter Guides: https://tasker.joaoapps.com/guides.html Pre-made projects: https://forum.joaoapps.com/index.php?resources/ Official Support Forumhttps://groups.google.com/forum/#!forum/tasker Community full of people willing to help: https://www.reddit.com/r/tasker/ It's not possible to fix problems reported via Play Store Comments so please use the "Report Issue To Developer" option in the app > Menu to do so. Note
: Tasker uses the BIND_DEVICE_ADMIN permission in order to provide the System Lock functionality

READ MORE
February 15, 2020
Last Updated
4.4
Rating
1M+
Installs
Loading...
Similar Threads - Detect approved device
  1. melani78
    Replies:
    2
    Views:
    482
  2. Daddyroid
    Replies:
    4
    Views:
    3,843
  3. RU2022
    Replies:
    3
    Views:
    1,055
  4. JSS1900
    Replies:
    8
    Views:
    2,500
  5. hzare
    Replies:
    1
    Views:
    968
  6. Yamil_alv
    Replies:
    1
    Views:
    3,669
  7. Bhavin Lathia
    Replies:
    4
    Views:
    3,410
  8. Rasil1127
    Replies:
    2
    Views:
    3,861
  9. App Update
    Replies:
    1
    Views:
    960
  10. kiranmatrixlee
    Replies:
    0
    Views:
    2,850

Share This Page

Loading...