Complex sentence: Indonesian has the same function in Indonesia; even though Javanese has more native speakers, Indonesian is the sole official language and is spoken (often as a second language) throughout the country.
Split into simpler sentences: Indonesian has the same function in Indonesia, but Javanese has more native speakers. Still, Indonesian is the sole official language and is spoken, often as a second language, throughout the country.