Camphor sulfonic acid doped conducting polyaniline (PANI:CSA) was synthesized by self-stabilized dispersion polymerization (SSDP). Well ordered polymer chains grow at the interface between aqueous and organic phase at low temperature around -35 °C. Thus, the growing polymer chains act as a stabilizer, producing high quality polyaniline with high electrical conductivity and with low content of structural defects. Moreover, the PANI:CSA thin film shows an apparent Drude peak in the infrared region with a high d.c. conductivity of 550 Scm-1, and a high transmittance in the visible region. Using this highly conducting polyaniline as a transparent electrode, flexible polymer light-emitting diodes (PLEDs) and flexible polymer solar cells (PSCs) were fabricated on flexible poly(ethersulfone) (PES) substrates. The flexible PLEDs show high performance with a luminance of 2300 cdm-2 and a luminous efficiency of 1.6 cdA-1. In addition, flexible PSCs based on composites of regioregular poly (3-hexylthiophene) (rr-P3HT) as an electron donor and phenyl-C61-butyric acid methyl ester (PCBM) as an electron acceptor exhibit a reasonable power conversion efficiency (PCE) of 1.8 %.