2019年10月25日 星期五

[Android] 省電【AutomateIt Pro】自動切換定位模式(高精確度及節約耗電量)

瀏覽數
手機型號: Zenfone3(ze520kl)+Android 6.01+root

利用 【AutomateIt Pro】+【AutomateIt Shell Plugin】這個2個APP,依照需求去切換定位模式,來達到省電目的。

這是這2個APP的Google Play的連結:
【AutomateIt Pro】:
 https://play.google.com/store/apps/details?id=AutomateItPro.mainPackage
【AutomateIt Shell Plugin】:
https://play.google.com/store/apps/details?id=com.smarterapps.automateitshellplugin



【AutomateIt Pro】這個APP與知名【Task】的功能相似,但使用方式比較簡單;就是當觸發某個事件時,就去執行某個動作。使用方式這裡不多做介紹了,可自行google搜尋使用方法,或可參考此篇: https://tinyurl.com/y68g6ur8
 

首先上網Google查詢 adb shell 的定位模式操作指令,來源參考:
https://forum.xda-developers.com/android/help/activate-disable-gps-adb-shell-t3307417

[高精確定位]: settings put secure location_providers_allowed +gps
[節約耗電量]: settings put secure location_providers_allowed -gps

知道Shell的指令後,開始定義【AutomateIt Pro】的規則。

想要自動切換的需求是:
WIFI 開啟的時候(通常在室內),切換為 [節約耗電量] (不使用GPS)
WIFI 關閉的時候(通常在室外),切換為 [高精確定位] (使用GPS)

設定方法如下(前提是手機必須root):

一.當然是先安裝【AutomateIt Pro】+ 【AutomateIt Shell Plugin】

請自行Google搜尋下載安裝。




二.開啟【AutomateIt Pro】

1. 新增一個規則,當WIFI On時,切換為 [節約耗電量] (不使用GPS)




2. 再新增一個規則,當WIFI Off時,切換 [高精確定位] (使用GPS)




三. 完工。

WIFI 開啟 or 關閉時,會自動切換定位模式。像平常在辦公室裡有WIFI,自動會切換到 [節約耗電量] (不使用GPS),這樣多少可以減少一些耗


PS:
可以到 AutomateIt 的規則市集下載:
WIFI ON時,切換為 [節約耗電量] (不使用GPS)
https://automateitapp.com/rule.php?id=53941

WIFI OFF時,切換為 [高精確定位] (使用GPS)
https://automateitapp.com/rule.php?id=43410










沒有留言: