1.Intent class:
The main functions are:
(1) Start the service;
(2) Start user-defined activity UI;
(3) Activate the system's own activity functions such as open dial, send text messages, open a video, open the camera and so on.
(4) Transfer of data, in addition to common types, can also transfer multimedia type of data
(5) A Bluetooth device can be obtained for Bluetooth communication
(6) A URI object can be obtained so that data such as local files can be manipulated
This class is equivalent to a transport tool that is frequently used in Android applications.
--------------------------------------------------------------------------------------------------------------- ----
2.Activity class:
This class is equivalent to an empty window, where you can add some layouts and controls. Before the OnCreate method, activity is actually a Phonewindow object, in which the layout XML is parsed into a view tree by means of the Setcontentview method. It is then shown on the Phonewindow. The Get component can be obtained by Findviewbyid and the R class in the project to obtain the ID.
3.Service class:
Just like the activity. This class is a subclass of the context, such as starting a service, subscribing to a broadcast, initiating other activity, and so on. The difference is that the service has no interface, startup and stop methods are a little different from the activity.
There are two types of services that are started and bound.
--------------------------------------------------------------------------------------------------------------- ----
4.BroadcastReceiver class:
This class can be registered Registerxxx by the object of the context, that is, the subscription. A broadcast can be sent by means of the Sendxxx method, and any object that subscribes to the broadcast can receive the broadcast. Typically, a actionfilter is required for filtering.
--------------------------------------------------------------------------------------------------------------- ----
5.ContentProvider class:
This class is responsible for the operation of the data interface unified, commonly used data additions and deletions have, the problem is inherited this class to be responsible for the specific implementation of the method. The usual parameters are the URI object, it's a lot of form, phone book, SMS and other data can be obtained. Corresponding to the ContentProvider is the Contentresolver object, this class is only responsible for the management of the data, it should actually be contentprovider object at the bottom of the implementation, on the surface is this Contentresolver is making a mess. Contentresolver can be obtained through context objects such as activity or service.
================================================================
The relationship between ContentProvider and interface is weakest in the four components, and is basically used independently. The other 3 are in order to reduce the interface relationship in accordance with the above sequence. 4 large components can be configured in the Androidmanifet.xml file.
Special function Development also needs to configure a certain permission: Android.permmition.xxx.
================================================================
Finally, talk about Bluetooth and WiFi.
Both are an interface, and the socket is the one that is really used for communication. Both need to be scanned to signal and then connected.
WiFi can get IP address while Bluetooth cannot.
Recent Learning summary about Android