1. Android Central Question's Avatar
    I want show in my watch face a battery charging status indicator. I wrote the code below, it shows running ok with Watchmaker but when installed on the watch, it do not shows the battery charging.

    Code:
    Selecting the battery image:
    1)COLOR:
    "{bc}"=="Charging" and ({bl} < 100) and 'ff0000' or '0cff00'

    2)OPACITY:
    "{bc}" == "Discharging" and 0 or 100
    05-20-2019 12:54 PM
  2. B. Diddy's Avatar
    I moved this to the Wear OS forum for more specific traffic.
    05-21-2019 01:31 AM
  3. aa6vh's Avatar
    I think the syntax you entered is confusing LUA. Try:

    ("{bc}"=="Charging" and {bl} < 100) and "ff0000" or "0cff00"
    05-21-2019 09:48 AM
  4. alexandre-dock's Avatar
    I think the syntax you entered is confusing LUA. Try:

    ("{bc}"=="Charging" and {bl} < 100) and "ff0000" or "0cff00"
    -----------------------------------

    It is still not working! Seems only {bc} not works with android 5.1
    05-23-2019 12:31 PM
  5. aa6vh's Avatar
    Try creating a temporary text layer, and placing {bc} in it, to see what it says.

    Also remember that (bc) value for the watch will not work when your are running the watch face on your phone/tablet. Just like (bl) will reflect the phone's battery level (i.e. {bl}={pbl}).
    05-24-2019 09:40 AM
  6. alexandre-dock's Avatar
    That is right! For my surprise even {bc} or {pbc} or {pbl} works normal on the phone using watchmaker, but when i install on the watch android 5.1 it do not works either with {bc} or {pbc}. Probably the universal launcher/clockskincoco ? I´lll try creating a text layer.
    05-24-2019 12:18 PM
  7. alexandre-dock's Avatar
    That is right! For my surprise even {bc} or {pbc} or {pbl} works normal on the phone using watchmaker, but when i install on the watch android 5.1 it do not works either with {bc} or {pbc}. Probably the universal launcher/clockskincoco ? I´lll try creating a text layer.
    05-24-2019 07:07 PM
  8. alexandre-dock's Avatar
    GUYs !! FOUND the solution! {bc} returns "false" instead "Discharging" and "testtesttest" instead "Charging"
    05-24-2019 07:12 PM

Similar Threads

  1. Let's see the battery life
    By RaRa85 in forum OnePlus 7 & OnePlus 7 Pro
    Replies: 36
    Last Post: 01-15-2020, 05:13 PM
  2. How do you import Google Earth 'My Places' from pc to android?
    By asystole420 in forum General Help and How To
    Replies: 1
    Last Post: 06-22-2019, 05:54 PM
  3. NFC Issue with a Samsung s9+
    By Maglil55 in forum Android Apps
    Replies: 9
    Last Post: 05-29-2019, 11:12 PM
  4. Notification Issues on Android 8.0.0 on Axon 7
    By Android Central Question in forum Axon 7 & Axon 7 mini
    Replies: 1
    Last Post: 05-21-2019, 01:32 AM
  5. Notification Issues on Android 8.0.0 on Axon 7
    By Android Central Question in forum Ask a Question
    Replies: 0
    Last Post: 05-20-2019, 12:25 PM
LINK TO POST COPIED TO CLIPBOARD