Now we are finishing our Blackberry development tutorial. It take so long i know but time is limited for me 🙂

Sorry for this situation.

First, I want to share links of previous posts.

Part 1

Part 2

Now Part 3 is coming …

Blackberry de uygulama geliştirme örneğimizi bu bölüm ile bitiriyoruz. Tabi ki şimdilik 🙂 Yeni konular elbetteki gelecektir. Bu bölümü bitirmem uzun zaman aldı farkındayım maalesef, bu konuda üzgünüm ama zaman hepimiz için çok kısıtlı biliyorsunuz.

Kusuruma bakmayın diyerek son bölüme başlıyorum 🙂

Öncelikle, eski bölümlerin linklerini sizlerle paylaşmak istiyorum. (Linkler yeni pencerede açılacaktır.)

Bölüm 1

Bölüm 2

Şimdi Bölüm 3 …

Album: Search People – Album

Now i am using updated Eclipse platform. Eclipse 1.1.2 is available. I don’t know is there newer version right now but i used this version during development. But i think, all codes are backward compatible.

We will use following development IDE & tools during our tutorial.

  • Lotus Domino 8.5.1
  • Lotus Domino Designer 8.5.1
  • Eclipse 1.1.2 (With this version, you have to download OS plugins (4.5.0 or etc) from Available Software Sites screen using http://www.blackberry.com/go/eclipseUpdate/3.5/java)
  • BlackBerry Email and MDS Services Simulator Package v4.1.4 (Download)
  • Sun Java (TM) Wireless Toolkit 2.5.2_01 for CLDC (Download)

Our sample Web Service Provider (SearchPeople) updated.

We created stub files using Java Wireless Toolkit. Imported to our Blackberry Project.
Eclipse Project Files
Our project files are listed below. I tried to add comments in source files in detail. I think, it will be enough but if not, I am always here you know, write me 🙂
– AboutScreen.java : About Screen. Protected, Don’t touch, it can bite you :))
– Common.java : Using for common variables
GlobalNotificationScreen.java : Additional screen. Using to show notifications
– ListFieldExt.java : Extended ListField class. I got it from internet (sample application) but i don’t remember the reference/author. I am so sorry the author.
– PERSON.java : Webservice Stub File
– PERSONLIST.java : Webservice Stub File
– SearchPeople_Stub.java : Webservice Stub File
– SearchPeople.java : Webservice Stub File
– UiAppWelcome.java : Entry Point of an Application
– SplashScreen.java : We covered splash screen sample. It’s timed splash screen. After determined time end, it closes automatically and pushes main screen.
– SearchPeopleScreen.java : Main Screen. We covered context sensitive menu, get value from modal screen, editfield, buttonfield objects
– SelectPersonScreen.java : Additional Screen. We covered ListField object.
Also we covered multiple language support using resource file. And also it is related to device language. The application is very clever, automatically identify language and shows application in this language 🙂
– SearchPeople_en.rrc : Resource File for English language
– SearchPeople_tr.rrc : Resource File for Turkish language
– SearchPeople.rrc : Resource File
– SearchPeople.rrh : Resource File
Links
If you have any question, please feel free to register and send comment to me. I’m sure, I will reply in a short time.
Thanks my friends …

Album: Search People – Album

———————

Artık yeni bir Eclipse platformu kullanıyoruz. O kadar zaman geçti ki yeni versiyon bile çıktı ya 🙂 Eclipse 1.1.2 versiyonunu kullanıyorum şuan. Ancak yeni versiyon çıktı mı açıkcası araştırmadım, ihtiyaç da duymadım.

