Before getting into listview example, we should know about listview, Listview is a collection of items pulled from arraylist, list or any databases. Most uses of listview is a collection of items in vertical format, we can scroll up/down and click on any item.This example demonstrate about How to make a ListView in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. In the above activity_main.xml, we have declared a ... Read More
In the electromagnetic spectrum, all omnidirectional waves in the frequencies 3KHz to 1GHz are called radio waves. They are widely used for communications since they are easy to generate, can travel long distances and can penetrate buildings. Radio waves have omnidirectional antennas, i.e. antennas that can send signals in all directions. The properties of radios waves vary according to their frequencies. However, radio waves at all frequencies are prone to interference from electrical equipments like motors etc. Low and Medium Frequency Radio Waves Low and medium frequency radio waves can pass through obstacles and have ground propagation. However, the ... Read More
The EXISTS tells if the query returned results or not while IN can be used for comparing one value with other. IN uses literal values. Note − IN is preferred in a subquery whenever a subquery result is very small. If the subquery result is very large then EXISTS is used. Since IN is a preferred choice for subquery results that are smaller, we are considering an example of IN. To create a table. mysql> create table InSubQueryDemo -> ( -> PNumber int, -> PName varchar(100) -> ... Read More
Before getting into webview implementation we should know what is webview. Webview is a extended of a view and it is used to show HTML content or web pages.Methods are available in webview.clearHistory() − it is used to clear webview historydestroy() − It is used to destroy internal state of webview.getUrl() −it is used to return current webview url.getTitle() − It is used to return current webview tittle.canGoBack() − It indicates about current webview has back history items.Using webview, it opens webview content in default android browsers. If you want to open inside of application. ShouldOverrideUrlLoading as shown below.private class ... Read More
We need to create a stored procedure to display how to pass array to MySQL stored routine. Let us first create a table for our example. Creating a table mysql> create table FindDemo -> ( -> name varchar(100) -> ); Query OK, 0 rows affected (0.46 sec) Inserting some records into the table. mysql> insert into FindDemo values('John'), ('Smith'); Query OK, 2 rows affected (0.13 sec) Records: 2 Duplicates: 0 Warnings: 0 To display all records. mysql> select *from FindDemo; The following is ... Read More
Timber library is a extended library of android Log's. While developing android applications, most of developers prefer Android Logs. But here problem is about clean logs while deploy android project. To avoid this process using Timber library.This example demonstrate about how to integrate Timber in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the Timber library in build.gradle as shown belowapply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.example.andy.myapplication" ... Read More
Infrared waves are those between the frequencies 300GHz and 400THz in the electromagnetic spectrum. Their wavelengths are shorter than microwaves but longer than visible light. Infrared propagation is line of sight. They cannot penetrate walls and sun’s infrared rays interfere with these rays. So cannot be used for long – range communication. As their usage is confined within closed space, they do not need any government permissions for their applications. Applications of Infrared Waves in Communications Remote controls for television, stereos and other home appliances. Wireless LANs Wireless modem, keyboard, mouse, printer etc Fire detectors Night vision ... Read More
Whenever we renumber, there might be a problem. There is a need to declare a unique ID for a column. In MySQL version 5.6 InnoDB, we can reuse the auto_increment ID by including the ID column in an INSERT statement and we can give any specific value that we want. The situations are as follows − Whenever we delete the ID with the highest number Whenever we start and stop MySQL server Whenever we insert a new record Example of ID auto increment using auto_increment variable. mysql> create table UniqueAutoId -> ( ... Read More
Before getting into example we should know what is action bar in android. Action bar just like header in android. Either we can use same action bar for all screen or we can change action bar for particular activity.This example demonstrate about how to create a custom action bar in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 2 − Add the following code to src/MainActivity.javaimport android.os.Bundle; import android.support.v7.app.ActionBar; import ... Read More
Electromagnetic waves within the frequency range of 400 THz – 790 THz are detected by the human eye. Light transmission is line of sight propagation and is blocked by obstacles. Laser Signals Optical signalling can be obtained by laser signals. For example, the LANs in two buildings can be connected by installing laser signalling system on the rooftops. Laser rays are unidirectional. So both the transmitter and the receiver need perfectly aligned photo-emitter and photo-detector. Visual Light Communication A more used variant of light transmission is visual light communication (VLC). VLC refers to data communication using visible ... Read More