El Trastero de Arien

miércoles, junio 17, 2009

Android: If you can choose

These last days I've been working hard with my "best practice" about Android, and I have realized that the emulator for Eclipse, that is what I'm using to test it is really really slow. So my piece of advice is: If you can, don't choose Android over Eclipse, at least you test it before and it's faster than mine.

Etiquetas: , , , ,

viernes, junio 12, 2009

Android: Send SMS 2

There was a thing missing in my previous explanation. We have to give permissions to the application to be able to send SMS's. In order to do this we have to modify the AndroidManifest.xml file. In this file we have to add the following:

We should put this line of code just before the end of the xml file

Etiquetas: , , , ,

Android: 2 emulators

As you have read in the previous post I'm trying to send SMS from one device to another. So now I want to test if the application works correctly, so I need two instances of the emulator. To get this second android is quite easy:

  1. We create a new avd (we follow the steps we did when installing with another name)
  2. When we want to run the application we launch one with the first avd and the other one with the other avd. To do this we follow these two steps:
  1. Run --> Run Configurations ... a new windows is displayed
  2. In our configuration we go to the Target tap and we choose one or the other avd depending in which one we want to launch

It's quite easy but probably very useful

Etiquetas: , , ,

miércoles, junio 10, 2009

Android: Send SMS

When I went to the Movilforum, a thing that many of the enterprises there told us was that SMS is a communication method that right now has a lot of possibilities and is not going to die in a near future.
So, the first thing I'm planning to do is to send SMS's with android (later I will link this feature with another one's). The class we are going to use is SmsManager. This class has a method called sendTextMessage that will send the sms. To our code we will have to add the following lines:

SmsManager SMSM = SmsManager.getDefault(); //Get the default instance of the SmsManager
SMSManager.sendTextMessage(destinationAddress, null, S, null, null);


And now let's explain a bit this commands:
in the sendTextMessage method, destinationAddress is a string that is going to be de address (mobile phone we want to send the sms) and S (probably here is not a quite good name) is another string that is the text of the SMS.
The rest of parameters we have set them to null, the first one is to indicate that we want to run with a default configuration, and the other two are to avoid confirmations of read and things like that.


P.D. In the simulator the string that we have to put as the destinationAddress is "myAvd:5554" for example, where 'myAvd' is how we have called the avd and the numbers are the number that appear up in the screen of the emulator.

Etiquetas: , , ,

miércoles, junio 03, 2009

SURPRISE!!!

OH MY GOD!!!!
I can believe it. The last time I wrote here was.... bufff begining of December last year!!!!
As you can supose, I have a lot of work from University:


And in the following weeks I will upload here parts of this work, parts of my final practice of Mobile Applications, that I will do in English and in Android.

Etiquetas: , , ,

miércoles, octubre 08, 2008

Batería

Mi tablet PC debe de estar en las últimas, a parte de que ya se cae a trozos. Ayer no sé que ida de pinza le dio al tablet y pude capturar el siguiente pantallazo:


Con un 59% de la batería estimaba que le quedaba suficiente como para agunatar 12 horas y media??? vamos no se lo cree ni él. Después de tomar la captura volvió a su ser y dio una estimación mas acertada de lo que iba a durar. Pero fue un momento gracioso.

Etiquetas: , ,

domingo, junio 22, 2008

Curiosidad III

El otro día hablando con "Kike Kike Kike" me comentó la siguiente fase del huevo de pascua del aptitude.

Etiquetas: , ,

sábado, mayo 17, 2008

Curiosidades II - La vaca entera

El otro día descubrí el "Huevo de Pascua" del apt-get o del aptitude. La verdad que no los había visto nunca, será que he escrito siempre bien los comandos o que nunca he leído lo que pasaba si ponía mal los comandos. En todo caso, busqué un poquito más y encontré la vaca entera:

Etiquetas: , ,

lunes, mayo 12, 2008

Curiosidades

Estaba yo tan tranquila toqueteando mi Debian. Cuando he tenido el siguiente mensaje:


Curioso cuando menos

Etiquetas: , ,