Observed by Burcu Dogan

burcu dogan's monthly routine. caution: risk of overdose.

Archive for the ‘android’ tag

LG Optimus GT540′ı kullanabildim mi?

leave a comment

Türkiye pazarında Android telefon popülasyonu biraz düşük seyretmekte. Biz bundan yakınırken, LG bize yeni bir telefon getirdi. 599 TLden satacağı bu telefonun adı LG Optimus GT540. Yaklaşık 15 gündür test için bana ödünç verilen bu telefonla ilgili görüşlerimi yazacağım. İzlenimlerim, bu telefonu tasarım ve kullanılabilirlik anlamında diğer Android telefonlardan ayıran özellikler üzerine.

Fiziksel: Cihazın dış ögeleri

Bir cihazın dış güzelliği içi kadar, hatta içinden daha önemli olabilir. Cihazlarla fiziksel temasa girdiğimiz nokta, o cihazın başarılı olup olmayacağı konusunda büyük bir kriterdir.

Dış yüzey tuşları

Telefonu elinize aldığınızda ilginizi çeken ilk şey Android telefonlarda gelen tuşların (ana ekran, geri, menü tuşlarının) bir kısmının soft, diğer bir kısmının ise hard tuşlardan oluşuyor olması. Zira tuşlar iki sıra halinde yerleştirilmiş. İlk sırada dokunmatik (soft) olan menü ve geri tuşları var. Alt sırada ise arama kabul etme, ana ekran ve arama sonlandırma tuşları sıralandırılmış. Android bir telefonda en çok etkileşime geçtiğiniz tuşların geri ve menü tuşları olduğunu söyleyecek olursam bu yerleştirim başarılı sayılabilinir. Fakat dokunmatik olan geri ve menü tuşları ekranın kendisi kadar hassas değil. Bu durum, yanlışlıkla basmaları engellemek için alınmış bir tasarım kararı olarak görünse de doğru bir karar olduğunu düşünmüyorum. Çünkü cihazı test ederken geri tuşu yerinde bir çok kez ekranın sağ alt köşesine, menü tuşuna basacağım diye de birçok kez ekranın sol alt köşesindeki tuşlara dokundum. Telefonun en çok kullanılan iki tuşuna bu kadar sert davranmak zorunda kalmanız parmaklarınız açısından acı verici.

Geri tuşunun ergonomisi hakkında yapılabilinecek bir yorum daha var. Bunlardan en önemlisi bu tuşun yerleşimi. Telefon benim kişisel görüşüme göre solaklar için tasarlanmış. Sağ elinizle kullandığınızda geri tuşu avucunuzun tam içinde kalıyor. Baş parmağınızla ona dokunmanız gerçekten büyük bir uğraş. Ayrıca bu iki soft tuş yüzünden ekranın alt kısmında olan biteni görmek gerçekten imkansız. Soft tuşlar, fiziksel tuşların altında olsaydı belki daha kullanılabilir olurlardı. Özelleştirilmiş ekranlarda ana fonksiyon tuşlarının en alta yerleştirilmesi uygun olmamış, bu ögeler parmaklarınız yüzünden tamamen görünmez kalıyor – Özelleştirme ile ilgili yorumların devamını yazının alt kısmında bulabilirsiniz.

Arama için ayrılmış Android tuşunun ön yüzeyde değil de sağ yan duvara konumlandırılmış olması ise iyi düşünülmüş. Keza, ara sıra yanlışlıkla arama tuşuna basıp arama uygulamasının çalıştırmasının önüne geçilebiliyor.

Ekran özellikleri

320×480 çözünürlüğünde 160dpi’lık resistif bir ekran var önümüzde. Resistif bir ekran kullandıysanız bu ekranların çalışma prensibini biliyor olabilirsiniz. Resistif ekranlar iki katman arasında yer alan hava boşluğunun daralıp genişlemesi sayesinde sizin dokunuşunuzu fark eden ekranlardır. Bu nedenle iPhone veya Nexus One’daki kapasitif ekranlarla karşılaştırıldığında dokunmaya değil basınca duyarlı ekranlar oldukları söylenebilir. Resistif ekranlar bu nedenle kullanırken daha fazla azim gerektiren yüzeylerdir. Özellikle sanal klavyede hassasiyetle ilgili sorunları olan bir ekran oldukça problem yaratabilir. Optimus’un resistif ekranının belirgin en büyük özelliği de bu. Varsayılan olarak numkey ile gelmesi QWERTY klavyesinin yeterince kullanabilir olmadığını kanıtlar gibi. Yatay pozisyonda ise çok daha rahat bir kullanım sağlıyor QWERTY. Açıkcası klavyeyi sürekli olarak yatay pozisyonda kullandım ve herhangi bir kullanılabilirlik sorunu yaşamadım. Göreceli olarak minik sayılabilecek parmaklarım dikey konumadaki klavye ile fazla barışık değildi.

Genel klasmanda en sorunsuz klavye telefon tuş takımı dizilimine sahip olan klavye (son resimdeki). QWERTY’den daha hızlı yazabiliyorsunuz, üstelik strese girmeden. Read the rest of this entry »

Written by Burcu Dogan

July 23rd, 2010 at 2:45 am

Posted in Regular

Tagged with ,

Setting bounds of a map to cover collection of POIs on Android

one comment

Lately, as I browse web for maps related questions on Android, what’s frequently requested is an example of setting bounds of a map (zooming to a proper level and panning) to be able show all of the pins given on the screen.

