Content Provider – Part 3 – insert, delete, update, getType

Content Provider – Part 3 – insert, delete, update, getType

Please read the Part 1 and Part 2 insert First, create the variables needed for an insert get the code from the Urimatcher and create a switch statement for every kind of URI. Then insert the new row Create the rowUri with the help of ContentUris class and its method withAppendId To execute it: delete The same as insert, but change the switch statement And you can execute it: update and execute it : getType It returns the mime type of the data in the Content Provider. And because maybe…

Content Provider – Part 3 – insert, delete, update, getType Read More

Android – SQLite insert, delete and tip

Android – SQLite insert, delete and tip

You can read about SQLiteOpenHelper here. insert To insert a record in a table you need: a set of values using ContentValues class the table name delete To delete a record from a table you need: the table name selection string selection arguments array Tip It is not recommended to execute any database operation on the Main/UI thread. So use AsyncTask, override the doInBackground method and execute the database operations. THE END!!! Android – SQLite insert, delete and tip

Android – SQLite insert, delete and tip Read More

Windows 10 – People App, import,add and delete contacts and accounts

Windows 10 – People App, import,add and delete contacts and accounts

People app is a simple address book. It shows your contacts and their information. You need to have an online account. Let’s see how to import, add and delete accounts and contacts. Start the People App. If you haven’t imported any contacts you will see the following screen Add a contact Click the + sign at the top left of the app window You can add photo, phone and email address when you are ready click the Save button Now you can see the contact at the main screen Edit…

Windows 10 – People App, import,add and delete contacts and accounts Read More

Ubuntu 18.04 – shell commands copy, move and delete items (files/directories)

Ubuntu 18.04 – shell commands copy, move and delete items (files/directories)

Copy – Use cp if you want to copy files and directories Some Options -n does not overwrite a file that exists -i promts you before overwriting a file -u overwrites if source file is newer Move/Rename files with mv Some Options -n does not overwrite a file that exists -i promts you before overwriting a file -u overwrites if source file is newer Remove file and directories with rm Some Options -f ignore nonexistent files and arguments, never prompt -i promts you before overwriting a file -r remove directories…

Ubuntu 18.04 – shell commands copy, move and delete items (files/directories) Read More

Windows 10 – File Explorer Select, rename and delete files/folders

Screenshot 20190118 083137

Select files You can select multiple files by pressing and holding Ctrl and click the files you want to select. An other way to select multiple files is by pressing and holding Shift and click the first and the last file. All the files between will be selected Delete one or multiple files You can delete a file by selecting the file and the press the Delete button or right-click the selected file and click Delete An other way is to click the big red X button Delete on the ribbon You…

Windows 10 – File Explorer Select, rename and delete files/folders Read More