Alma 34:26 - 34:30
Alma 34: 26 But this is not all; ye must pour out your souls in your closets, and your secret places, and in your wilderness.
In addition, you can and should pray if needed when by yourself, unseen by anyone. You can even pray if in the wilderness out of sight.
This is a perfect measurement of one devotion to God. If you are praying without anyone seeing you and that you don’t need anyone to see you praying, you are a true disciple. And if you are praying in the correct manner, you are truly showing that you have faith that you are being heard and the things you are talking about are being noted and processed by our Father in Heaven.
Alma 34: 27 Yea, and when you do not cry unto the Lord, let your hearts be full, drawn out in prayer unto him continually for your welfare, and also for the welfare of those who are around you.
Now when you are not in formally praying to God you can have Him in your mind the rest of the time. You can be thinking about what you want to pray for in relation to yourself and others around you that you see are in need as well.
Alma 34: 28 And now behold, my beloved brethren, I say unto you, do not suppose that this is all; for after ye have done all these things, if ye turn away the needy, and the naked, and visit not the sick and afflicted, and impart of your substance, if ye have, to those who stand in need—I say unto you, if ye do not any of these things, behold, your prayer is vain, and availeth you nothing, and ye are as hypocrites who do deny the faith.
But this not even all you can do. If you turn your back on the poor and the needy then your prayers will have no weight with God. You are a fake if you refuse to help the poor while praying to God for their welfare. This is a sign of a true hypocrite.
Part of the gospel plan is that one prays for something then get up and tries to do something about it. Praying is just words. Actions show true commitment and a real desire to see what you are praying for comes to pass. Praying for something and then do nothing to make it happen is a waste of time and God will have none of it. Your prayer will be noted, but unless you are willing to doing something about it, that is all that happens.
Alma 34: 29 Therefore, if ye do not remember to be charitable, ye are as dross, which the refiners do cast out, (it being of no worth) and is trodden under foot of men.
So if one prays but is not forgiving of help to those who need it, you are not taken seriously by God. You are no better than what is left over after the making of iron from iron ore. The only thing it is good for base layer for roads.
Alma 34: 30 And now, my brethren, I would that, after ye have received so many witnesses, seeing that the holy scriptures testify of these things, ye come forth and bring fruit unto repentance.
Amulek pleads to his hearers that they act on what he and Alma have been preaching to them. Because now they have living witnesses as well as the scriptures to verify what they have been told about prayer and the need for repentance.