 Hello everyone, my name is Mr. Sandesh Pare, I am currently working as an assistant professor in the department of computer science and engineering at Valchand Institute of Technology, Solapur. In this video, I am going to cover the topic called as native data handling related to the mobile application development in the Android. So at the end of this session, you will be able to understand the handling of different types of the data in Android applications. So let us start with some aspects which are related to the data in the Android applications. Until now, we deal with only user interface and the long running task in the Android applications through which we store the data, take the user data. And the only user interface is not the only source to get the data and there are intents which exchange this stored data in between them. So storing mechanism has two ways, one is local and one is remote one. You can store the data at local, locally or remotely. How we can store the data locally is through SD cards. SD card means secure digital cards which are emulated in the device only. You can store whatever data onto this because the data taken from the user interface and the long running task are volatile. Means once devices get off, then this data will be get vanished. So it is not permanent one. So we have to deal with them. That's why this techniques is introduced SD card and enterprise systems. SD card is the local one and we are going to see that enterprise systems. It is related to the storing of the data at a remote location. Means whatever the user's personal data is there, it is stored at the remote location at the enterprise server. It means some personalized data or some settings of the users are stored at the back end of the enterprise servers. Then they will get retrieved at the time of some transactions and whatever. And actually there are two types of data that is primitive one and complex one. And structured data also there, unstructured. We are now going to see what is the difference between them. Primitive data, complex data. And now we will see the SQLite database. It is related to store the data which is the relative data. It means the data is interrelated in between them. Otherwise unstructured data is one of the kind of data which is not interrelated one. So SQLite database and APS, it means application program interface is there. They have to deal with the storing of the data which is interrelated between them. It is called as the structured one. So first one we are going to see that a flat files. Flat files is one of the storage technique which stores the data that is a primitive one and complex one. And mostly the data in the flat file is in unstructured format. It is not interrelated between them. And you can see the flat file application as shown on the screen there. There is input text, you can input the text whatever you want to that. And another field is the text in the file. It means which file you are going to process that data. And there are two buttons also, read from file and write to file. That is the action means whatever the text provided there and the file given there, what action should be taken that is to read the file or to write to file. So regarding this there are two functions are there. As we have seen write to file is one function in that we can see there is output stream writer is the object which two parameters are provided there. That is user input dot txt that is the file in which action will be taken and another one is the mode that is private one. And another one mode is there that is append. Append means it simply happens the whatever data provided at the end. Private will vanish the previous data and this data is stored fresh. This is the difference between them. Then write will perform the write operation on that file. So text is provided as a parameter. And another one is the get file content that is read from file. And at that time now we are going to create the input stream object is there. And the file is passed as a parameter and until it becomes null then buffer reader will get that data in the step by step and that is stored into the string. This is the two operations related to the flat file. And whenever you emulated the SD card as I told you that local data is stored there in the Android virtual device we have to specify the size of the SD card. And it should be in the MB size it should not be so much large that because it consumes that much data from the random access memory. So it should be a small. So there is one question for you guys that flat file deal with which type of data and at least the method need to implement this one. So the answer is flat file are used to persist unstructured data that is I told you earlier that primitive and complex type of data. And to implement this we have already seen these two methods that is get file content that is for reading the data from the file and another one is the write to file that is the whatever data we are provided that will write the that text into that file. So these are two methods. Another one method is the shared preferences. Shared preferences is generally used to store some settings or the user's personal data. And it is mostly stored the data in a key value pair to it means some ringtones otherwise app settings etc. And besides that there are it again supports for the primitive and complex type of data and the whatever data is stored here it is in XML format and in the internal storage of the device. And whatever operations are there that means creation of that file that XML file and storage or the manipulation of that XML file is done in the internal storage of the memory. And besides that there are two more part of this shared preferences as you can see on the screen that there is one application which is related to the sending the SMS when call is not attendant. If suppose one call is not attendant by the user then it telemetrically send the particular message to that caller. There is one check box is there for sending the SMS it is either enabled or disabled and whatever message we have to send we have to specify in the message box and there is one SMS signature for the authentication that particular user is authentically send that data. You can see the save settings button is also there and as I told you earlier there are two types of part of it that are the preference setting activity one and SMS sender one. Preference setting activity deals with to check only that this facility is enabled or disabled one and that particular message is sent to caller by the SMS sender one. These are two parts of this shared preferences. Now you can see how saving the user settings preferences in the API at the screen. The particular object is created and again in the mode private one and whenever on click on that particular button it will check the enabling of this setting and a particular message is written in the text format and with a particular signature it will be sent to the caller. So another one type of data is the relational data as I told you earlier that there are two types of data that is unstructured one and structured one. Difference between that both of them is data is interrelated between them in the structured format and it is not in the unstructured format. So mainly SQLite database as I told you earlier that it is used to store this relational type of data and various operations are also performed on that data also. It is in short called as the CRUD operation. CRUD means CRUD. It full form of this is the creation, retrieving, updation and deletion. These operations are performed on the relational database and due to this SQLite using of this SQLite it becomes very like to perform these activities and reading from the database means we have to face their data inserting is the new insertion of new data to the tables and deleting particular data and updating means there is existing data we have to just update it as we can call it manipulation. We can perform this operation in terms of the relational data. So another one aspect is the sharing of the data between the apps. It is now a day of mandatory to use this data by various apps. It means you have to use the WhatsApp for that you have to face the contacts. You are now a days you are using the PTM for that you also require the contacts. Without that sharing of the data you cannot perform the next operations also. So sharing becomes various important aspect between the share across the apps. And there are two methods of the content provider that is inbuilt and custom inbuilt means the certain app has to deal with the system apps. For the sharing of data it is called inbuilt content provider and another one is custom means there are two third parties applications which are sharing the data between them. And enterprise data means as I told you earlier that remote data whatever stored at the remote location on the enterprise server it is called as the enterprise data. It is the difference between all of them. So these are some references I used to make this video. Thank you.