viernes, 24 de junio de 2011

Problem with DatePicker example on Android. Possible Android bug.

I am implementing a DateTimePicker. I have reuse this repository:

http://code.google.com/p/datetimepicker/

The problem appears when I am trying to catch the events for the onTimeChanged when I change the minutes. If I use the buttons of + and – Its fine, the event is fired and I can handle it here

public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {

// Update the internal Calendar instance

mCalendar.set(mCalendar.get(Calendar.YEAR), mCalendar.get(Calendar.MONTH), mCalendar.get(Calendar.DAY_OF_MONTH), hourOfDay, minute);

}

Whereas when I click on the minutes and I change it using the keyboard the event doesnt arise, as in the case of the hours, days, etc…

A more detail description of the problem is:

What steps will reproduce the problem?

1. Select the timepicker

2. touch on the numbers, so the keyboard appear

3. when i write an amout of minutes, the event doesnt fire.

What is the expected output? What do you see instead?

I would expect to catch this event inside onTimeChanged, but I cant.

What version of the product are you using? On what operating system?

Version 2. On Android Froyo.

The author of this code has told me there is a bug on Android. I think should be a work around to this problem, for example creating my own class extending from TimePicker and reimplementing the interface OnTimeChangedListener.

miércoles, 22 de junio de 2011

¿Cómo puedo aprender inglés?

En más de una ocasión me han hecho esta pregunta, empezando por mí mismo. A continuación os dejo unos links que en su momento me resultaron de gran ayuda. Me gustaría compartir mi experiencia, ayudar a quien le interese, pero sobretodo tenerlo ya escrito para cuando me pregunten la próxima vez! J

El método depende de cada uno, evidentemente. Personalmente recomendaría estas pautas a un nivel medio que quiere conseguir un nivel alto. En mi caso fueron más o menos así.

Empezar escuchando Vaughan Radio: 30min/1h al dia. http://www.vaughanradio.com/ Te puedes bajar los podcast y llevarlos en el coche, escucharlos antes de dormir…

Practicar el speaking 30min. Para ello internet nuevamente nos supone una herramienta perfecta. Hay una comunidad muy buena, en la que pones tu idioma materno e intercambias con alguien que tenga interés en tu idioma y tú en el suyo. Se llama http://www.sharedtalk.com/

Para el reading que mejor que irse a Reading! jeje(este es un chiste para familiarizaros con el fino humor británico, no en serio! Cuál es la palabra más larga en ingles…SMILES, porque entre una S y la otra hay una milla de distancia…) Para el Reading empezar con libros que están marcados por niveles. Los hay en la biblioteca de la escuela de idiomas. También revistas, como SPEAK UP, muy buena y con un CD interesante.

Tampoco hay que descuidar la gramática y fonética. Para esto lo mejor es ir a una escuela, y si no, pues también hay muchos libros en pdf sobre gramática del inglés, boletines a los que suscribirse por email…Buscar en internet cualquier recurso para el First, Advance, IELTS, TOEFL…

Para la fonética hay unos videos muy buenos de la BBC: http://www.bbc.co.uk/worldservice/learningenglish/grammar/pron/

Una página con cantidad de recursos y de consejos es http://elblogdelingles.blogspot.com/

La autora de este blog y Richard Vaughan, son dos profesores que le ponen tanto entusiasmo a su profesión que de verdad hace que te interese el inglés. Claro está que debe de haber una motivación previa para ello. En mi caso fue poder leer libros técnicos para mi proyecto, foros, y demás recursos que tiene internet en materia de informática y teleco…Otros pueden ser la música, viajar a algún país...Y en cualquier caso lo recomiendo, pues aprender un idioma es una actividad muy estimulante, que puede tomarse como hobby y con la que puedes aprender cosas que ya tenías olvidadas. Como es el caso de los podcast http://www.bbc.co.uk/podcasts.

Una vez que se tiene un dominio intermedio-alto. Lo mejor sin lugar a dudas es irse un tiempo al país donde se hable ese idioma. Si no es posible, siempre hay posibilidad de conocer a personas inglesas en España. En Murcia por ejemplo hacen un tándem (Erasmus que quieren practicar español) en la cafetería Fitz Patrick (junto al Rex), o una comunidad llamada http://www.erasmusu.com/es/ Donde también conocer gente Erasmus. De esta forma es posible practicar el inglés como si estuviéramos en el país y mantener vivo el idioma. Una vez que tienes nivel suficiente es genial poder hablar con angloparlantes, y por ende con gente de casi cualquier nacionalidad, entender algunas canciones, ver algunas series, películas, etc…

miércoles, 15 de junio de 2011

Controlling Installation Preference

There is an important point to take into account when developing applicacions for android. And this is the parameter which added to the manifest root says where you want to install your application. It is pretty straight forward to do it. And I dont understand why applications like Facebook doesnt allow you to be installed on your SD (under Froyo 2.2). Something that frees lot of memory on your phone and improves the general perfomance.

package="com.yourcompany.yourapplication.activitiy"
android:versionCode="1"
android:versionName="1.0" android:installLocation="auto">

Now on, I will add this parameter as it says here http://android-developers.blogspot.com/2010/07/apps-on-sd-card-details.html to allow future applications on Android to be moved to the SD. And keep wondering why not all of them have this option enable.