How to display battery level and horseshoe on android app?


#1

I am newbie to android and muse.
I have downloaded and configured muse library in my android project
but i want to show that horseshoe and muse headset battery level on my app
can you tell me how can i display that horseshoe and battery level on my app?
is it in library?
is there any code or method?
Please help.
Thanks.


#2

Yes, you can do what you have described. You can use libmuse to get all required data, but you have to worry about graphics yourself. libmuse doesn’t provide any UI widgets (as of today, this may change in the future).

battery level is a part of BATTERY packet (com.interaxon.libmuse.Battery.CHARGE_PERCENTAGE_REMAINING) - http://android.choosemuse.com/enumcom_1_1interaxon_1_1libmuse_1_1_battery.html
horseshoe data is a part of horseshoe packet (com.interaxon.libmuse.MuseDataPacketType.HORSESHOE) - http://android.choosemuse.com/enumcom_1_1interaxon_1_1libmuse_1_1_muse_data_packet_type.html#a53f96306723aa52d660d6fc69631daeb

Take a look at our example app to see how you can registers listeners to listen for different type of packets from headband and receive necessary data.


#3

Thank you very much…
i got it.