charging lithium ion battery of 3.7v
I want when my device is connected to the adapter and if the battery
  is going full charge then my device should be run from the direct
  power supply, hence battery charge won't drain until disconnect of
  power.


If I read you correctly then maybe use a relay to divert supply from the battery to the adapter output: -



Whenever the adapter is producing power, the relay activates and the load is connected to the adaptor output. If the AC supply fails, then the load is connected to the battery.

If this is what you want then a few other details need to be considered: -


Adapter output voltage range
Load voltage range (might have to add a regulator)
Reverse diode across the relay coil
A hold-up capacitor across the load for when the relay switches (10 ms glitch protection).
Possibly use a MOSFET power OR-gate instead of relay