I dont have any device to measure power, so that I use digital multimeter in series from the wall socket to the electronic device to get current and then paralel to get the voltage. I calculate the power consumed by multiplying current with voltage. Is this way of measuring valid?
It depends on the multimeter you have - especially the one measuring current and the device power.
You may have to include the voltage drop accross the ammeter - if you want to be very accurate.
If it is not the case than you can skip it and measure the way you described.
What you are measuring is "apparent" power ( V X I =VA). If the load has a significant reactive component (capacitors or inductors) then you have to measure the phase angle between the current and voltage and multiply your VA figure by the cos of the angle which gives you true ("real") power in watts. For some loads the correction could be as high as .7 :- W = .7 X V X I.
Frank