Category: Android
Yeej! Yesterday I read on a Dutch forum that the Asus EEE Pad transformer with dock arrived in the Netherlands. So immediately I drove to Amsterdam to pick one up
And my, my what a fancy device it is!
The specs
The tablet uses the 1GHz Nvidia Tegra 2 processor, has 1GB RAM, a Gorilla Glass multitouch screen (10.1 inches), 1.2 and 5MP cameras, gyroscope, compass, GPS, HDMI output and so on.
Keyboard dock
The keyboard is little more than a dock with a trackpad and battery (without the dock, the battery life drops to 9.5 hours). With the dock Asus claims a battery life of 16 hours.
Once the dock is attached Android presents a mouse cursor. This actually works very good, especially when writing emails and doing quick navigation.
Micro + SD
The device itself has a MicroSD expansion slot. The keyboard dock includes a SD slot. I have not tried them yet. One of the main reasons for not buying the 32GB version was the availability of the memory expansion slot. The device will cost you 100 euro more for the 32GB version while 32GB of MicroSD memory only cost a much as 45 euro.
System update
After the initial setup I got a notification that a system update was available. So I installed it an rebooted the device. For some reason it gave me a black screen after the update installation so I had to reset it after the update by pressing the power button. When it started the device again I noticed that Android 3.1 was installed on it, yeah baby!

