Search for solar and cosmic gamma rays