How to detect Activity?

hi everyone,

so I talk about watchface,

in the sim I use : 

var loc = Activity.getActivityInfo().currentLocation;

if loc = null that means for me no activity, and for the code on the sim that works great!

but on a real device (mine is Fenix 5) that is not so easy, even if no activity, for the watchface, loc is never null.

(actually i don't need my position but i use the same var for sunevent etc.)

is it a bug? or is there a better way to test if an activity is playing?

have a great day!