By Rav Mordechai Lebhar, Rosh Kollel Link Los Angeles,
based on a response to an article written by Rabbi Zvi Ryzman, author of
Hands-Free The Gemara in Berachot  writes that one who is praying Amida should hold in his handsTefillin, a Sefer Torah, a knife or a bowl and other such items which, Rashi explains, will distract a person from his prayers as he will be worried that they might fall. Maran also cites this Halacha  and gives Rashi’s reason – that one’s mind will be consumed with holding the item.
Notably, when the Rambam, cites this Halacha , he includes it among the list of things that are required as a proper attire for Tefilla. These also include, wearing proper clothes, not being barefoot, and the like. The Aharonim are perplexed by this classification of the Rambam. In the previous chapter, the Rambam has a list of things that disturb one’s concentration – like having to use the restroom and the like. Wouldn’t it make more sense to include the requirement to pray hands-free among the unacceptable Tefilla distractions?
To answer this, the Einaim LaMishpat distinguishes between one who holds a Sefer Torah or Tefillin, which is not a form of improper attire for Tefilla, yet prove to be a distraction, and between one who is holding a knife, a bowl, money etc. which is a form of undignified attire. However, the question would persist, as the Rambam counts all these items – Sefer Torah, Tefillin, knife etc. – as a form of undignified attire, and not as distractions. We must say that the Rambam understands that holding an item that may prove to be a distraction shows a lack of preparation and proper decorum for the Tefilla.
In any event, both the Rambam and Rashi agree that holding these holy, fragile or dangerous items is not appropriate during the Tefilla.
Lulavim & Siddurim However, there is an exception to this rule. The Poskim write that one may hold a Lulav in his hands while praying, since it is needed for a Mitzvah, therefore it will not cause the holder to be distracted.
The Terumat HaDeshen  was asked about holding a Siddur during the prayers. Would we compare it to holding a Sefer Torah or Tefillin, or can we say that, like a Lulav, it is being used for a Mitzvah and is not considered to be a distraction. He answered that since one is holding it for the mere purpose of praying from it – it is not comparable to Tefillin or a Sefer Torah in which case the holder is only holding them to protect them. In this vein, the Terumat HaDeshen explains, that the reason why it is permissible to hold a Lulav, is because holding a Lulav is a Mitzvah on its own right, and thus the holder is not burdened by carrying it, even if it is not expressly needed for the Amida itself.
[The Shulhan Aruch HaRav writes that it is still better not to hold anything while praying (one can place their Siddur on a table or the like). However, the consensus of the Poskim is that this would not be a problem.]
Still, even per the Terumat HaDeshen, clearly, if an item would prove to be a distraction one may not hold it during the Tefilla.
Smartphones In the case of a smartphone, if the messaging apps and other notifications would be disabled, it would be similar to holding a Siddur which the Terumat HaDeshen permits. However, if one can receive text-messages or other notifications while praying, it would obviously be considered a distraction, even if one is also using it to pray.
This can be a problem, especially according to the Bach, who maintains that if one holds one of the items listed in the Gemara during the Amida one does not fulfill his obligation of Tefilla. While the Taz argues on this, and Halacha L’Ma’ase we don’t follow this opinion, nevertheless one should seek to avoid this problem. [There are apps and settings that can turn off notifications to allow for the required distraction-free Tefilla.]
Other Berachot & Birkat HaMazon
While the Magen Avraham maintains that this prohibition applies even to Pesuke D’Zimra and Keri’at Shema, nevertheless, we do not find that such an issue exists with regards to other Berachot or Birkat HaMazon. One may add, that most Poskim regard printed material as having Kedusha. It would seem, that one would rather pray from a holy book then pray from a digital device.
 דף כ”ג
 או”ח סי’ צ”ו סי”א
 תפלה פ”ה ה”ה
 ברכות שם
 סי’ צ”ו