Relay switching issue between 2 sources

hello friend thanks for your reply and sorry if i made mistakes...

I am doing a project to measure inclination angle in x axis and send the inclination through bluetooth module...and the citcuit is working in usb(or 5v adapter) and 3.7v li-ion battery....when adapter supply is off then need to switch the source to battery.. i am using a rely for this purpose... and alos need to measure the battery voltage by adc and indicate the battery status via a led bargraph... i am using li-ion battery cell with a charging ckt...i use usb supply to charge the battery.. please ask me if you need to know anymore information.. thank you friend