**1. Introduction**

The Internet of Things (IoT) is a network of intelligent devices ranging from home appliances to industrial equipment that can become connected to the Internet, monitor themselves, send contextual information such as pressure, location, and temperature, and communicate

somehow, anytime, anywhere on the planet (e.g., a milk carton sending sensor and identification information to a radio-frequency identification (RFID) reader when the temperature is getting higher than a threshold or when the milk carton is moved to a hot place) [1]. IoT means "connecting anyone, anything, anytime, anyplace, any service and any network" [1]. The concept of IoT has been extended by Cisco to Internet of Everything (IoE) to include in addition to things (machine-to-machine (M2M)), people (technology-assisted people-to-people (P2P)) and processes (machine-to-people (M2P)) interactions [2]. Cisco [2] defines Internet of Everything (IoE) as "the intelligent connection of people, process, data and things" [2], englobing interactions and communications generated by users while using a variety of networked devices (e.g., if a person forgot if s/he left the oven on at home, s/he wouldn't have to run back home to check it as s/he could just use a specific application and do it remotely using her/his smartphone) [2]. The proliferation of mobile connectivity and the decreasing prices of sensors and processors are encouraging the rapid growth of the IoT and IoE. Smart devices, for example, smartphones, smartwatches, PDAs, phablets, and tablets, will be the primary interaction tools used by people in a connected environment including cars, homes, and workplaces. Gartner expects in [3] that "the number of connected things and devices to rise to 25 billion by 2020 while other more aggressive estimates put the figure at 50 billion" [3]. "For this to be realized we need to have devices that are not only smart but should be able to access the Internet without being connected to a physical local area network (LAN) or wireless fidelity (Wi-Fi) network, should have an independent power source (e.g. battery), and should have the ability to sense the physical environment and send context information seamlessly" [3]. In today's world of emerging technologies, this could be made a reality: RFID, Bluetooth, 3G, 4G, 5G, wireless sensor networks, etc., along with long-lasting batteries, all bundled in one inexpensive, small, light, and portable device, which is the smartphone.

Equipped with the aforementioned technologies stated above, the smartphone gathers context data about the user (e.g., geolocation, temperature, health conditions, etc.) and interacts seamlessly with various devices using different types of connections such as Bluetooth, nearfield communications (NFC), Wi-Fi, etc. Therefore, the smartphone can be considered as the user's ultimate device for IoT and IoE interactions and control. Big data, mobility, and cloud services are the principal parts of IoE concept, and using the smartphones everywhere is helping the IoE movement forward. Many services can be done in real time using the cloud and smartphones, for example, we can use our smartphone to order items online quickly, use an application to see if a specific store has an item in stock, or even better check how big is the queue in this store, order an item, then let customer services know that you are on your way to pick it up.

In this chapter, we will give an overview about the Smartphones' enabling technologies for the Internet of Things (IoT) and Internet of Everything (IoE), such as RFID, NFC, optical tags and quick response codes, Bluetooth, etc. We will also discuss the different application areas of IoT and IoE through the use of smartphones interconnected to other devices and show how the smartphone behaves in a cloud environment using different offered services. Finally, we will state the future opportunities and challenges of IoT and IoE applications. Some of the opportunities that will be discussed include context and ubiquitous services. Challenges will target basically the areas of privacy and security.
