I thought I would soon become the last person on earth using Sony Ericsson K750i. I'm not a kind of a hardware geek, so I replace the mobile phone when the old one is unusable. However the problem with my old Sony Ericsson is that it is almost indestructible (it even survived all my crashes during the downhill riding). Fortunately I calculated that using mobile phone as HSDPA modem is cheaper than paying for pre-paids for both mobile Internet and mobile phone.
Since I perceive Apple products as a bit too... pink? ..., I decided to buy an Android device. The cheapest one for the sensible monthly fee.
That's how a become an owner of the Samsung Galaxy Ace.
My general impression is as follows - I'm amazed how useful it is to own a smartphone. :) I would like to stress it once again - I'm not a kind of hardware of gadgets geek. I'm usually not getting easily excited by these kind of things. But this time I must admit - I'm pretty excited by the possibilities offered even by the cheap Android device like the one I own.
Showing posts with label android. Show all posts
Showing posts with label android. Show all posts
Monday, May 21, 2012
Wednesday, October 19, 2011
Android resources summary
This is the summary of Android resources I find particularly useful.
Books
- Hello, Android (3th edition) by Ed Burnette, Pragmatic bookshelf, 2010
Tools documentation
Friday, October 14, 2011
Starting up the Android project with android-maven plug-in
For some people (like me) all software projects must be Mavenized. Android projects are no exception from this rule.
The motivation behind using Maven with Android is:
- dependency management
- smooth integration with Maven lifecycle
- support for exisitng tools (Continious Integration, ProGuard obfuscator, Check Style, Find Bugs, JDepend, etc) via Maven plug-ins system
At first I created the Android project from the archetype...
mvn archetype:generate \ -DarchetypeArtifactId=android-quickstart \ -DarchetypeGroupId=de.akquinet.android.archetypes \ -DarchetypeVersion=1.0.6 \ -DgroupId=helloCompany \ -DartifactId=helloAndroid
...and then built it...
hekonsek@Drone:~$ cd tmp/helloAndroid hekonsek@Drone:~/tmp/helloAndroid$ mvn clean install ... [INFO] Installing /home/hekonsek/tmp/helloAndroid/target/helloAndroid-1.0-SNAPSHOT.apk to /home/hekonsek/.m2/repository/helloCompany/helloAndroid/1.0-SNAPSHOT/helloAndroid-1.0-SNAPSHOT.apk [INFO] Installing /home/hekonsek/tmp/helloAndroid/target/helloAndroid-1.0-SNAPSHOT.jar to /home/hekonsek/.m2/repository/helloCompany/helloAndroid/1.0-SNAPSHOT/helloAndroid-1.0-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13 seconds [INFO] Finished at: Wed Oct 12 20:47:26 CEST 2011 [INFO] Final Memory: 42M/493M [INFO] ------------------------------------------------------------------------
At first glance everything went fine so we expect to have Android APK artefact packaged and ready to be deployed to the device. However when I try to do the latter I get the following error message:
hekonsek@Drone:~/tmp/helloAndroid$ mvn clean install android:deploy ... [INFO] 279 KB/s (14872 bytes in 0.051s) pkg: /data/local/tmp/helloAndroid-1.0-SNAPSHOT.apk Failure [INSTALL_FAILED_INVALID_APK] [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------
I also tried to deploy the APK file manually (using the ADB tool) but Android emulator still claims that the package is broken. I assume then that the current android-quickstart archetype is broken.
My workaround for the broken android artefact is to download zipped samples from the android-maven plug-in site and use Scala example as a template for my new project. As a bonus, Scala sample comes with tests, Scala language support and ProGuard obfuscator configured.
Now just start your Android emulator, go to the directory of the project of yours, build the project and deploy it to the running emulator.
hekonsek@Drone:~$ cd jayway-maven-android-plugin-samples/scala
hekonsek@Drone:~/jayway-maven-android-plugin-samples/scala$ mvn clean install android:deploy
...
[INFO] [android:deploy {execution: default-cli}]
...
[INFO] 170 KB/s (8959 bytes in 0.051s)
pkg: /data/local/tmp/Scala-1.0.0-SNAPSHOT.apk
Success
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------
Now enjoy your new Android application deployed and running on the emulator.
Subscribe to:
Posts (Atom)