It inhabits mainly the lowlands, from open woodland to dense forest as well as in plantations; in the Himalayas foothills it ranges into submontane forest up to 1500 meters above mean sea level or so but not higher.