In this video it shows the code to check whether the developer option is enabled or not in your Android device. It uses the DEVELOPMENT_SETTINGS_ENABLED to check it. The details of the same is in the below documentation link:
I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com
Complete source code and other details:
package com.programmerworld.developeroptionenabledcheck;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.provider.Settings;
import android.view.View;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
private TextView textView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = findViewById(R.id.textView);
}
public void buttonCheckDeveloperOption(View view){
int intDevOption = Settings.Secure.getInt(this.getContentResolver(),
Settings.Global.DEVELOPMENT_SETTINGS_ENABLED,
0);
if (intDevOption == 1){
textView.setText("Developer Option is ENABLED");
} else {
textView.setText("Developer Option is NOT ENABLED");
}
}
}
<?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/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:textSize="34sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.526"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.309" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="107dp"
android:layout_marginTop="45dp"
android:onClick="buttonCheckDeveloperOption"
android:text="Develope Option Check"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
Screenshots:


Clicking the Build Number 5 times, the Developer option gets enabled.





Excerpt:
The content appears to introduce a video tutorial that guides users on utilizing an Android app code. This code checks whether the developer option is activated in an Android device. The tutorial leverages the DEVELOPMENT_SETTINGS_ENABLED to perform this check and provides potential viewers with complete source code, down to the very design of the user interface. Furthermore, the resource offers a channel for inquiries, comments, or acknowledgments, giving viewers the alternative to visit ProgrammerWorld’s contact page or to send an email to programmerworld1990@gmail.com.