Ionic history doesnt work properly for my android app

I am using $location.path everywhere in my code to redirect between pages.
Does this affect $ionicHistory, because my back button shows up randomly. Some times it shows and other times it doesn’t.

Do i need to use $state.go for redirection always?


Can any body help me with this?