Aşağıda listelediğim geliştirme ortamlarını ve araçları kullandık/kullanacağız.

  • Lotus Domino 8.5.1
  • Lotus Domino Designer 8.5.1
  • Eclipse 1.1.2 (Bu versiyon ile farklı bir OS için plugin eklemek için Window > Settings > Available Software Sites bölümünde http://www.blackberry.com/go/eclipseUpdate/3.5/java linkini kullanıyoruz. Bu linki kullanarak farklı OS ler ile alakalı Plugin indirilebilmektedir. Ben 4.5.0 ı indirdim ve bu versiyonda geliştirme yaptım mesela.)
  • BlackBerry Email and MDS Services Simulator Package v4.1.4 (Download)
  • Sun Java (TM) Wireless Toolkit 2.5.2_01 for CLDC (Download)

Örnek Web Service Provider elemanımızın kodlarında birkaç küçük geliştirme oldu. NSF i sayfanın en altında linkler bölümünde bulabileceksiniz.

Web Services Provider için Stub dosyalarını Java Wireless Toolkit kullanarak oluşturmuştuk. Daha sonra bu dosyaları da oluşturduğumuz boş Blackberry Projesine import etmiştik.

Projemizde aşağıdaki dosyalar mevcuttur. Kodlarda mümkün olduğu kadar çok ve açık ifadelerde yorum (comment) kullanmaya çalıştım.

Eğer yetersiz gelirse ben buradayım, yazmaktan çekinmeyin lütfen 🙂 Hatta yazınnn yazınnn, hiç follower ım yok yahu 🙂

– AboutScreen.java : About Screen. Dokunmayın, ısırırrr  :))
– Common.java : Using for common variables
– GlobalNotificationScreen.java : Additional screen. Using to show notifications
– ListFieldExt.java : Extended ListField class. I got it from internet (sample application) but i don’t remember the reference/author. I am so sorry the author.
– PERSON.java : Webservice Stub File
– PERSONLIST.java : Webservice Stub File
– SearchPeople_Stub.java : Webservice Stub File
– SearchPeople.java : Webservice Stub File
– UiAppWelcome.java : Entry Point of an Application
– SplashScreen.java : We covered splash screen sample. It’s timed splash screen. After determined time end, it closes automatically and pushes main screen.
– SearchPeopleScreen.java : Main Screen. We covered context sensitive menu, get value from modal screen, editfield, buttonfield objects
– SelectPersonScreen.java : Additional Screen. We covered ListField object.
Çoklu dil desteğini de bu projede ele aldık. Çoklu dil desteğini Resource File ile nasıl yaptığımızı, aynı zamanda -en can alıcı nokta- kullanıcının cihazında kullandığı dile göre uygulamanın dilinin nasıl ayarlandığını da bu projede ele aldım.
Yani tek projede birçok aranan fonksiyonu kullanmaya çalıştım arkadaşlar, olabildiğince …
– SearchPeople_en.rrc : Resource File for English language
– SearchPeople_tr.rrc : Resource File for Turkish language
– SearchPeople.rrc : Resource File
– SearchPeople.rrh : Resource File
Links
Herhangi bir sorunuz olursa, lütfen sormaktan çekinmeyiniz. Mail atınız, Yorum giriniz … Her türlü soruya hazırım merak etmeyin :))))
Teşekkürler …

5 Comments

  1. Melissa Ngatiman

    Hi Ferhat,

    Good post on this.

    I have developed a Blackberry Java application that connects to Lotus Notes Web service, using the same principle as described in your post.

    Default and Anonymous has “No Access” to the Lotus Notes database. So, first, I have put the HttpConnection to authenticate user to the database. Once authenticated, it will then call a specific function in the Web Service.

    It has been working if it connects to Lotus Notes Web Service in our development server. However, the connection does not work in our production server.

    We have investigated into this issue. What we find is that the setting of Session Authentication in domino server document is disabled in development server, but enabled (selected as Single Server) in production server.

    As the Session Authentication is set to “Single Server” or “Multiple Server”, the send/receive call to the Web Service returns an error : “either SOAP Envelope or SOAP body is missing”.

    With this option disabled, user does not need to authenticate for send/receive call to the web service. And with this option enabled, each send/receive call requires authentication.

    Do you know a way to connect from the Blackberry Java app to the Lotus Notes Web Service, where the Session Authentication is enabled in the domino server? Any directions on this would be much appreciated.

    Thank you.

    Best Regards,

    Melissa Ngatiman

    Reply
    • Hello Melissa,

      I didn’t find solution yet about http authentication using jsr 172. I mean, using generated stub classes etc. I don’t know maybe it doesn’t support basic authentication, so I think, some people developed ksoap package.

      If I needed to make authentication with server, i used standart http connection methods and basic authentication. It’s very complex, hard to write -you know post xml and get xml and parse it- but it works. Google it “httpgetandpostdemo” keyword. You will see 1 result -forum post- in this post, you will see HttpLibrary.zip file. You can use it as reference to make http connection. I am writing on mobile, so i didn’t write exact url. Maybe it can be solution for you. This zip file includes very good classes. You can test it directly from your device.
      You can use http get and post with your lotus web service providers and also for your agents, views etc.

      hope it helps.

      Regards
      Ferhat

      Reply
  2. Hi,
    I am trying to access a URL, using Connector class, i got connection but when i used connection.openInputStream, applcation gets hang for sometime and nothing is called what written after that line.

    I am using BlackBerry Java Plug-in 1.3.0 for Eclipse.

    Please help.

    Reply
  3. Merhabalar, blackberry uygulama geliştirme için Türkçe kaynak neredeyse sıfır. Bu yazı türkçe fakat öncekiler ingilizce, java bilen biri eminim ingilizce dökümanıda rahatlıkla anlayabilir fakat bilmeyen için bberry uygulama geliştirme konusuna giriş yapmak isteyen kişiler için ne yazık ki anlayabileceği seviyeden değil. Umarım en kısa sürede türkçe makalelerde hazırlarsınız.
    teşekkürler

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *