The matches will also involve Malaga and one more club yet to be confirmed, and will take place on August 2 and 3.
Newcastle manager Alan Pardew said: "This is a fantastic opportunity to play in such an excellent tournament as the Schalke 04 Cup.
"We will be facing top-quality opposition and hopefully it will form part of a successful pre-season for us ahead of the 2014/15 season.
"I am very pleased it has been organised and announced early for the sake of our fans.
"This will give them the opportunity to travel in great numbers - as they always do - to enjoy a fabulous city and the football that will accompany it."