In this paper, a novel electrochromic material of 1,3,4-oxadiazole-extended viologen derivative with good coplanarity and electron acceptor-electron donor-electron acceptor structure, BPYO-C6H13, was synthesized, and a polyacrylamide-sodium alginate dual network hydrogel (PAM-SA) with advantages of low cost, environmental protection, good biocompatibility, high optical transmittance (>85 %), good mechanical properties and good ionic conductivity (16.61 mS cm(-1)) was developed as the electrochromic hydrogel matrix for gel-state electrochromic devices based on BPYO-C6H13 (PAM-SA-ECD). BPYO-C6H13 showed good electrochromic properties in both solution-state electrochromic devices and gel-state electrochromic devices, and PAM-SA-ECD had a lower operating voltage (-1.4 V versus-1.7 V), a higher optical contrast (48.4% versus 33.1 % and 22.1 %) as well as a higher coloration efficiency (348.7 cm(2)/C versus 234.8 and 120.7 cm(2)/C). Compared to PAM-SA gel-state electrochromic devices based on 1,1 '-dihexyl-[4,4 '-bipyridine]-1,1 '-diium, BPYO-C6H13 with 1,3,4-oxadiazole it-extender showed a different colored state (green versus pink) and a higher coloration efficiency (348.7 cm(2)/ C versus 275.9 cm(2)/C) due to different conjugated structure. PAM-SA-ECD was applied in smart windows and solar cell-powered displays, suggesting BPYO-C6H13 is promising in energy-saving fields.