开发者

Changing double to character array in Android

开发者 https://www.devze.com 2023-03-11 21:21 出处:网络
I need to change a double into a character array.In other words I have a variable that is a double and I would like to represent it as a character array.I want to do this because I am using the USB po

I need to change a double into a character array. In other words I have a variable that is a double and I would like to represent it as a character array. I want to do this because I am using the USB port on my Nexus On开发者_运维技巧e as a serial port and the only way I can get it to work is to send characters and I have GPS data that I want to send out which are doubles.


char[] characters = String.valueOf(myDoubleVariable).toCharArray();

0

精彩评论

暂无评论...
验证码 换一张
取 消