Smartphones and tables used increasingly for user reviews prior to purchase

A study of emerging trends on consumer usage of smartphones and tablets in the US, featuring 5,600 men and women, has indicated that 74 percent of responders rely on smartphones and tablets for user reviews prior to purchase.

 

Read the entire article from eyefortravel.

Tagged , ,

Airbrake for Android Released

Are you are using Airbrake to monitor your web or mobile applications crash/error reports? Would you also like to track those errors using your Android device? If the answer is Yes and Yes, check out the next link as we’ve released a small and free app that allows you to monitor one or more Airbrake accounts – here.

Tagged , , ,

Hiding test Activities in release build

Some times it is convenient to add test activities to Android application which you are able to launch from application menu but should only be visible while developing. Manually removing those from AndroidManifest is one way but then you need to add them back if you want to use them again for testing. Unless you want to create a special test project for this use or create some build scripts, here is one way to keep them but hide them in the release build.

In your AndroidManifest, mark the activity as disabled:

<activity android:enabled="false" android:name=".TestIntentActivity">
</activity>

in your Application class or in your main activity, re-enable the activity if in development, e.g. based on applications debuggable flag:

int applicationFlags = getApplicationInfo().flags;
boolean debuggable = ((applicationFlags & ApplicationInfo.FLAG_DEBUGGABLE) != 0);
PackageManager pm = getPackageManager();
ComponentName testActivity = new ComponentName(this, TestIntentActivity.class);
pm.setComponentEnabledSetting(testActivity, 
  PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 
  PackageManager.DONT_KILL_APP);

Note that this requires that android:debuggable attribute is set according to the build type. The downside naturally is that the test activity is packaged into the release build but for a small scale project this might feasible.

Android Carhire SDK released

A pilot implementation of Carhire SDK was released today to Android Market for limited audience. The SDK was implemented for Travel Agency Matkapörssi Oy and can be downloaded from https://market.android.com/details?id=com.matkaporssi.android.apps.carhire.

Kinetik Oy’s Carhire SDK is an Android car rental application that can be re-branded for any company. The SDK is backed by TravelJigsaw central reservation system. Read more here.

Tagged ,

Classes inside .apklib not showing up in Netbeans

If you are using Netbeans with Maven to build Android library projects, you may have noticed that Netbeans does not detect classes inside an .apklib – thus making it difficult to auto-complete class names and generally marking all class references to the library project as error. Here is a quick but not the most elegant work-around to make Netbeans detect these classes:

In your library project, add an extra jar plugin with custom classifier (without the classifier, .jar is not build):

<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-jar-plugin</artifactId>
 <executions>
 <execution>
 <phase>package</phase>
 <goals>
 <goal>jar</goal>
 </goals>
 <configuration>
 <classifier>classes</classifier> 
 </configuration> 
 </execution>
 </executions>
 </plugin>

In the project depending on the library project add the dependency with provided -scope:

<dependency>
 <groupId>some.group.name</groupId>
 <artifactId>some-artifact-name</artifactId>
 <version>1.0.0-SNAPSHOT</version>
 <classifier>classes</classifier>
 <scope>provided</scope>
 </dependency>

This should be enough to make Netbeans happy and to detect classes inside your library project.


 


		
Tagged , , ,

Running Android Instrumentation tests from Command Line

Android Developer site has extensive tutorials on testing Android applications with Eclipse but should you not be using Eclipse you may find the documentation somewhat lacking.

These comments and notes are based on the official guide found here: http://developer.android.com/guide/developing/testing/testing_otheride.html and using Android SDK Tools Rev 15, Platform Tools Rev

As per the documentation:

Quick build and run with Ant

You can use Ant to run all the tests in your test project, using the target run-tests, which is created automatically when you create a test project with the android tool.

This clearly does not work as the current targets are:

clean, debug, install, installd, installi, intallr, 
installt, instrument, release, test, uninstall

So to get tests running on a device/emulator, you need to:

  1. Build your test package: ant debug
  2. Install and run it: ant installd test

After making modifications to your test code, you’ll need to package and install the test apk again, just saying ant test will only re-run the already installed test package.

Hope this helps to get more tests created.


Tagged , ,
Follow

Get every new post delivered to your Inbox.