Azhar has Published 721 Articles

How do add dependency in Android studio

Azhar

Azhar

Updated on 07-Jul-2020 12:46:34

1K+ Views

This example demonstrates about How to add dependency in Android studioStep 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 can I get battery level and state (plugged in, discharging, charging, etc) in Android?

Azhar

Azhar

Updated on 07-Jul-2020 12:44:36

894 Views

This example demonstrates how do I get battery level and state (plugged in, discharging, charging, etc) 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 ... Read More

How to listen volume buttons in Android background service?

Azhar

Azhar

Updated on 07-Jul-2020 12:43:55

1K+ Views

This example demonstrates how do I listen volume buttons in android background 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. Step 3 ... Read More

How to create Android Device Network Listener based on on/off network?

Azhar

Azhar

Updated on 07-Jul-2020 12:43:03

264 Views

This example demonstrates how do I create Android Device Network Listener based on on/off network.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 can I get onclick event on webview in Android?

Azhar

Azhar

Updated on 07-Jul-2020 12:41:36

4K+ Views

This example demonstrates how do I get onClick event on webView 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 3 ... Read More

How to play videos in Android from assets folder or raw folder?

Azhar

Azhar

Updated on 07-Jul-2020 12:41:01

4K+ Views

This example demonstrates how do I play videos in Android from the assets folder or raw folder 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 ... Read More

How to disable back button in android while logging out the application?

Azhar

Azhar

Updated on 07-Jul-2020 11:54:34

980 Views

This example demonstrates how do I disable back button in android while logging out the application.Step 1 − Create a new project in Android Studio, go to File rArr; 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

Android imageView Zoom-in and Zoom-Out?

Azhar

Azhar

Updated on 07-Jul-2020 11:53:39

6K+ Views

This example demonstrates how do I Zoom In and Zoom Out an android ImageView.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 disable Mobile Data on Android?

Azhar

Azhar

Updated on 07-Jul-2020 11:48:58

1K+ Views

This example demonstrates how do I disable Mobile data in Android.For your find Information, unless you have a rooted phone I don't think you can enable and disable data programmatically because in order to do so we have to include MODIFY_PHONE_STATE permission which is only given to system or signature ... Read More

How do we set the input type for an Android EditText programatically?

Azhar

Azhar

Updated on 07-Jul-2020 11:47:39

156 Views

This example demonstrates how do I set the input type for an Android EditText programmatically.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

Advertisements