On an Android Cupcake (1.5) enabled device, how do I check and activate the GPS?
GPS will be used if the user has allowed it to be used in its settings.
You can't explicitly switch this on anymore, but you don't have to - it's a privacy setting really, so you don't want to tweak it. If the user is OK with apps getting precise co-ordinates it'll be on. Then the location manager API will use GPS if it can.
If your app really isn't useful without GPS, and it's off, you can open the settings app at the right screen using an intent so the user can enable it.