Multiple Google accounts
What I like already is that it is very easy to setup multiple Google accounts and switch between them in application. Both my wife and I will be using the device.
Agenda
The build in Google Agenda is one of the features I use most often to synchronize appointments between multiple calendar. The Agenda app in Honeycomb has a fresh and clean interface that is wel usable on tablet format.
Market
The market app is a bit different in Honeycomb from what I am used to on my Android 2.2 phone. One flaw in the Honeycomb market is that you are not able to rate applications in the market app.
Not all apps are ready for Honeycomb yet. Some apps work but a lot of them need to be updated to work on the 3.x version of Android. I have sent a few crash reports to developers already
More to come
I have been playing around with it today but it runs very smooth. I will post some impressions later this week or next week.
I’ll Keep you posted!
The org.springframework.web.client.RestTemplate lacks support for gzip encoding. The RestTemplate is a class that is provided by the spring-android module for calling RESTfull services.
The Accept-Encoding header for gzip is not being added to the request by spring-android. I have added support for gzip to the RestTemplate and I created a patch for it. See the extended RestTemplate below:
package com.oudmaijer.android.rest;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.util.Assert;
import org.springframework.web.client.*;
import java.io.IOException;
import java.net.URI;
/**
* Adds support for gzip encoding to the Spring RestTemplate
*/
public class GzipRestTemplate extends RestTemplate {
/**
* {@inheritDoc}
*/
@Override
protected <T> T doExecute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor) throws RestClientException {
Assert.notNull(url, "'url' must not be null");
Assert.notNull(method, "'method' must not be null");
ClientHttpResponse response = null;
try {
ClientHttpRequest request = createRequest(url, method);
if( request.getHeaders() != null ) {
request.getHeaders().add("Accept-Encoding", "gzip,deflate");
}
if (requestCallback != null) {
requestCallback.doWithRequest(request);
}
response = request.execute();
if (!getErrorHandler().hasError(response)) {
logResponseStatus(method, url, response);
} else {
handleResponseError(method, url, response);
}
if (responseExtractor != null) {
return responseExtractor.extractData(response);
} else {
return null;
}
} catch (IOException ex) {
throw new ResourceAccessException("I/O error: " + ex.getMessage(), ex);
} finally {
if (response != null) {
response.close();
}
}
}
private void handleResponseError(HttpMethod method, URI url, ClientHttpResponse response) throws IOException {
if (logger.isWarnEnabled()) {
try {
logger.warn(
method.name() + " request for \"" + url + "\" resulted in " + response.getStatusCode() + " (" +
response.getStatusText() + "); invoking error handler");
} catch (IOException e) {
// ignore
}
}
getErrorHandler().handleError(response);
}
private void logResponseStatus(HttpMethod method, URI url, ClientHttpResponse response) {
if (logger.isDebugEnabled()) {
try {
logger.debug(
method.name() + " request for \"" + url + "\" resulted in " + response.getStatusCode() + " (" +
response.getStatusText() + ")");
} catch (IOException e) {
// ignore
}
}
}
}
The least unobtrusive way to change the RestTemplate is not to change it. I decided to override the doExecute method because I want the RestTemplate functionality as it is right now. I also had to included the private functions being called by the RestTemplate. I could have used the exchange() function in the RestTemplate but this is to abstract IMO.
How to use
Instead of instantiating the Spring RestTemplate you can now use the GzipRestTemplate. And example of using the RestTemplate for reading JSON responses:
...
RestTemplate restTemplate = new GzipRestTemplate();
restTemplate.setRequestFactory(new SimpleClientHttpRequestFactory());
List<HttpMessageConverter<?>> mc = restTemplate.getMessageConverters();
MappingJacksonHttpMessageConverter json = new MappingJacksonHttpMessageConverter();
List<MediaType> supportedMediaTypes = new ArrayList<MediaType>();
supportedMediaTypes.add(new MediaType("text", "html"));
supportedMediaTypes.add(new MediaType("application", "json"));
json.setSupportedMediaTypes(supportedMediaTypes);
mc.add(json);
restTemplate.setMessageConverters(mc);
JsonResult jsonResult = restTemplate.getForObject(url, JsonResult.class);
...
And a pom.xml of an application that uses the RestTemplate:
...
<build>
<sourceDirectory>src</sourceDirectory>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>maven-android-plugin</artifactId>
<version>2.8.3</version>
<configuration>
<sdk>
<path>/path/to/android-sdk-windows</path>
<platform>8</platform>
</sdk>
<emulator>
<avd>my_avd</avd>
</emulator>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
</plugins>
</build>
<dependencies>
...
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>2.2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.android</groupId>
<artifactId>spring-android-rest-template</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.6.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<!-- For testing against latest Spring snapshots -->
<repository>
<id>org.springframework.maven.snapshot</id>
<name>Spring Maven Snapshot Repository</name>
<url>http://maven.springframework.org/snapshot</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<!-- For developing against latest Spring milestones -->
<repository>
<id>org.springframework.maven.milestone</id>
<name>Spring Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
<snapshots><enabled>false</enabled></snapshots>
</repository>
</repositories>
...
Finally a Hudson version that supports Maven 3! Olivier Lamy has put out a version on his site as a Christmas present:
Version 1.389 was release on 24th of december and is still a snapshot version. I tried version 1.389 with Maven 3.0.1 and seems to be working fine. Now I can safely abandon Maven 2
Also make sure to check out the Maven3 support for Hudson @ hudson-ci.org.
A few days ago I bought a Point of View Android based Tablet. The device has a nVidia Tegra 2 chipset and is capable of playing HD content. The Point of View MobII basically is a rebranded Advent Vega Tablet with some extras.
Since I have a HTC Desire Android based smartphone I wanted to install the apps that I already knew like, for example, Angry Birds, YouTube, K9 mail, Skype, WinAmp, etc. I was really pissed off to find out that the Market app is not available on the POV MobII tablet but instead has the AndroidPit market build-in. Thank god for the Internet, there is a workaround available
I found the solution on a Dutch forum, click on this link.
What you need to do to get the Market working
Download a zip file called market_update0.zip from http://itablet.freeoda.com, this is the same link the AppDownload application will open. The Android Forum tab contains a link to the market update, this will open an anoying site that requires you to wait for 60secs for the file to download. I`ve uploaded the file to my DropBox account you can download it here directly.
I copied the zip file to a MicroSD card and inserted the SD card into the tablet. Make sure NOT to extract the files and install the .apk files manually, this wont work. It is also not necessary to root the device! Just put the downloaded zip on the MicroSD card.
Once the ZIP is on the MicroSD card and the card is inserted into the table, go the to the device Settings and then select to the Software Tool. Select the Software Update option and point to the market_update0.zip file. The device will now reboot and apply the software update. After the reboot you have a working Market.
Market Fix
I have already installed most of the apps I know from my Android Phone. On a side note, not all the apps are compatible with the tablet resolution, I also noticed that some apps are not available in the store. This will get you most missing apps from the market, except some “protect market apps”
Setting–>Manage Applications–>All–>Market (Clear Cache then ‘Force Stop’ — DO NOT clear data)
Setting–>Manage Applications–>All–>Google Services Framework (Clear data then ‘Force Stop’)
REBOOT again
After the reboot you can download Google Maps and Gmail right from the market.
Advent Vega internals
Since the PoV and Advent Vega are identical, check out the following page if you want to view the internals of your PoV MobII. Warning, opening the device is at own risk: http://android.modaco.com/content/advent-vega-vega-modaco-com/324250/vega-internals/
Update
Also make sure to check out the latest version of the firmware: http://downloads.pointofview-online.com/Drivers/
Update (2)
Make sure to check out the great work of MoDaCo who build a ROM for the Advent Vega. This device is hardware identical to the Point of View. Try installing this ROM (at your own risk) if you want to get the Google Services working like Market, Calendar etc. Check out this forum.
Enjoy!!
There is a really great video on youtube on how to optimize your Android views for performance. When you are using ListViews or images then it is really worth watching this video.
http://www.youtube.com/watch?v=N6YdwzAvwOA
Also check out the developer blogs on User Interfaces: http://android-developers.blogspot.com/search/label/User%20Interface


