The current study investigates the interaction between a fiber-shaped piezoelectric sensor (the inhomogeneity) and a nearby crack. The piezoelectric sensor is embedded in a non-piezoelectric elastic matrix which contains a crack. The matrix is subjected to a far field in-plane tension and a far field anti-plane electric field. With the stress distribution outside the inhomogeneity obtained in part I of the work, the interaction between the inhomogeneity and the crack is partially decoupled through a decomposition process. A set of integral equations in the crack domain is formulated through the edge dislocation theory. The expressions for the stress intensity factors are then obtained in terms of the asymptotic values of the dislocation density functions solved from the integral equations. The analytical solutions presented in this paper have been checked and confirmed by finite element analysis results.