Mostrando entradas con la etiqueta android. Mostrar todas las entradas
Mostrando entradas con la etiqueta android. Mostrar todas las entradas

2023-03-19

Lista de las versiones de Android y la versión máxima de Java compatible [ChatGPT]

Aquí hay una lista de las versiones de Android y la versión máxima de Java compatible:

  1. Android 1.0 - Java 5
  2. Android 1.1 - Java 5
  3. Android 1.5 Cupcake - Java 5
  4. Android 1.6 Donut - Java 5
  5. Android 2.0 Eclair - Java 6
  6. Android 2.2 Froyo - Java 6
  7. Android 2.3 Gingerbread - Java 6
  8. Android 3.0 Honeycomb - Java 6
  9. Android 4.0 Ice Cream Sandwich - Java 6
  10. Android 4.1 Jelly Bean - Java 7
  11. Android 4.4 KitKat - Java 7
  12. Android 5.0 Lollipop - Java 8
  13. Android 6.0 Marshmallow - Java 8
  14. Android 7.0 Nougat - Java 8
  15. Android 8.0 Oreo - Java 8
  16. Android 9 Pie - Java 8
  17. Android 10 - Java 8
  18. Android 11 - Java 8
  19. Android 12 - Java 8

Happy hacking!!!

2016-08-12

Cannot start the Emulator in Android Studio 2.0+

If you see the following error:

libGL error: unable to load driver: r600_dri.so

Just do this:

$sudo apt-get install lib64stdc++6

$ cd $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6 $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++

Happy hacking!!!

2015-07-15

Get a QR code for your android app

To get a QR code for your app go HERE

2013-10-02

Remove/hide a preference from the screen

I've found in stackoverflow how to remove/hide a Preference from a PreferenceScreen.

The one I found more useful is the following:

PreferenceScreen screen = getPreferenceScreen();
Preference pref = getPreferenceManager().findPreference("mypreference");
screen.removePreference(pref);

2013-08-15

Supplicant not running, cannot connect [EN]

Just few moments ago, I was trying to download an app, so I needed Wi-Fi connection. But every time I tried to connect on one of my devices, it was deactivated without further ado, after few seconds trying to connect. So I plugged the device to the computer, turned on the trace using adb (you can do this with an IDE like IntelliJ, Netbeans or Eclipse, or using the command line adb logcat). The error I got was:

08-15 11:10:19.500: ERROR / WifiHW (22603): Supplicant not running, can not connect
08-15 11:10:21.190: ERROR / RollingFileStream (24639): Could not create temp File with prefix: "eventlog.store" and ...

It says it has no free space to create a temporary file. After looking at the space left, I realized it was 0kB, I've spent all free space inside the device. There are two solutions: moving applications to the SD card or uninstall applications that are in the internal space of the device.

After several uninstalls, the problem has been solved satisfactorily.

Regards and Happy Hacking!!! :-)

Supplicant not running, cannot connect [ES]

Hace un rato, estaba intentando descargar una aplicación para lo que necesitaba la conexión Wi-Fi. Pero cada vez que intentaba conectar en uno de mis dispositivos, pasados unos segundos intentando establecer la conexión, se desactivaba sin más ni más. Tras enchufar el dispositivo al ordenador, activé la traza mediante adb (puedes hacerlo con un IDE como IntelliJ, Netbeans o eclipse, y también con el comando adb logcat). El error que obtenía era el siguiente:

08-15 11:10:19.500: ERROR/WifiHW(22603): Supplicant not running, cannot connect
08-15 11:10:21.190: ERROR/RollingFileStream(24639): Could not create a temp file with prefix: "eventlog.store" and ...

Lo que nos indica que no tiene sitio para crear un archivo temporal. Tras mirar que espacio me quedaba, me di cuenta que estaba a 0kB, es decir que me he comido todo el espacio interno del dispositivo. Llegado aquí hay dos soluciones, o pasar aplicaciones a la Tarjeta SD o desinstalar aplicaciones que estén en el espacio interno del dispositivo.

Tras realizar varias desinstalaciones, el problema se ha solucionado satisfactoriamente.

Saludos y ¡¡¡Happy Hacking!!! :-)

2013-03-26

Cómo instalar el sdk de android en /opt para todos los usuarios en GNU/Linux

Estoy reinstalando todo en mi ordenador de escritorio actual (epi) (yo uso el abecedario a nombrarlos, como los huracanes, aunque tiene alguna letra más en el interior). Estoy instalando el SDK de Android y me gusta instalado en /opt, por lo que he descargado y descomprimido usando tar, mv, chown, ... entonces me quedé atascado en que los permisos de ejecución/búsqueda (x) eran sólo para el propietario. Luego, utilizando man chmod encontré la manera correcta de hacerlo.

cd /opt

sudo tar xvzf /home/franci/Descargas/android-sdk_r21.1-linux.tgz

