Question

I need to obtain time from my AnalogClock as a String and pass it as argument in a method. Wonder whats the method of AnalogClock to return current Time.

Thank you.

Was it helpful?

Solution

AnalogClock widget doesn't have methods/properties for accessing the time. You need to create a new Date() object and then apply DateFormat.format method to it.

OTHER TIPS

here the you can get it what you want i used it for my application for analog clock in my program you will get that i get the current time in string . you can click link for more in analog clock

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top