Nitya Raut has Published 221 Articles

How to get current Wi-Fi IP address in android?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

2K+ Views

This example demonstrate about How to get current Wi-Fi IP address 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. ... Read More

How to call an existing function in a database using JDBC API?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

7K+ Views

You can call a function using CallableStatement object just like stored procedures, to call a function using a JDBC program you need to.Connect to the database.Create a PreparedStatement object and to its constructor pass the function call in String format.Set values to the place holders.Execute the Callable statement.Following is the ... Read More

How to use size() in android PriorityBlockingQueue?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

112 Views

Before getting into the example, we should know what PriorityBlockingQueue is. It is an unbounded queue and follows the same order as a priority queue. The main usage of priority blocking queue is, it going to handle out of memory error.This example demonstrates about How to use size() in android ... Read More

How to get current Wi-Fi mac address in android?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

2K+ Views

This example demonstrate about How to get current Wi-Fi mac address 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. ... Read More

Best replacement of onItemClickListner in android recyclerview?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

141 Views

This example demonstrates about Best replacement of onItemClickListner in android recyclerviewStep 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.           ... Read More

How to get information about USB mounted or not in android?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

598 Views

This example demonstrate about How to get information about USB mounted or not 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. ... Read More

How to set fit webview screen in android?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

3K+ Views

This example demonstrate about How to set fit webview screen 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. ... Read More

How to convert a timestamp object in to Date in JDBC program?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

622 Views

The getTime() method of the Timestamp class retrieves and returns the time from the current timestamp in milliseconds (long) from epoch time 1, 1970 00:00:00.000 GMT.Timestamp timestamp = rs.getTimestamp("DispatTimestamp"); long time = timestamp.getTime();The constructor of the java.sql.Date class accepts a long variable representing the time in milliseconds from the epoch ... Read More

How to convert a Date object in to Timestamp in JDBC program?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

716 Views

The getTime() method of the java.sql.Date class retrieves and returns the time from the current timestamp in milliseconds (long) from epoch time 1, 1970 00:00:00.000 GMT.//Retrieving the date Date date = rs.getDate("Dispatch_Date");The constructor of the java.sql.Timestamp class accepts a long variable representing the time in milliseconds from the epoch time ... Read More

How to run continues thread in android?

Nitya Raut

Nitya Raut

Updated on 30-Jul-2019 22:30:25

593 Views

Before getting into an example, we should know what thread in android is. Threads are generic processing tasks that can do most things, but one thing they cannot do is update the UI.This example demonstrates about How to run continues thread in android.Step 1 − Create a new project in ... Read More

Advertisements