Preparation and in- tegration of metal oxide nanowires into functional devices