当前位置: 动力学知识库 > 问答 > 编程问答 >

Convert from string to long in a service in android..?

问题描述:

In my application I am passing a string value from the edittext to the service where I have defined this

( t.scheduleAtFixedRate(new Task(), 0, long); )

How to convert from string to long in a service...? or is there any other method to pass a long value to the service...?

网友答案:

this method use to convert string to Long.

long l = Long.parseLong(string);
网友答案:

You can use this method for convert your string to long and after that you have passed that long variable to your service

long l = Long.parseLong(yourstring);
分享给朋友:
您可能感兴趣的文章:
随机阅读: