It is found in Brunei, Cocos (Keeling) Islands, Indonesia, Malaysia, Myanmar, Singapore, and Thailand. Its natural habitat is subtropical or tropical moist lowland forests. It typically is a resident of evergreen forests with pools or streams, but also ranges into large gardens with tall, densely foliated trees, such as the Bogor Botanical Gardens found in West Java as well as wooded groves in cultivated country, both sometimes not far from human habitations. It usually ranges in elevation from sea-level to roughly but can range up to about or more at locations like Mount Gede in West Java and Mount Singgalang in West Sumatra.