Homosexuality is not illegal in Indonesia but police said Monday that those detained had violated Indonesia's pornography laws.
Indonesia's low-profile LGBT community has been increasingly under siege in the past year, with prejudice fanned by stridently anti-gay comments from cabinet ministers and other high-profile Indonesians.
Last week, a Shariah court in the conservative province of Aceh sentenced two men to public caning for gay sex.