منصة شليله

by منصة شليله

Version 2 (November 17, 2020)

Download (8 downloads)

Demonstrates the use of the Wi-Fi and Hotspot Set State blocks, as well as non-rooted UI workarounds for Android Oreo and above, where the blocks may no longer work due to security changes. Feel free to take the pieces you need for your flows.

Thanks to Kevin for identifying the necessary lock screen UI element!
https://groups.google.com/forum/m/#!msg/automate-user/ymNjrewtODg/akJgitYtCAAJ

The flow detects whether the Oreo+ UI workaround is needed by checking for an exception from a Wi-Fi or Hotspot block during setup. In order for the UI method to be able to turn the hotspot or Wi-Fi setting on and off in Android Oreo and above, their tiles must be present in Quick Settings. To see if they are, expand the status bar by swiping down twice. If the Hotspot or Wi-Fi tile isn't present, tap the EDIT or “pen” button, then drag the tile to add it. If the Quick Setting tile on your device is labeled something other than "Hotspot" or "Wi-Fi", change the 'quickSettingTileText' variable near the top of the flow to match it. Note that for Wi-Fi, you'll need to surround the text with asterisk wildcards so that the setting can be found when you're connected to a Wi-Fi network.

Note that the flow needs to unlock the device as necessary to access Quick Settings. A separate demo flow for that is provided. That section and the Hotspot/Wi-Fi setting section are written as subroutines to make them easier to extract for your own flow.

Note: If you notice an exception in the log, that's normal and is the way the flow determines whether the non-root UI workaround is needed to enable the hotspot or Wi-Fi setting. The flow continues to run normally.

Updates:منصة-شليله
o Added handling for when the device is already unlocked
o Added positive re-locking for Android 9+
o Added a Variable Set block at the start of the flow to accommodate UIs where the text of the Hotspot tile is something other than "Hotspot"; if this is the case on your device, change the second block
o Fix hang when Hotspot tile isn't found
o Fix for Android tile UI class update
o Adaptations for Android 11 and new Automate behavior
o Refactored to also demonstrate how to work around new restrictions with the Wi-Fi Set State block, added demonstrations for settings, added separate flow to demonstrate unlocking the device

3.3 average rating from 3 reviews

5 stars
2
4 stars
0
3 stars
0
2 stars
0
1 star
0
Reports
1

Reviews and ratings can be submitted in the app.