Found 1966 Articles for Apps/Applications

How to print application base apk path in android?

Fendadis John
Updated on 26-Jun-2020 12:40:23

480 Views

This example demonstrate about How to print application base apk path 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 code, we have taken text view to show the current application base apk path .Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import java.security.Security; import java.util.Locale; public class MainActivity extends AppCompatActivity {   ... Read More

How to get street information from Network provider in android?

Vikyath Ram
Updated on 26-Jun-2020 12:21:52

305 Views

This example demonstrate about How to get street information from Network provider 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 code, we have taken text view to show street information.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.Manifest; import android.content.pm.PackageManager; import android.location.Address; import android.location.Geocoder; import android.location.Location; import android.location.LocationManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import java.io.IOException; ... Read More

How to get nearby city information from Network provider in android?

Anuradha Nanda
Updated on 26-Jun-2020 12:21:12

355 Views

This example demonstrate about How to get nearby city information from Network provider 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 code, we have taken a text view to show nearby city information.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.Manifest; import android.content.pm.PackageManager; import android.location.Address; import android.location.Geocoder; import android.location.Location; import android.location.LocationManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; ... Read More

How to get longitude from Network provider in android?

Fendadis John
Updated on 26-Jun-2020 12:20:09

118 Views

This example demonstrate about How to get longitude from Network provider 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 code, we have taken a text view to show longitude.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.Manifest; import android.content.pm.PackageManager; import android.location.Location; import android.location.LocationManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; public class MainActivity extends AppCompatActivity {   ... Read More

How to get locale information from Network provider in android?

Arushi
Updated on 26-Jun-2020 12:19:04

170 Views

This example demonstrate about How to get locale information from Network provider 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 code, we have taken text view to show locale infomation.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.Manifest; import android.content.pm.PackageManager; import android.location.Address; import android.location.Geocoder; import android.location.Location; import android.location.LocationManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import java.io.IOException; ... Read More

How to get latitude from Network provider in android?

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

209 Views

This example demonstrate about How to get latitude from Network provider 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 code, we have taken a text view to show latitude.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.Manifest; import android.content.pm.PackageManager; import android.location.Location; import android.location.LocationManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; public class MainActivity extends AppCompatActivity {    TextView ... Read More

How to get current time from Network provider in android?

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

836 Views

This example demonstrate about How to get current time from Network provider 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 code, we have taken a text view to show time.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.Manifest; import android.content.pm.PackageManager; import android.location.Address; import android.location.Geocoder; import android.location.Location; import android.location.LocationManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import java.io.IOException; ... Read More

What is Android background music service?

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

1K+ Views

What is Android background music service?Before getting into an example, we should know what service is in android. Service is going to do background operation without interacting with UI and it works even after activity destroy.This example demonstrates what is Android background music service.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 text view, when user click on text view, it will start ... Read More

How to implementing start Foreground for a service?

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

1K+ Views

Before getting into example, we should know what service is in android. Service is going to do back ground operation without interact with UI and it works even after activity destroyThis example demonstrate about How to implementing start Foreground for a service.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 text view, when user click on text view, it will start startForeground().Step 3 ... Read More

How to implementing START_STICKY for a service?

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

1K+ Views

Before getting into an example, we should know what service is in android. Service is going to do back ground operation without interacting with UI and it works even after activity destroy.START_STICKY -  If service is started with START_STICKY return type, it going to work in back ground even if activity is not foreground if android forcefully closed service due to memory problem or some other cases, it will restart service without interaction of the user.This example demonstrates How to implementing START_STICKY for a service.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and ... Read More

Advertisements