Modificar archivo BR.java – Android Studio

Hola buenas noches comunidad StackOverflow tengo un problema quiero modificar el archivo BR.java en Android Studio y no me deja me sale el mensaje “Files under the “build” folder are generated and should not be edited”

La primera imagen es una que esta sin modificar que solo tiene una variable la que viene por defecto

public static final int _all = 0;

introducir la descripción de la imagen aquí

La segunda imagen es de una imagen ya modificada y tiene 3 variables

public static final int _all = 0;
public static final int model = 1;
public static final int position = 2;

introducir la descripción de la imagen aquí
Espero que alguien me pueda ayudar.
Alguien sabe como modificar el archivo BR.java?
Saludos.

adb – Programming an Android application to switch default SIM for mobile Data

I am working on a project in which I have to switch the default SIM for data automatically, and without the need for user intervention. I read some posts on internet and got to know a method in which we can switch off one of the sim and Data will automatically be switched to secondary sim.
https://stackoverflow.com/questions/48696898/turning-off-second-sim-via-adb-shell-tasker-using-activities-intents

This needs Android debug bridge. But, I am not able to find any function responsible for switching default data sim.

java – Puedo hacer una app Android para móviles y al mismo tiempo que esta app sea compatible con Android Tv? Y como agregar en mi app Tv agregar shorcuts?

Hola a todos no se si la pregunta sea clara, bueno en sí soy nuevo rn esto de programación de Android y serían 2 preguntas las que tengo:
Si osea puedo añadir compatibilidad de manejo de mi app con un control remoto (en el caso que mi app se quiera utilizar en Android Tv) como tengo que hacer para darle compatibilidad para Android Tv??
Y mi segunda duda es como hacer para añadir shorcuts en el caso de que mi app pueda hacerla compatible con Android Tv?

Muchas gracias por su atención, no importa si no me responden en español 😉

clock – Prevent Screen Wake / Activity from Android Timer

I’ve got an android timer running through the base clock in android 11 (oneplus 7t).

EDIT: It appears I’m wrong. This is the oneplus clock, not the base android clock. Why they would bother replacing that is an entirely different question of stupidity.

Every few minutes it lights up the screen to let me know the progress of the timer. This is the most useless and dumb features I’ve seen in a long time. I cannot find any way to turn it off.

To reproduce, go into clock > timer > set one for say thirty minutes. Lock screen. Watch screen illuminate and wake in a process of infinite stupid.

Please help, this is annoying as all hell. I need to have my screen visible in case I receive an important message etc, but I don’t want this thing stealing my attention every few minutes.

android – Is a bottom sheet with no close button accessible?

I’m using a bottom sheet.

On Android, people can use the back button to close it, drag it down or tap outside the area.

On iOS, people can drag it down or tap outside the area.

I’m just wondering if it’s accessible enough. Would a close button / icon be good to have?

Cheersenter image description here

Run android 12 on virtualbox

Run android 12 on virtualbox – Android Enthusiasts Stack Exchange

Android IoT device using excessive data over random ports

I have a large number of rooted IoT devices from an industrial supplier that are meant to run as an advertising unit. The goal was to install a standard piece of advertising software designed for android and configure it in it’s housing for deployment. These devices are running a rooted Android 6.0.1 Kernel Version 4.1.17-g900299-dirty

However some of these devices are consuming insane amounts of data – over a 30 day period, 300gb of ethernet data is being used by the device, this is according to the Data Usage view within the OS Settings. However the application causing it is “Android OS”…

I used a packet sniffer to perform a couple 30 second packet captures as well as a couple longer ones. I reviewed the data and I see that across each device affected the port is random, but it’s consistent that there’s always 1 port transferring 80-90% of the data seen in the capture. The traffic seems mostly upload traffic (bytes sent from device to remote host), but that hasn’t always been the case. Triggering a reboot seems to cause the service to pick a new port during boot.

I tried using netstat -tulpn in termux to check what process is using this, but the pid section is blank across the board. I see this port is listening, though.

I’ve looked at lsof -i | grep <port> but nothing comes up on any of the affected devices.

ps aux | grep <port> is not returning anything either.

Within the captures, it seems like there are a couple consistent hosts that they’re reaching out to within a single device, but across devices this is not true. However I’m noticing that the remote host port we’re contacting tends to be 4001… is that relevant?

I’ve read that it’s possible it’s an OS Upgrade issue where we’re downloading updates that somehow fail and cause this awful cycle… but when I looked into the services running that it seems like it’s already disabled (as referenced here: Google Play Services High Internet Consumption )

Does anyone have any suggestion of how I can track this down and stop it?

How to conteract rubber ducky (bad usb) on android devices

I’ve read somewhere that its possible to use mouse and keyboard on android devices, because that’s possible its also possible to use devices like rubber ducky to automate key presses to hack into an android device. So, how would I counter act that?

datepicker – Como usar a função setMinDate() para impedir que a seleção de datas que já passaram no Android Studio

Estou querendo usar a função setMinDate() para impedir que o usuário digite em um campo específico uma data que já passou, mas não consigo utilizar essa função sem que o compilador não aponte erro na mesma linha em que utilizo essa função.

            <EditText
            android:id="@+id/editData_devolucao"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:hint="Defina a data da devolução do livro"
            android:focusable="false"
            android:cursorVisible="false"
            android:inputType="date" />
            // DatePickerDialog no editData_devolucao
            editData_devolucao = findViewById(R.id.editData_devolucao);
            Calendar calendar = Calendar.getInstance();
            dia = calendar.get(Calendar.DAY_OF_MONTH);
            mes = calendar.get(Calendar.MONTH);
            ano = calendar.get(Calendar.YEAR);
            editData_devolucao.setOnClickListener(new View.OnClickListener(){
                @Override
                public void onClick(View v){
                    DatePickerDialog datePickerDialog = new DatePickerDialog(
                            CadastrarEmprestimo.this, new DatePickerDialog.OnDateSetListener(){
                        @Override
                        public void onDateSet(DatePicker view, int ano, int mes, int dia){
                            mes += 1;
                            String data_dev = dia + "/" + mes + "/" + ano;
                            editData_devolucao.setText(data_dev);
                        }
                    },ano,mes,dia);
                    datePickerDialog.getDatePicker().setMinDate(calendar.getTime()); // ERRO AQUI
                    datePickerDialog.show();
                }
            });

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123