# Boolean variables missing - Android

**URL:** <https://community.particle.io/t/boolean-variables-missing-android/48670>\
**Category:** Developer Tools\
**Created:** [March 25, 2019, 4:25pm UTC](https://community.particle.io/t/boolean-variables-missing-android/48670 "2019-03-25T16:25:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenmacd](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kenmacd/32/18154_2.png) [@kenmacd](https://community.particle.io/u/kenmacd)\
**Post date:** [March 25, 2019, 4:25pm UTC](https://community.particle.io/t/boolean-variables-missing-android/48670/1 "2019-03-25T16:25:20Z")

</div>

Through the android app I can see all my `Double` and `Integer`variables, but I do not see the boolean ones. They show up fine on the web console. Is this a known issue?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [March 25, 2019, 5:57pm UTC](https://community.particle.io/t/boolean-variables-missing-android/48670/2 "2019-03-25T17:57:10Z")

</div>

There is no special treatment for `bool`. They will be treated as `int`.

BTW, as per the docs for [`Particle.variable()`](https://docs.particle.io/reference/device-os/firmware/photon/#particle-variable-) the only supported types are `int`, `double` and `String`/`char[]`/`char*`

Can you show the code that exposes the respective variables?

---

<div class="post-metadata">

**Author:** ![kenmacd](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kenmacd/32/18154_2.png) [@kenmacd](https://community.particle.io/u/kenmacd)\
**Post date:** [March 25, 2019, 6:52pm UTC](https://community.particle.io/t/boolean-variables-missing-android/48670/3 "2019-03-25T18:52:32Z")

</div>

```auto
     Particle.variable(String::format("%s_heat", name.c_str()).c_str(), &m_heating, BOOLEAN);

```

(`m_heating` is a class member. I’m not sure it has to use the old syntax, but the new one didn’t work the first time I tried it)

In the android app it’s completely missing. In the web console is shows up and works fine:

![boot](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/8/6/8677c758d95d72f6ba11b2103899f30995019db2.png)

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [March 26, 2019, 4:29am UTC](https://community.particle.io/t/boolean-variables-missing-android/48670/4 "2019-03-26T04:29:26Z")

</div>

I guess it may be that the mobile app adheres to the documented behaviour (where BOOLEAN is a not explicitly supported datatype) more closely than the console.

I’m surprised that you can even pass `BOOLEAN` as datatype for the old syntax - it’s cretainly _not_ expected to work.

@rickkas7, any idea why the discrepancy?

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [March 26, 2019, 11:38am UTC](https://community.particle.io/t/boolean-variables-missing-android/48670/5 "2019-03-26T11:38:15Z")

</div>

It appears to be a combination of a few factors. BOOLEAN has been a data type for quite some time, but it has never been documented.

> <https://github.com/particle-iot/device-os/blob/develop/communication/src/variables.h#L72>

Since it was never documented, the Android SDK does not support it.

The easiest workaround for now is to cast as an int.
