For getting battery level, you can register an Intent for ACTION_BATTERY_CHANGED. For more information refer to the Android Battery API. If you just want to get the battery temperature, you can get it using the API itself. I think Android does not have an API for CPU temperature.
However, you can read the temperature from /sys/class/thermal/thermal_zone0/temp This is the way to get temperature on linux based systems and since Android is Unix based, I think you should be able to do it. I haven't tried it myself though