Found 1952 Articles for Apps/Applications

How to resume Android Fragment from BackStack if it exists?

Vaibhav Ahire
Updated on 30-Mar-2023 14:25:16

1K+ Views

Introduction Android applications are built using different components such as Activities as well as Fragments. Fragments are lighter versions of activity and hence they are used in most of the cases for displaying the UI of the application. Fragments are considered as one of the essential components of Android application. They are generally used to create a complex, dynamic user interface that is both robust and highly customizable. Managing the Fragments in an android application is a bit tricky and particular when it comes to resuming fragments from the back stack. In this article we will take a look at ... Read More

How to read a text file from the SD card in Android?

Vaibhav Ahire
Updated on 30-Mar-2023 14:15:04

2K+ Views

Introduction Many times in android applications we have to download a specific file and we store that file in our device's external storage. Sometimes we have to access these files fromour devices external storage and display the content from these files within our android application. In this article we will take a look at How to read a text file from the SD Card in android. Implementation We will be creating a simple application in which we will be displaying two text views. In the first text view we will be displaying the heading for our application and in the ... Read More

How to play sound even when an Android phone is in silent mode ?

Vaibhav Ahire
Updated on 30-Mar-2023 14:13:35

3K+ Views

Introduction Many times in android applications we come across a scenario where we have to play a notification sound to be played in the user's mobile device even when the device is in silent mode. In this article we will take a look at How to play a sound even when an Android phone is in silent mode. Implementation We will be creating a simple application in which we will be displaying a simple text view for displaying the heading of our application. After that we will be creating a button which we will be using to play the notification ... Read More

How to hook a function into the Power Button in Android?

Vaibhav Ahire
Updated on 30-Mar-2023 14:11:13

2K+ Views

Introduction Android phones are designed with a wide range of features and capabilities, including a Power button that allows users to turn the device on and off. While the basic function of the Power button is to turn the device on and off, Android developers can actually use the button to trigger custom functions. This can be done by “hooking” a function to the Power button, which will allow the function to be triggered anytime the Power button is pressed. In this article we will take a look on How to hook a function into Power Button in an Android ... Read More

How to handle TransactionTooLargeException in Android?

Vaibhav Ahire
Updated on 04-Apr-2023 10:32:43

2K+ Views

Introduction Handling a TransactionTooLargeException in Android is a common issue that most developers have encountered. The exception usually occurs when an app is trying to send or receive a large chunk of data, which exceeds the maximum size limit of the Android operating system. If the size of the data exceeds 1MB, the TransactionTooLargeException will be thrown and the app will crash. In this article, we will discuss how to handle the TransactionTooLargeException in Android. We will discuss some of the best practices that developers should follow to prevent the exception from occurring, as well as how to handle the ... Read More

How to enable/disable log levels in Android?

Vaibhav Ahire
Updated on 30-Mar-2023 13:56:45

6K+ Views

Introduction There are many softwares present in the market which are used for developing mobile applications such as VS Code, Intellij IDE, Android Studio and many more. Android Studio is an official integrated development environment (IDE) designed to help developers create and develop apps for the Android platform. It is a powerful tool that allows developers to create and manage projects, build apps quickly and efficiently, and debug code. Android Studio provides so many features for developing android applications such as debugging of the applications, checking our memory leaks, monitoring app performance and many more. Along with this Android studio ... Read More

How to decompile Android DEX (VM bytecode) files into corresponding Java source code?

Vaibhav Ahire
Updated on 30-Mar-2023 13:55:06

2K+ Views

Introduction Android platform uses a virtual machine which is known as Dalvik VM which is used to execute the android application code. Dalvik VM executes the code in a format called DEX (Dalvik Executable). DEX files are the compiled version of Android application code written in Java. DEX files are a form of bytecode and can be decompiled into the corresponding Java source code.When we build a project in android studio to generate the APK. The compiler will firstly convert the code to dex and then this generated dex is then converted to the APK. This APK can be installed ... Read More

How to clear the back stack in Android?

Vaibhav Ahire
Updated on 30-Mar-2023 13:54:06

4K+ Views

Introduction Many times in android applications we use to display so many different types of activities. These activities are used in android applications for performing the different tasks. When we are navigating from one activity to another activity, the previous activity from which we have navigated remains in the stack, which will take system memory and may degrade the performance of the application. To prevent this we have to clear the activity history stack of an android application. In this article we will take a look on How to clear the back stack in Android. Implementation We will be creating ... Read More

How to change theme for AlertDialog on Android?

Vaibhav Ahire
Updated on 30-Mar-2023 13:51:50

6K+ Views

What is Alert Dialog in Android? Alert dialogs in android are used to display alerts within android applications. We can display alert dialog within our application to display any warning message to the user. Inside the alert dialog we can provide two options to the users whether to select as yes or no in the dialog. In this article we will take a look on How to change the theme for default Alert Dialog in Android. Implementation We will be creating a simple application in which we will be displaying a simple text view for displaying the heading of our ... Read More

How to change progress bar progress color in Android?

Vaibhav Ahire
Updated on 30-Mar-2023 13:49:59

5K+ Views

What is the Progress Bar in Android? Progress Bar is a widget in android which is used to indicate the loading screen within an android application. It is generally displayed when the data is being loaded within an android application from a server. In this article we will take a look on How to change progress bar color in Android. Implementation We will be creating a simple application in which we will be simply displaying a text view for displaying the heading of our application and we will be displaying a progress bar. We will be changing the color of ... Read More

Advertisements