Metal-ion doped luminescent thin films for optoelectronic applications