Skip to main content

Posts

Showing posts with the label advanced

Android - Show A Dialog From Service

In this article, I will be discussing how you can create a dialog from service. As we all know that service in android does not have any UI and it is intended for long-running background tasks. But sometimes it is required to show some information to the user when your app is running in the background. Today I will show you how you can implement this type of functionality in your application. Before starting the tutorial let me tell you about the special permission that we are going to use. Permission AndroidManifest.xml<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> This permission allows the app to use the system level window. AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.app.dialogfromservice"> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> <appl

Android - Create Root Checker App in Just 10 minutes

Today , I will show you how easily we can create a root checker app in android. It only takes 10 minutes to create this kind of application. activity_main.xml <?xml version="1.0" encoding="utf-8"?><androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="60dp" android:text="This app checks the rooting status of your phone" android:textAlignment="center" android:textSize="18sp&q