Found 1631 Articles for Android

How to get offsetdatetime local date in android using offset date time API class?

Nishtha Thakur
Updated on 29-Jun-2020 13:37:26

336 Views

This example demonstrate about How to get offsetdatetime local date in android using offset date time API class.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 code, we have taken textview to show current date.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import java.time.OffsetDateTime; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) { ... Read More

How to get month information in android using yearmonth API class?

Anvi Jain
Updated on 29-Jun-2020 13:36:51

123 Views

This example demonstrate about How to get month information in android using yearmonth API class.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 code, we have taken textview to show current year with month.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import java.time.YearMonth; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {   ... Read More

How to use TINYTEXT value in Android sqlite?

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

65 Views

Before getting into an example, we should know what SQLite database in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built-in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrates How to use TINYTEXT value in Android SQLite.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a ... Read More

How to use tinyint value in Android sqlite?

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

115 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrate about How to use tinyint value in Android sqlite.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ... Read More

How to use SUM () in Android sqlite?

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

646 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrate about How to use SUM () in Android sqlite.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ... Read More

How to get local time in android using localtime API class?

Nishtha Thakur
Updated on 29-Jun-2020 13:36:10

283 Views

This example demonstrate about How to get local time in android using localtime API class.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 code, we have taken textview to show time.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import java.time.LocalTime; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState); ... Read More

How to get local time and date in android using LocalDateTime API class?

Anvi Jain
Updated on 29-Jun-2020 13:35:36

622 Views

This example demonstrate about How to get local time and date in android using LocalDateTime API class.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 code, we have taken textview to show time and date.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle ... Read More

How to use smallint value in Android sqlite?

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

77 Views

Before getting into an example, we should know what SQLite database in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built-in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrates How to use smallint value in Android SQLite.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a ... Read More

How to use now in timestamp in Android sqlite?

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

638 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrate about How to use now in timestamp in Android sqlite.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details ... Read More

How to get local date in android using local date API class?

Nishtha Thakur
Updated on 29-Jun-2020 13:34:55

331 Views

This example demonstrate about How to get local date in android using local date API class.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 code, we have taken textview to show date.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.icu.util.LocaleData; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; import java.awt.font.TextAttribute; import java.time.LocalDate; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) ... Read More

Advertisements