sudo chmod +r -R android-sdk-linux/

sudo chmod +X -R android-sdk-linux/

lo nuevo (no lo conocía antes de leer la páginas man de chmod) es +X, le indica a chmod que expanda el atributo de ejecución/búsqueda si uno de los tres grupos de permisos lo tiene.

Ahora todos los usuarios pueden utilizarlo.

How to install android sdk in /opt for everyone in GNU/Linux

I'm reinstalling everything in my current desktop computer (epi) (I use the alphabet to name them, like hurricanes, althought it has some more letter inside). I'm installing android SDK and I like it installed on /opt, so I downloaded it and unpacked using tar, mv, chown, ... then I got stuck when excution/search permits (x) was only for owners. Then using man chmod I found a way to do it the right way.

cd /opt

sudo tar xvzf /home/franci/Downloads/android-sdk_r21.1-linux.tgz

sudo chmod +r -R android-sdk-linux/

sudo chmod +X -R android-sdk-linux/

the new thing (I didn't know before reading chmod man page) is +X, it says to chmod to expand execution/search attribute if one of the three groups have it.

Now everyone can use it.

2012-12-30

Most Popular Languages for Apps Localization - Los Lenguajes más populares para Localización de Aplicaciones

He encontrado aquí una lista de los lenguajes a los que es más conviene Localizar la aplicación para Android y iPhone, o al menos anda cerca.

Aunque mis estadisticas son diferentes, intentaré añadirlos a Audible TTS en la medida de lo posible.


Although my statistics are different, I've found here a list of the most convenient languages for Localization for an Android and iPhone apps, or at least it's close to.

I'll try to add those languages to Audible TTS where available.


French 50.00%
Spanish 46.79%
German 46.79%
Japanese 41.37%
Italian 35.74%
Chinese (Simplified) 25.70%
Dutch 19.28%
Portuguese 17.27%
Russian 16.47%
Korean 11.04%
Swedish 9.84%
Chinese (Traditional) 8.03%
English 7.03%
Norwegian 6.22%
Arabic 5.62%
Polish 5.22%
Danish 4.82%
Turkish 4.62%
Portugal Portuguese 3.41%
Hebrew 3.41%
Greek 3.41%
Finnish 3.21%
Ukrainian 2.01%
Thai 1.81%
Czech 1.81%
Romanian 1.61%
Indonesian 1.61%
Croatian 1.61%
Serbian 1.20%

2012-11-27

Análisis del Nexus 4

Análisis del Nexus 4 de fansandroid

Análisis del Nexus 4 de Droidcast.es leído por Audible TTS por si te da pereca leer.

2012-06-30

Howto activate LogCat in Huawei U8650

If you are a programmer you maybe have found the same problem in Huawei U8650, there is no LogCat, you plug and unplug, look everywhere, everything is fine, it's just there is no LogCat. You can try to view the log with this command

adb logcat

You get the following error

Unable to open log device '/dev/log/main': No such file or directory

There is an easy solution, open the hidden menu by one of the following options

  • Type the Dial (as calling) the code *#*#2846579#*#*

  • Execute in the commandline

    adb shell am start -a android.intent.action.MAIN -n com.android.settings/com.android.settings.TestingSettingsHW

Once the configuration menu is open go to ProjectMenu->3. Background setting->2. Log setting->Log switch and select the option "LOG on"

Now go to ProjectMenu->3. Background setting->2. Log setting->->Log level setting and select "VERBOSE" or the desired level.

Now you need to reboot the device, that can be done by the command

adb reboot

To deactivate just rever the changes.

It could be necessary to modify the options of the following screen

ProjectMenu->3. Background setting->7. Dump&Log

Not in my case.

Happy hacking!!!

Como activar LogCat en el Huawei U8650

Si eres programador tal vez te has encontrado con el mismo problema que yo con mi Huawei U8650, no hay LogCat, enchufas y desenchufas miras por todos lados, todo está bien, simplemente no hay LogCat. Puedes intentar ver el log con el siguiente comando

adb logcat

Obteniendo el siguiente error

Unable to open log device '/dev/log/main': No such file or directory

La solución es sencilla, abrir un menú oculto mediante una de estas dos opciones

  • Marcar en el Dial (como si fuese una llamada) el código *#*#2846579#*#*

  • Ejecutar en la línea de comandos el comando

    adb shell am start -a android.intent.action.MAIN -n com.android.settings/com.android.settings.TestingSettingsHW

Una vez abierto el menú de configuración vamos a ProjectMenu->3. Background setting->2. Log setting->Log switch y seleccionamos la opción "LOG on".

Ahora vamos a ProjectMenu->3. Background setting->2. Log setting->Log level setting y seleccionamos "VERBOSE" o el nivel deseado.

Ahora necesitamos reiniciar el teléfono, puede hacerse mediante el comando

adb reboot

Para desactivarlo sólo es necesario revertir los cambios.

Podría ser necesario modificar las opciones de la siguiente pantalla

ProjectMenu->3. Background setting->7. Dump&Log

Aunque en mi caso no ha sido necesario.

¡¡¡Happy hacking!!!

2012-02-29

Using ADB over WiFi

A way of connecting ADB to android devices (a real one or a emulated one) without using an USB cable, is doing it throught a Network (usually over WiFi) using an aplication as Wifi ADB. The steps to follow are:

-Rooting the device if not rooted yet
-Install Wifi ADB
-Push "Turn on" button to get the exact command
-Allow super user permits if a emerging screen ask for it
-Execute the command "adb connect 192.168.1.36:5555"
-Push "Turn off" button to deactivate the aplication

While the application is active you are not able to connect the debugger throught cable, at least for me.

To connect to an emulater no application is needed, just the following steps:

-Get the machine IP ie: 192.168.1.35
-Run the emulator, and you'll find the port 5555 in the window's title puerto 5555 or any other if there is more than one device.
-Run the command "adb connect 192.168.1.35:5555" with the given IP and port.

I already knew how to connect to emulators, I have known this application to connect to real devices at Higo de Blog

As Richard Stallman would say ¡Happy coding!

Cómo usar ADB sobre Wifi

Una forma de conectar ADB al dispositivo android (ya sea físico o emulado) sin tener que usar cable USB, es hacerlo por red (generalmente mediante WiFi) utilizando una aplicación como Wifi ADB. Los requisitos son android 2.0 y dispositivo con acceso root. Los pasos a seguir son:

-Rootear el dispositivo si no lo está
-Instalar Wifi ADB
-Pulsar el boton "Turn on" para obtener la orden exacta
-Permitir permisos de super usuario si nos sale la ventana emergente
-Ejecutar el comando "adb connect 192.168.1.36:5555"
-Pulsar el boton "Turn off" para desactivar la aplicación

Mientras la aplicación está activa no es posible conectar el depurador mediante cable, o al menos a mí no me ha sido posible.

Para hacerlo sobre un emulador no es necesaria esta aplicación, simplente los siguientes pasos:

-Obtener la IP del equipo ej: 192.168.1.35
-Lanzar el emulador, en el título de la ventana veremos el puerto 5555 u otro si hay más de un dispositivo
-Ejecutar el comando "adb connect 192.168.1.35:5555" teniendo en cuenta la IP y el puerto anteriores

Aunque conocía como hacerlo sobre emuladores, he conocido la aplicación para hacerlo sobre dispositivos físico en Higo de Blog

Como diría Richard Stallman ¡Happy coding!

2011-12-06

onSaveInstanceState llamado dos veces


Cuando rotas el emulador de android, la primera vez los componentes mantienen su estado, todo está bien, pero la segunda vez, onSaveInstanceState es llamado dos veces, porque la activity es instanciada dos veces, una por un pequeño intervalo de tiempo y otra para mantenerla visible. La primera de esta pareja no restaura el estado previo guardado con onSaveInstanceState, porlo que restaurandola se limpiará el estado guardado.

Esto sólo ocurre en el EMULADOR por lo que esto no debería preocupar a nadie, pero hay una solución para prevenir este problema que no perjudica a tu aplicación. Si no necesitas el teclado simplemente añade esto al manifiesto de tu activity en AndroidManifest.xml.

android:configChanges="keyboardHidden"

Pero esto sólo funciona si lo rotas despacio, si lo rotas dos veces justo cuando la activity está restaurándose seguirás teniendo el mismo problema.

Visto  aquí

onSaveInstanceState called twice

When you rotate the android emulator, first time components keep their state, nothing is wrong, but second time, onSaveInstanceState is called twice, because the activity is instantiated twice, one for a little interval of time and other to keep visible. The first of this couple do not restore the previous state saved with onSaveInstanceState, so restoring it will clear the saved state. 

This only happens in the EMULATOR so this don't should concern anybody, but there is a workaround to prevent this problem that doesn't hurt you application. I you don't need to show the keyboard just add this to you activity manifest in AndroidManifest.xml

android:configChanges="keyboardHidden"

But it only works if you rotate slowly, if you rotate it twice just when the activity is restoring state you'll still have the same problem.

I get this here here


2010-08-16

Adding a jar to an Android project in Netbeans

If you add a jar to an Android project in Netbeans, it will compile but classes included in that jar won't be included in apk package.

there is a solution to this problem, add these lines in build.xml file


<target name="-pre-jar">
<copy todir="${build.classes.dir}">
<fileset file="${file.reference.YOURJAR.jar}" />
</copy>
</target>


change YOURJAR for the apropiate value that you will find in project.properties

in my case I've found

file.reference.core.jar=../core/dist/core.jar


so I've added these lines

<target name="-pre-jar">
<copy todir="${build.classes.dir}">
<fileset file="${file.reference.core.jar}" />
</copy>
</target>