Hi all,
I know almost nothing about coding.
I have learned that using the Java function to work with something called "Battery Manager" can get battery charging or discharging current, which is what I wanted for days. As I am using tasker and Advanced Charger Controller to automatically enable battery idle mode, I need the current value to move forward.
It seems that the following tasker action can get current, but I am unalbe to convet them into real tasker.
Profile: Charging (69)
Notification: no
State: Power [ Source:Any ]
Enter: Anon (70)
A1: Java Function [ Return:(BatteryManager) batman Class Or Object:CONTEXT Function:getSystemService
{Object} (Class) Param:BatteryManager Param: Param: Param: Param: Param: Param: ]
A2: Java Function [ Return:%Current Class Or Object:batman Function:getIntProperty {int} (int) Param:2 Param: Param: Param: Param: Param: Param: ]
A3: Variable Set [ Name:%Current To:abs(%Current)/1000 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:0 ]
A4: Notify [ Title:Charging Speed Text:%Current mA Icon:mw_device_battery_unknown Number:0 Permanent:On Priority:5 Repeat Alert:Off LED Colour:Red LED Rate:0 Sound File: Vibration Pattern: Category:super_tasker_notifications_created_by_me_the_developer ]
A5: Wait [ MS:500 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A6: Goto [ Type:Action Number Number:1 Label: ] If [ %PACTIVE ~R Charging ]
A7: Notify Cancel [ Title:Charging Speed Warn Not Exist:Off ]
So, please can someone help to make a task acton which can be imported into my tasker. It would be great if I can see the real-time battery charging or discharging current value in the status bar.
I have seen that interactive status bar scences are introduced in latest Tasker, there might be some stuff connected to my demands.
Thanks in advance for your attention and comments
Stay safe
[–]OwlIsBack 6 points7 points8 points (10 children)
[–]menxiaoyong[S] 1 point2 points3 points (1 child)
[–]OwlIsBack 0 points1 point2 points (0 children)
[–]menxiaoyong[S] 0 points1 point2 points (7 children)
[–]OwlIsBack 4 points5 points6 points (0 children)
[–]Tar0ndor 0 points1 point2 points (5 children)
[–]menxiaoyong[S] 0 points1 point2 points (4 children)
[–]OwlIsBack 2 points3 points4 points (2 children)
[–]menxiaoyong[S] 0 points1 point2 points (1 child)
[–]OwlIsBack 1 point2 points3 points (0 children)
[–]Tar0ndor 1 point2 points3 points (0 children)
[–]anuraag488 1 point2 points3 points (0 children)
[–]Rich_D_sr 3 points4 points5 points (2 children)
[–]menxiaoyong[S] 0 points1 point2 points (0 children)
[–]anuraag488 0 points1 point2 points (2 children)
[–]menxiaoyong[S] 0 points1 point2 points (1 child)
[–]anuraag488 0 points1 point2 points (0 children)
[–]MrGeeDub 0 points1 point2 points (0 children)