picture

Splash Screen Discussion

April 30th, 2013

I came across an interesting post about splash screens for Android apps. The main thesis of the article is that the Android apps does not need splash screen in most of the cases at. The splash screen is a port of the concept from iOS. For Android apps its just additional overhead that does not make really sense. Here is the link to the article.

Eclipse: IDE Hangs on Loading Workspace

April 29th, 2013

I use my eclipse for MAC (version Juno “Eclipse Java EE IDE for Web Developers”) for both J2EE projects and Android development. I don’t know what’s wrong, but sometime I experience weird eclipse behavior on loading my Android workspace(s). Eclipse just freezes when loading a workspace, showing only the splash screen. After google search, one finds quite quickly a work around, but I never found out, what the real cause for the problem is.
So, the solution is to change to your workspace folder. Afterwards go to

.metadata -> .plugins-> org.eclipse.e4.workbench

and delete workbench.xmi file. Then restart eclipse. Your workspace should be loaded now. Unfortunately your workspace settings like LogCat, Console are lost. You should set your environment again.

Android: How to get current Device Screen Size

April 26th, 2013

If you want to know the size of the screen for a particular device and it’s enough to know the relative size: small, normal, large, extra large you can use the code below. The corresponding constants are described in Android developer documentation


        int screenSize = getResources().getConfiguration().screenLayout &
		                                Configuration.SCREENLAYOUT_SIZE_MASK;
		switch(screenSize) {	    
		    case Configuration.SCREENLAYOUT_SIZE_SMALL:		        
		        Log.v("TEST", "small screen");
		        break;
                    case Configuration.SCREENLAYOUT_SIZE_NORMAL:		        
		        Log.v("TEST", "normal screen");
		        break;
                    case Configuration.SCREENLAYOUT_SIZE_LARGE:		        
		        Log.v("TEST", "large screen");
		        break;
		    case Configuration.SCREENLAYOUT_SIZE_XLARGE:		        
		        Log.v("TEST", "extra large screen");
		        break;    		        
		    default:		        
		        Log.v("TEST", "some other screen size");
		}

Android: Custom Web Browser with buttons: previous, next, stop, reload, close

April 25th, 2013

The topic of this post is a simple web browser view with essential functionalities: back-button, forward-button, stop-button, reload- button and close-button to get back to point in the app, the web browser was called from. The implementation is based on the WebView and the custom WebClient. The steps are quite simple. One needs a piece of layout and custom WebClient.
Read the rest of this entry »

Android AR: Custom native User Initerface with unity3d + metaio SDK

April 24th, 2013

In this post I would like to discuss an implementation of Augmented Reality app based on unity3d ver. 4.1 + Android plugin for unity3d + metaio SDK. I’m not going to go in details of all implementation steps. I think the most critical part is to make augmented reality part of the app to communicate with the native UI. It took me a while to find out how to put a custom overlay layout upon unity view and how the message exchange between two components works. This is what I would like to describe in this post. So, to overlay your AR-app with custom layout following steps are required.

Read the rest of this entry »

My first Augmented Reality APP is on iTunes!

April 24th, 2013

Yes! QIAscanAR app with elements of Augmented Reality has passed the review process and can be downloaded from the iTunes:

https://itunes.apple.com/app/qiascanar/id626212106?mt=8

For testing the app you need the image marker. You can download and print it:

http://www.qiagen.com/~/media/Files/ManualUploads/pdf/AR-Markers/QIAgility-Marker.ashx

or just try the app on the display! Have a fun! ;-)

Android-AR: Forwarding Touch Events from Unity3d to Java

April 23rd, 2013

I’m currently porting one AR-APP from iOS to Android. As for the iOS version I have to add native UI on top of the unity layer. Unity plugin for Android swallows by default all the touch events. I spent hours to find out, how fix this issue. In order to enable touch events in the native Andorid UI, on should add following line to the NativeActivity in the manifest xml:


<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" /> 

Unfortunately this enables only tap events. I tried to build in gesture recognizer for pinch and swipe gestures but all in vain. Unfortunately I have no solution for this so far and had to implement additional UI-elements like slider to be able to interact with the 3d-model.