Saturday, October 8, 2011

Nandi Hills, Bangalore

Hi folks,

After my android blog post, here it comes one travel blog post. I hope this may continue that every weekend I could have gone to some nice place. So here it comes the night out @ Nandi Hills.

How to Reach there ?
It's around 60-65 Kms from Bangalore City. And around 25 Kms from Airport. So if you are staying in Bangalore just go to Makeri Circle, take the straight road to Airport, and just before the bridge, there is a road which is heading towards Hyderabad, take the road and after around 5 kms you will find a left turn for Nandi Hills. Its 21 Kms from there.

What to See ??
Basically this is Sun-rise point, you can admire the Scenic beauty from the top peak. And it is awesome, and hide and seek of Sun makes it more awesome. After reaching there, you won't think that "on top of cloud" is just a phrase. Apart from the view, there are few gardens and temple over there. And off-course it was part of Tipu Sultan kindom, there is one big pond and Tipu Sultan's summer place.

When to go ?
I think if you leave Bangalore around 3:30 AM, it would be great as it will take you around 2 hrs to reach there, and most importantly the doors doesn't open till 6:15 AM. So you can plan accordingly. They charge for the tickets as well as parking tickets. One more thing if you have 4 wheeler, they will allow you to go till the top, otherwise you have to walk around 1 Km. But believe me this place is not meant for Cars or other 4 wheeler. As you will enjoy each and every minute of your bike ride.

Others
You will find many shops, if you want to purchase something like snacks or something. Even at the ticket counter also there is a shop for such items. And yeah, don't forget to enjoy the chai or coffee on the Highway. While returning you can stop at McD too, which have started Breakfast, believe me I was starving while returning back. Also carry your jacket, as it will be cold in night in Bangalore whatever season it is.

In last I can say, it is must see place in Bangalore. So just give it a try.

CountDownTimer a great alternate of AlarmManager in Android

Hi Guys,
few days back I was looking for a solution to execute a functionality after some time from my activity. Generally in these cases developer uses AlarmManager to send Action or Activity and handle it in their accordingly. But there are few limitations with AlarmManager like you have to set your alarm for a fix time from boot-up or start. So to overcome this I used CountDownTimer class. This is the same class which is used in StopWatch application, so it is reliable as well as easy to use. Although it’s use is pretty straight forward and mentioned in the API. I will explain it here with the same example.
Example :
new CountdownTimer(30000, 1000) {

 public void onTick(long millisUntilFinished) {

 mTextField.setText("seconds remaining: " + millisUntilFinished / 1000);

}

 public void onFinish() {

  mTextField.setText("done!");

}

 }.start();
Here 30,000(30 sec) is the timer till it will go, 1000(1 sec) is every step to reach there. Here there are two  methods which needs to be override, first is onTick() which will be called on every step. So it means it will be called on every second in this case till 29 sec. After that onFinish() method will be called and execution control will come out of it.
So suppose if you want to start some activity after 30 sec. just put that intent and sendBroadcast() in th onFinish() method.
Hope this will help you.