Prayer & Obedience
Ps 66:18 If I regard iniquity in my heart, the Lord will not hear me:
Any reason for unanswered prayer is always on the human side. God has promised to answer prayer. He cannot lie.
Reasons for Unanswered prayer
We should often examine our hearts for sin, pride, selfishness, lack of faith, etc. We should look for whatever might hinder prayer.
When Jesus prayed He always received the answer because He was always in the Father's perfect will.
Though we do not earn the right to answered prayer, we can position ourselves to receive or not receive - to be heard or not to be heard.
1Jo 5:14 And this is the confidence that we have in him, that, if we ask any thing according to his will, he heareth us:
1Jo 5:15 And if we know that he hear us, whatsoever we ask, we know that we have the petitions that we desired of him.