Skip to main content

Posts

Tips for Developer: Rating

An app needs good rating for better place in store (App Store, Play Store, ...),. So as a developer, you should use some tricks to increase rating. Here's some short tips for that; Tip 1: Good App With Great UI/UX First thing first, app should have to be useful and understandable for users. Besides it should have a modern UI and a simple but functional UX. For example there are a lot of Note taking apps. They all do same simple thing. But some note apps used by millions and some only dream about it :) Different factors impress usage. But personally, I want a note taking or tasker app to be simple as a paper and help me like an assistant. Tip 2: Do Not Force To Rate It is a mistake. When users open an app, definitely they want to use it for something. Instead, if app shows a dialog for rate like "Hey, do you like my app, go to store an give me 5 start.", users hate it. In most case, (s)he will delete it, because app is supposed to do thier main objectives, n...

How to change position of MyLocationButton on new Map API v2 - 2

In my previuos post[1], i mention a workaround for changing buttons on Google Map which we use with google services. It is good to know they listen developers and make their products more development friendly. (I hope it goes like that way all the time and all the product lines of Google) Now we have a method for setting padding of map. It is add padding to useful area of map. We can see full screen map but with padding we can use prefered area of it. It is good for overlay action bar and other things on map view. [ 2] They write a blog and take a video about it. Read blog and watch video if you are using google map in your app :) [3] And finally, They add this method because of this issue. That means, if you find a bug or want extra feature from and api, write to google via this issue tracking system. [1] http://blog.kozaxinan.com/2013/08/how-to-change-position-of.html [2] https://developers.google.com/maps/documentation/android/map#map_padding [3] http://googlegeodeve...

Geocoder is not working, instead use google maps

I noticed that Geocoder does not work for a month in my app. I tested it different simulator and device. But i never get a address. After test i search another method for find address. While i search this, i notice i am not alone with geocoder issue. Other developers use a work arround. I added a few line of code for encoding UTF-8 characters. public static List < Address > getStringFromLocation ( double lat , double lng ) throws ClientProtocolException , IOException , JSONException { String address = String . format (Locale. ENGLISH , "http://maps.googleapis.com/maps/api/geocode/json?latlng=%1$f,%2$f&sensor=false" , lat, lng); HttpGet httpGet = new HttpGet(address); HttpClient client = new DefaultHttpClient(); client.getParams().setParameter(CoreProtocolPNames. HTTP_CONTENT_CHARSET , "UTF-8" ); HttpResponse response; StringBuilder stringBuilder = new StringBuilder(); List<Address> retList = null ;  respo...

Yeni geliştirme ortamımın ilk üyesi Genymotion

Genymotion Android e uygulama geliştirmeye başlamak çok kolay. Bunun için developer.android.com üzerinden Android Bundle'ı indirmeniz yeter. Üstelik Android cihazı ihtiyacınız bile yok. PC üzerinde Android ortamını simule edebilirsiniz. Fakat yıllardır Google tarafından bize sunulan AVD (Android Virtual Device)  x86 işlemciler üzerinde çok yavaş çalışmakta. Her ne kadar Intel'in driver çıkarması ve Google ın çalışmaları ile biraz olsun hızlansa da animasyon oyun performans gerektiren uygulamalarda yararsız kalıyor. Bu yüzden sürekli kişisel cihazım ile zimulasyon ve testler yapmaktayımdım. Geliştirme yaparken sürekli kendi telefonum üzerinde simulasyon yapma durumum Genymotion ile karşılaşınca son buldu. Nexus 4 telefonumdan bile hızlı çalışan bu Android sanal makina Google service leride kullanabiliyor. Windows, Mac, Linux ortamlarında rahatlıkla kurulup kullanıma bağlayabildiğimiz Genymotion sayesinde yazdığım kodları daha hızlı test edebiliyorum. Google ın sunduğu yav...

How to change position of MyLocationButton on new Map API v2? Explained

When an app use map and design some layout on this map (TextView, Button or image), developer needs to change position of default buttons of map view. (MyLocationButton, ZoomControl or compass...) As far as i know, there are two possible way for changing position of myLocationButton's position. 1- * - Disable it     * - Create new button programmatically     * - Add animateCamera(toCurrentLocation) to onClickListener of this button     * - And place it wherever you want But if you don't want to write all that there is a hack for that. 2 - * - findViewById() of hardcoded button with; ZoomControl id = 0x1 MyLocation button id = 0x2      * - And do whatever you want: // Find map fragment SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map); // Find myLocationButton view View myLocationButton = mapFragment.getView().findViewById(0x2); if (myLocationButto...

Cursor Loader nasıl kullanılır? Örnek

Neden ihtiyacımız var? Yanıt basit; çünkü Cursor Loader query fonksiyonunu ve devamında sonuçları işlemeyi arkaplan thread i olarak yapmaktadır. Bu nedenle uzun zaman alan SQlite işlerinde normal thread ler gibi kullanıcı arayüzünü (UI) kilitlememektedir. Eski yöntemi : Activity.managerQuery. Ne zaman kullanmamız lazım?             SQlite tan veri çekeceğimiz her zaman kullanılabilir. Arkaplan işi olduğu için ne kadar sürerse sürsün kullanıcıyı rahatsız eden UI kilitlemeye neden olmayacaktır. Nasıl kullanılır?             Başlangıç; Kullanabilmek için ilk önce Content Provider dan bir query döndürebilmemiz lazım. Hadi basit bir query methodu yazalım. İçerisinde Android telefon modellerinin sıralandığı bir database imizin olduğunu varsayalım. Ve query sonunda bu listenin dönmesini sağlayalım. Bunun dışında query yi yavaşlatmak için kodun içine Thread.sleep() me...