by Артём Емельянов
If does not work - check Your permissions!!!
I recommend to add widget of this flow on the home screen. By pressing an icon of widget dialog window with three type of preferred network will be opened: 2G, 3G or 4G. Choose and it will be switched. After switching if ok - got message "done" if not ok - "not done".
If in Your phone another standards - change the flow in the bottom /preferred network type/.