Necromancy, consulting the dead to determine the future was strictly forbidden by God (Leviticus 19:31 ).
Whatever the explanation of this mysterious affair, the medium was used in some way to convey to Saul that the impending battle would bring death, would dash his hopes for a dynasty and would conclude his reign, with a devastating defeat of Israel that would leave
the nation at the mercy of the Philistines, the very people against whom he had struggled all his years as king. All this would come as Samuel had previously announced. (1 Samuel 15:26,28 )." N.I.V. Study Bible
Even when in predicaments of our own choosing God can preserve and deliver us. The Lord worked on the hearts of the Philistine lords, rousing distrust of David (1 Samuel 29:4-5 ). Apprehension can awaken in us the trust in THE PRESERVING POWER OF GOD.
David had possibly been praying:
Deliverances release a new song of appreciative love to the Lord. As David and his men left in the early dawn, the battle field where they could have been compromised, the song in their hearts could well have had the words of:
When God in grace delivers, no credit belongs to the one delivered. Achish, in this incident, shows up well - his was genuine trust misplaced (1 Samuel 29:9 ). He dismissed David with "Go in peace." (1 Samuel 29:7 KJV). This is the Lord working. All credit
and praise belong to Him.
While David and his men were away playing a part for their Philistine benefactor - the Amalekites attacked Ziklak (1 Samuel 30:1-2 ).
God's restraining hand protects the fulfilment of His own wonderful purposes. To cover his tracks David in his raids had left no witness - yet the Amalekites did not slay the women and children in Ziklak. (1 Samuel 30:3-5 ).
Remembering God's promises and His dependability will give courage and strength to leadership under blame and stress.
David enquired of God (1 Samuel 30:7-8 ), and is told to pursue the attackers, and the promise of recovery of all was made by the Lord.
An inhuman master left his sick slave to perish by the wayside (1 Samuel 30:14-15 ). Kindness shown to him by David made him willing to lead David to the troop (1 Samuel 30:14-15 ). God turned for good what a man meant for evil.
God restored all plus great spoils. David used his excess supplies to bless his friends in Judah (1 Samuel 30:26-31 ), and so established his goodwill with them. These very citizens of Judah later named him king (2 Samuel 2:1-4 ). We too should use what
God has restored to us to advance the Lord's kingdom.
To rebel against the instructions of God's word brings fearful consequences. Saul's stubbornness in disobeying God is described by Samuel in revealing terms.
That fearful battlefield is referred to by God in,
The deaths of Saul and his sons fulfilled the prophecy of 1 Samuel 28:19. Stubborn self-will unquenched and unyielded to God can bring self-destruction.
Having stubbornly lived by self-will, he now took into his own hands his death. Defeat of God's mighty men is published and rejoiced over by the enemies.
The enemies of the cross are no different today.
4.15. PRACTICED NECROMANCY (1 Samuel 28:3-25)
1 Samuel 28:12 "And when the woman saw Samuel, ..."
"This episode has been understood in many different ways, among them the following:

God permitted the spirit of Samuel to appear to the woman. 
The woman had contact with an evil or devilish spirit in the form of Samuel, by whom she was deceived and controlled. 
By using parapsychological powers such as telepathy or clairvoyance, the woman was able to discern Saul's thoughts and picture Samuel in her mind.
Dake reasons that this was not Samuel (1 Samuel 28:20 ). Here, abbreviated, are some of his arguments:
If God had refused to answer the king by the Holy Spirit, He surely would not answer him by a demon spirit (1 Samuel 28:7-19; 1 Chronicles 10:13,14 ).
It is clearly stated that Saul sought information from demons, not from God who refused to answer him (1 Samuel 28:7-8 ).
The Bible plainly teaches that communication with the dead can be demon spirits imitating departed loved ones. (1 Samuel 28:7-19; Deuteronomy 18:11; 1 Chronicles 10:13-14; Isaiah 8:19 ).
God could not allow Samuel to communicate through a witch.
This seeming appearance of Samuel ... was the familiar spirit imitating and impersonating him. (1 Chronicles 10:13,14 ).
The demon spirit practically revealed his identity when he said that Saul and his sons would be with him tomorrow.
There is no record of God seeking to intercept the communication of demons and men.
It is stated in 1 Chronicles 10:13-14 that Saul died from his previous sins, and also for sinning against the word of the Lord, which forbad witches, and traffic with demons, and for asking counsel of one that had a familiar spirit, to inquire of it, and not of the Lord."
Finis Jenning Dake
"Jesus taught that it is impossible for the dead to communicate with living persons on earth. There was an impassable gulf between the compartments so that they could not go from one place to the other, nor go
back to earth. (Luke 16:26-31 ). The view that God actually brought Samuel back is supported by the ancient rabbis. This is attested in the LXX translation of 1 Chronicles 10:13b - 'and Samuel the prophet made answer to
him', and by Ecclesiasticus 46:20. This view was held by Justin Martyr, Origen, and Augustine." Wycliffe Commentary
4.16. PROPER RELEASE (1 Samuel 29:1-11)
Psalm 16:1 "Preserve me, O God: for in thee do I put my trust."
Psalm 145:20 "The LORD preserveth all them that love him: ..."
4.17. PROPERTY RECOVERED (1 Samuel 30:1-31)
4.17.1. OCCUPATION WITH DECEPTION CAN PUT OUR FAMILY AT RISK
"When we go abroad in the way of duty, we can comfortably hope that God will take care of our families in our absence, but not otherwise." Matthew Henry
"Whether they spared them to lead them in triumph, or sell them, or use them for slaves, God's hand must be acknowledged, who designed to make use of the Amalekites, for the correction, but not for the
destruction of the house of David." Matthew Henry
4.17.2. LEADERSHIP WILL FIND THE BLAME PLACED SQUARELY ON THEM WHEN THINGS GO WRONG
1 Samuel 30:6 "And David was greatly distressed; for the people spake of stoning him, because the soul of all the people was grieved, every man for
his sons and for his daughters: ..."
1 Samuel 30:6 "... But David strengthened himself in the Lord his God."
4.17.3. THE LORD CAN TURN THE WRONGS OF MEN TO THE GOOD OF HIS PEOPLE
4.17.4. RECOVERY CAN BE SO GREAT MANY CAN SHARE THE ABUNDANT SUPPLIES
4.18. PUNISHED DISOBEDIENCE (1 Samuel 31:1-7)
1 Samuel 15:23 "For rebellion is as the sin of witchcraft, and stubbornness is as iniquity and idolatry ..."
Hosea 13:11 "I gave you a king in My anger, And took him away in My wrath."
1 Samuel 31:4 "... Therefore Saul took a sword, and fell upon it."
1 Samuel 31:9 "And they cut off his head, and stripped off his armour, and sent into the land of the Philistines round about, to publish it in the house
of their idols, and among the people."