Most of the maps APIs provide this functionality such as Google Maps API, so developers seem to have problems with implementing theirs. Google Maps API for Android does not provide functionality for setting bounds to a box. Instead, what’s provided is to zoom to a span.

com.google.android.maps.MapController.zoomToSpan(int latSpanE6, int lonSpanE6)

latSpanE6 is the difference in latitudes * 10^6 and similarly lonSpanE6 is the difference longitude * 10^6. You may question how map controllers know where to zoom in just by the differences. For examples, kms between longitudes differ from equator to poles. Fortunately, Google maps projection has them in the same length. This may remind you the infamous South America versus Greenland syndrome. Although Greenland is much much smaller than South America, it doesnt look so with this map projection.

On the below, I implemented a boundary arranger method for MapView. Method takes three arguments: items, hpadding and vpadding. items as you may guess is a list of POIs. Other arguments are a little bit more interesting. hpadding and vpadding is the percentage of padding you would like to leave horizontally and vertically so that pins don’t appear just on the corners. For instance, if you assign 0.1 for hpadding, 10% padding will be given from top and bottom.

BTW, You’ll have to extend the existing MapView and add this method to your own MapView to use this method properly.

public void setMapBoundsToPois(List<GeoPoint> items, double hpadding, double vpadding) {

    MapController mapController = this.getController();
    // If there is only on one result
    // directly animate to that location

    if (items.size() == 1) { // animate to the location
        mapController.animateTo(items.get(0));
    } else {
        // find the lat, lon span
        int minLatitude = Integer.MAX_VALUE;
        int maxLatitude = Integer.MIN_VALUE;
        int minLongitude = Integer.MAX_VALUE;
        int maxLongitude = Integer.MIN_VALUE;

        // Find the boundaries of the item set
        for (GeoPoint item : items) {
            int lat = item.getLatitudeE6(); int lon = item.getLongitudeE6();

            maxLatitude = Math.max(lat, maxLatitude);
            minLatitude = Math.min(lat, minLatitude);
            maxLongitude = Math.max(lon, maxLongitude);
            minLongitude = Math.min(lon, minLongitude);
        }

        // leave some padding from corners
        // such as 0.1 for hpadding and 0.2 for vpadding
        maxLatitude = maxLatitude + (int)((maxLatitude-minLatitude)*hpadding);
        minLatitude = minLatitude - (int)((maxLatitude-minLatitude)*hpadding);

        maxLongitude = maxLongitude + (int)((maxLongitude-minLongitude)*vpadding);
        minLongitude = minLongitude - (int)((maxLongitude-minLongitude)*vpadding);

        // Calculate the lat, lon spans from the given pois and zoom
        mapController.zoomToSpan(Math.abs(maxLatitude - minLatitude), Math
.abs(maxLongitude - minLongitude));

        // Animate to the center of the cluster of points
        mapController.animateTo(new GeoPoint(
              (maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2));
    }
} // end of the method

Written by Burcu Dogan

April 20th, 2010 at 2:51 am

Posted in Regular

Tagged with , ,

Maps Development on Android: Registering a Maps API key

2 comments

Location based applications are  musts on mobile platforms. Android does not have maps natively but Google Maps team is providing an add-on that comes with Android SDK (at least 1.5). In this post, I’m not going to show you how to pop out maps on your little mobile screen, but underline the application signature details related with Maps API.

First of all in our to show map tiles properly, we need an API key. This is all because you are requesting from Google Data API and have to agree with the terms of service. I’m also sure that quote rules also apply.

Every Android application is signed with a signature of the publisher. While obtaining a key, you must provide the MD5 summary of your signature to Google, and Google activates possible transactions between Maps API and the application your signature signs. In order to complete these actions, you have to

  1. Obtain the MD5 summary of your signature. If you do not have a signature, you can use the default one.
  2. Sign up for an API key directly from Google by providing the hash of your signature.
  3. Use API key with map elements and generate a sample map view.

Obtaining an API key

You will have to use the keytool to obtain information about signatures. If you haven’t created one, Android SDK puts a default one in your ~/.android directory. In this tutorial, I’m going to show you how to register with this default signature. Open a terminal prompt and enter

$ keytool -list -keystore ~/.android/debug.keystore

It’s going to ask you the password of the keystore (debug.keystore). Default is “android”. If you receive a MalformedKeyringException, you are giving the wrong password. If everything works great, it will output a few lines of information including the hash. Please read the summary line and copy the hash.

Certificate fingerprint (MD5): E8:F4:F2:BF:03:F3:3A:3D:F3:52:19:9B:58:20:87:68

After obtaining the summary key, you can jump to the next level — signing up for an API key. Give the hash as input and register. Please note the API key Google has given to you.

Generating Maps on Android

MapsAndroid SDK comes with two archives. First one is the android.jar which contains the standard platform libraries. And maps.jar which is a library dedicated to generation of maps. In the maps API, you will notice MapView. You can extend MapView to customize and add new features to show a custom map view. Or invoke the existing methods to perform simple operations like panning, zooming and adding overlays to show information on the default map. There are great tutorials about Android’s map view and controller on web, I simply didn’t want to copy-cat the existing. Google’s Hello, MapView is a place to start.

Multiple-Developer Cases

A signature can only be associated with a single API-key. What you are going to do if development is made across a team? You dont need to create different signatures for each developer and register them to use Data API one by one. Register a single signature and obtain a key. Then, distibute the signature among the developers – better add it to your version controlling system.

Written by Burcu Dogan

November 6th, 2009 at 4:29 am

Posted in Regular

Tagged with , , ,