15
It varies from device to device: it is stored in the wpa_supplication.conf configuration file, but that can be customized from distribution to distribution. See for a couple of possible locations, but you will need to dig around your device for it.
There is no API support for reading/writing Wifi passwords for APKs not signed with the system key, so no: you won't be able to retrieve it.