Windows Phone na HT-ovom Aplicentru

image[English summary: Windows Phone apps appeared on Croatian Telecom’s mobile apps repository, my apps were the first ones there.]

Vjerujem da ste čuli za HT-ov ApliCentar, repozitorij mobilnih aplikacija predstavljen za vrijeme prošlogodišnjih WinDaysa. Od početka sam prigovarao što nemaju Windows Phone kao jednu od platformi  i nepravda je napokon ispravljena – od neki dan i Windows Phone platforma postala je jedna od stavki padajućeg izbornika.

Prve aplikacije s oznakom te platforme su moje CroAutoInfo i CroParking, što mi je posebno drago. Još čekam da uvrste i CroWeather. Smile

0  

Zbogom, Grupiranje.com :-)

[English summary: The short story about my local groupon-clones aggregator. Ok, it’s not mine any more.]

grupiranje-screenshot

Sve je počelo prije nešto više od godinu dana kada sam tražio projekt koji bih napravio da isprobam neke nove tehnologije, ili stare na nov način. Radim to relativno često – u komercijalnim projektima se sve svodi na brzinu, rokove, efikasnost i ono što naručitelj želi. To je naravno potpuno logično i u redu, no ponekad volim sam sebi dati neki zadatak i istjerati ga do kraja, čisto da ja budem taj koji odlučuje o svim aspektima, posebno onima koji će bi dozvoliti da se poigram novim tehnologijama i potrošim neopisivo puno vremena na najmanje sitnice. Ključni izraz u prošloj rečenici jest – “istjerati ga do kraja”. Prototipi su super, no sve dok ne zaokružite projekt i stvorite potpuno funkcionalan, pa čak i konkurentan proizvod, niste napravili dovoljno dobar test i niste dovoljno naučili.

Tako se dogodilo i prije kakvih godinu dana kad sam odlučio napraviti agregator grupne kupovine. Grupna kupovina je tada bila “in”, a ideja mi se činila dovoljno zanimljivom za isprobavanje nekih novih tehnoloških kombinacija i pristupa. U zanožju sitea (još uvijek) piše o čemu se radi: “Napravljen je od manjih ili većih količina CSS3, jQueryja, ASP.NET MVC 3, Entity Frameworka, reflectiona i LINQ-a; bilo ga je totalno zabavno raditi i gdjegdje je namjerno zakompliciran.” Na stranu grupna kupovina, to je bila poanta!

Igrao sam se par tjedana, možda i mjeseci i – Grupiranje se rodilo. Pokazivao sam prijateljima i kolegama što sam napravio te su me počeli nagovarati da to javno objavim. Naime, nemam uvijek praksu i objaviti te projekte, čisto jer brojni među njima nemaju smisla bez nekakvog suvislog održavanja, za što najčešće nemam vremena. No, za ovaj su me nagovorili, a i meni se činio dovoljno atraktivan, i eto tako, nagovorljiv sam…

No opet sam odugovlačio s objavom – nije to lak posao, treba napisati press release, kontaktirati novinare, tvitati, pratiti komentare, napisati blog post… Sve u svemu, sve sam pripremio za taj ponedjeljak, 7. veljače 2011., da krene točno u podne. Kadli, rano ujutro, čuo ja da kreće konkurencija. Ne željeći biti drugi, požurio sam cijelu priču, odrekao se termina “točno u podne”. Danas niti sam ne znam tko je zapravo prije krenuo, no danas to jednostavno nije niti bitno. Da bi veselje bilo veće, konkurencija su bili ljudi koje poznam, pa smo se čuli i svi dobro nasmijali te zafrkavali na svoj račun.

Site se razvijao, ljudi su jako pozitivno reagirali na cijelu priču, broj stranica za grupnu kupovinu narasao je izvan svih očekivanja (trenutno ih u Hrvatskoj ima 40-tak!)… Postavio sam i neke oglase, počela je stizati i neka simbolična lova. Bilo je i tri ponude za kupovinu sitea, no nisu bile primamljive, neke čak i smiješne. Bilo je jasno da se iz cijele priče može napraviti dobar posao, no da za to treba truda i vremena, kojeg ja nemam, i da bih se trebao baviti stvarima, koje nije da ne volim, no nemaju veze s tehnologijom, koju ipak volim najviše.

Trebalo je naći, kak’ se to popularno veli, strateškog partnera. Stoga sam i krenuo u razgovore s Lukom i Antonijom iz DajSve.com, agregatora koji je krenuo isti dan kad i Grupiranje.com, da napravimo nekakvo spajanje ili sličan oblik suradnje, te nastavimo dalje zajedno. Ipak, odjednom su dečki izašli s idejom da bi oni preuzeli Grupiranje.com i dali mi ponudu koju nisam mogao odbiti. Prvobitno mi je to bio šok, no ubrzo sam shvatio prednosti takvog angažmana – pišem “projekt uspio”, a imat ću vremena za neke nove servise koje kuham u glavi neko vrijeme.

Naravno, sasvim je jasno da se ne radi o nekim ogromnim novcima i da sad mogu u mirovinu. Ipak, generalno mogu reći da mi se projekt (da ne kažem “eksperiment”) isplatio, ali – još važnije – dobar je osjećaj nešto na ovaj način prodati. Uvijek sam bio čovjek od ideja, a ne “održavanja”, tako da se nadam da je ovo tek prvi ovakav uspjeli “eksperiment” u nizu.

Grupiranje.com i DajSve.com će se s vremenom spojiti u jedan, a dečkima želim mnogo uspjeha i nek’ isplate investiciju puno prije nego što su planirali! Pažljivo s mojim kôdom!

PS. Evo i iz medija malo na tu temu: Gadgeterija, Rep.hr, Bug Online, Zimo, Poslovni Savjetnik, Ja Trgovac, Poslovni puls, Netokracija

0  

Happy New Year! And some other important stuff.

So, first of all I would like to wish you all happy and prosperous New Year!

My New Year’s resolution will be 1920×1200, because I’ve bought a new monitor, 24” one so my “2012 Monitor Setup” looks like this Smile

I know it’s too much, but I’m enjoying it.

image

Another good news – actually even better one – is that my friend and colleague Hrvoje Hudoletnjak has been awarded as Microsoft MVP for ASP.NET. Congratulations, Hrvoje – very well deserved! I’m particularly proud that now we have three active MVPs in our startup StratusNAV!

Other than Hrvoje, there are two more new MVPs from Croatia – so I would like to congratulate them as well – kudos goes to Nenad Trajkovski (for Project) and Slaven Šola (for SQL Server)!

0  

Interkativna ploča u emisiji eHrvatska

English summary: our solution, Interactive Board, basically a Twitter and SMS wall for confereces, featured on Croatian national TV.

Jedan od meni tražih projekata – Interaktivna ploča – koju smo implementirali na Forumu o održivoj gradnji u suradnji s tvrtkama Holcim, Građevinskim fakultetom u Zagrebu i partnerom tvrtkom Perpetuum mobile, dobio je svoj prilog u popularnoj emisiji HTV-a eHrvatska. Pa pogledajmo :-)

Interaktivna ploča u emisiji eHrvatska
0  

Vibrating a Windows Phone, fun version

It’s really easy to vibrate a phone from your code. You can do it whenever you like, just don’t overdo it.

VibrateController vibrate = VibrateController.Default;
vibrate.Start(TimeSpan.FromMilliseconds(1000));

That’s all you have to do if you want to vibrate the phone for a second. But, what if you want do vibrate several times, with pauses? For example, vibrate for 100 ms, then pause 100 ms, then vibrate again for 200 ms etc? Send yourself a SMS – they don’t do a single vibration, that’s not fun or fancy.

The first idea that comes to mind is to use DispatcherTimer. Vibrate once, start a timer. When it ticks, vibrate again. But that quite annoying, especially if you want to do a short vibration three or four times.

So, here is an idea:

public static void Vibrate(params double[] intervals)
{
    System.Threading.ThreadStart vibrateJob = 
        new System.Threading.ThreadStart(() => _vibrate(intervals));
    System.Threading.Thread vibrateThread = 
        new System.Threading.Thread(vibrateJob);
    vibrateThread.Start();
}
private static void _vibrate(params double[] intervals)
{
    VibrateController vc = VibrateController.Default;

    bool vibrateOn = false;
    foreach (double interval in intervals)
    {
        TimeSpan i = TimeSpan.FromSeconds(interval);

        if (!vibrateOn) vc.Start(i);
        Thread.Sleep(i);
                
        vibrateOn = !vibrateOn;
    }
}

I’m putting a vibration in a separate thread and using Thread.Sleep to produce a pause. Usage syntax is pretty straightforward: when calling a method, use as much as parameters you want – even ones will define a vibration time (in seconds) and the odd ones will be transformed to pauses. For example, if you want to vibrate for 0.2 secs, than have a pause of 0.1 secs, and then vibrate once more for 0.3 secs, call the method like this:

Vibrate(0.2, 0.1, 0.3);

A few notes about vibrating:

  • the shortest vibration / pause is 0.1 seconds
  • the longest is 5 seconds, but please don’t use it
  • there is no sense in having more than 4 vibration in one sequence, 3 is optimal
  • 0.1 seconds in nice for taps
  • 0.2 and 0.3 seconds are good choices for an alert
0  

TwBirthday.com has reached 10k followers

68841290d9635dbabe3daf48d4e621e8It has been a year since I’ve launched my TwBirthday.com project. The basic idea is very simple – if you enter your Twitter username, you’ll find out when have you started using Twitter (that’s your TwBirthday), your age index and your Twitter godfather.

Only three days after it’s first birthday (not the TwBirthday, the Twitter account was open in May 2010), @TwBirthday reached 10.000 followers and checked more than 250.000 different TwBirthdays and their’s godfathers.

Nice numbers! Let’s see what the second year brings…

0  

All my Windows Phone applications

I have developed and published four Windows Phone applications up to date. Three of them are in Croatian, and the last one is in English. All of them are free.

croparkingCroParking
In Croatian. Simple application for paying parking in all towns in Croatia. Application uses geolocation to determine in which town you are located and offers only available zones. You can save as many cars as you want and easily switch between them. Includes a map showing your car location compared to your current position. Download.

CroAutoInfo
In Croatian. Enter the license plate number and find out all public data about that car. Download.

CroWeather
croweatherIn Croatian. This application is in Croatian language. Detailed 7-day weather forecast for your favorite city in Croatia and Europe! Enjoy table view, map view (just like on the TV!) and live tiles telling you should you bring an umbrella or a hat. Local data provider ensures the best forecast. Download.

Find a number
In English. Search your contact list by a number. It searches all your contacts, including Facebook ones. If you have received a call or SMS on other phone, this simple app can help you find the name behind the number. This application requires a Mango update. Download.

0  

Mobile Country Code (MCC) on Windows Phone

celltowerTo make the long story short – it is not possible to access user’s Mobile Country Code from Windows Phone Application. Not even in Mango.

There are two places where MCC is used on a mobile phone. It is part of a International Mobile Subscriber Identiti (IMSI) and it is stored on SIM Card. It tells us where the user is from.

The other MCC is the current MCC – the country in which the user is now. Those two are the same if user is at home, and different if user is roaming.

Since we cannot access MCCs, we should use other ways to access the same info. It’s not as precise as a MCC but it could be goo enough for some scenarios.

Current Country – you can use GPS to get geolocation, and then resolve it to country name. The whole process is nicely explained here.

User’s home country – this one is harder, but if you assume that a user has a right regional settings set, you can use System.Globalization.RegionInfo.CurrentRegion.TwoLetterISORegionName property to get the region. If you need a MCC code, you can map it by using this XML file.

I agree – MCC would be easier, nicer, simpler and better – but this is all we can do for now. I hope this API will be available in the next update.

0  

My first Mango app submitted – Find a number

screenshotI’ve just submitted a Mango app to the Marketplace. Of course, it is not available yet, since it has to go through the certification process, but I believe it will do just fine, since it’s so simple.

Basically, all it does is enable you to search your phone contacts (all of them, including Facebook) by – a phone number. Simple as that. This functionality was not possible before Mango, and it is not possible in People hub either. I’ve been testing this app for a two months now and it has been useful on several occasions, especially for answering my wife’s questions like “somebody called me, do you know whose number is this…”.

I’ll let you know when the app becomes available on the Marketplace, and if anybody wants a XAP file, just let me know.

Update – application has passed the certification – download it here (direct Zune link). You will need Mango update for this.

0  

All Windows Phone InputScope Screenshots

There are 62 different keyboard layouts supported in Windows Phone. They’re enabling a great user experience for a user, but it’s really hard to choose the best one for a developer. So I’ve prepared an overview of all available input scopes.

First screen shows default one, and the second screen shows a view that user gets pressing abc or 123 button on the left side. Some keyboards have first letter uppercased by default and after that they switch to lowercase.

Input scopes are used like this:

<TextBox Name="myTextBox" InputScope="ENTER_SCOPE_NAME_HERE"/>

For a list of input scopes with their respective descriptions check MSDN.

If your WP7 is developer unlocked, you can download and deploy the application made for this article and view all input scopes on your phone. Please contact me if you need the source code.

screenshot_7-11-2011_9.28.5.448 screenshot_7-11-2011_9.32.34.399
screenshot_7-11-2011_9.32.39.849 screenshot_7-11-2011_9.32.42.271
screenshot_7-11-2011_9.32.46.630 screenshot_7-11-2011_9.32.48.983
screenshot_7-11-2011_9.32.57.448 screenshot_7-11-2011_9.33.4.16
screenshot_7-11-2011_9.33.7.498 screenshot_7-11-2011_9.33.16.81
screenshot_7-11-2011_9.33.23.897 screenshot_7-11-2011_9.33.25.564
screenshot_7-11-2011_9.33.27.581 screenshot_7-11-2011_9.33.29.630
screenshot_7-11-2011_9.33.31.765 screenshot_7-11-2011_9.33.33.415
screenshot_7-11-2011_9.33.38.97 screenshot_7-11-2011_9.33.42.148
screenshot_7-11-2011_9.33.46.680 screenshot_7-11-2011_9.33.48.446
screenshot_7-11-2011_9.33.53.280 screenshot_7-11-2011_9.33.55.147
screenshot_7-11-2011_9.33.57.980 screenshot_7-11-2011_9.33.59.981
screenshot_7-11-2011_9.34.3.680 screenshot_7-11-2011_9.34.6.97
screenshot_7-11-2011_9.34.18.814 screenshot_7-11-2011_9.34.22.212
screenshot_7-11-2011_9.34.25.796 screenshot_7-11-2011_9.34.27.934
screenshot_7-11-2011_9.34.31.46 screenshot_7-11-2011_9.34.33.546
screenshot_7-11-2011_9.34.35.767 screenshot_7-11-2011_9.34.37.979
screenshot_7-11-2011_9.34.40.28 screenshot_7-11-2011_9.34.42.211
screenshot_7-11-2011_9.34.44.445 screenshot_7-11-2011_9.34.46.712
screenshot_7-11-2011_9.34.48.529 screenshot_7-11-2011_9.34.50.645
screenshot_7-11-2011_9.34.52.562 screenshot_7-11-2011_9.34.54.511
screenshot_7-11-2011_9.34.56.847 screenshot_7-11-2011_9.34.59.211
screenshot_7-11-2011_9.35.2.495 screenshot_7-11-2011_9.35.4.778
screenshot_7-11-2011_9.35.6.795 screenshot_7-11-2011_9.35.8.494
screenshot_7-11-2011_9.35.10.212 screenshot_7-11-2011_9.35.11.995
screenshot_7-11-2011_9.35.13.745 screenshot_7-11-2011_9.35.15.677
screenshot_7-11-2011_9.35.17.394 screenshot_7-11-2011_9.35.19.245
screenshot_7-11-2011_9.35.21.195 screenshot_7-11-2011_9.35.23.111
screenshot_7-11-2011_9.35.25.111 screenshot_7-11-2011_9.35.26.963
screenshot_7-11-2011_9.35.28.861 screenshot_7-11-2011_9.35.30.696
screenshot_7-11-2011_9.35.33.145 screenshot_7-11-2011_9.35.34.964
screenshot_7-11-2011_9.35.36.817 screenshot_7-11-2011_9.35.38.696
screenshot_7-11-2011_9.35.41.645 screenshot_7-11-2011_9.35.43.478
screenshot_7-11-2011_9.35.45.496 screenshot_7-11-2011_9.35.47.712
screenshot_7-11-2011_9.35.50.594 screenshot_7-11-2011_9.35.53.129
screenshot_7-11-2011_9.35.56.662 screenshot_7-11-2011_9.35.58.444
screenshot_7-11-2011_9.36.0.211 screenshot_7-11-2011_9.36.2.43
screenshot_7-11-2011_9.36.3.627 screenshot_7-11-2011_9.36.5.426
screenshot_7-11-2011_9.36.7.511 screenshot_7-11-2011_9.36.9.376
screenshot_7-11-2011_9.36.11.560 screenshot_7-11-2011_9.36.13.743
screenshot_7-11-2011_9.36.16.660 screenshot_7-11-2011_9.36.18.493
screenshot_7-11-2011_9.36.20.326 screenshot_7-11-2011_9.36.22.209
screenshot_7-11-2011_9.36.23.959 screenshot_7-11-2011_9.36.25.959
screenshot_7-11-2011_9.36.27.977 screenshot_7-11-2011_9.36.29.810
screenshot_7-11-2011_9.36.31.760 screenshot_7-11-2011_9.36.33.476
screenshot_7-11-2011_9.36.35.195 screenshot_7-11-2011_9.36.37.226
screenshot_7-11-2011_9.36.39.98 screenshot_7-11-2011_9.36.41.75
screenshot_7-11-2011_9.36.43.426 screenshot_7-11-2011_10.9.42.918
screenshot_7-11-2011_9.36.50.160 screenshot_7-11-2011_9.36.52.143
screenshot_7-11-2011_9.36.54.243 screenshot_7-11-2011_9.36.56.243
screenshot_7-11-2011_9.36.58.659 screenshot_7-11-2011_9.37.0.642
screenshot_7-11-2011_9.37.2.811  
screenshot_7-11-2011_9.37.7.894  
screenshot_7-11-2011_9.37.10.228  
screenshot_7-11-2011_9.37.12.178  
screenshot_7-11-2011_9.37.14.876 screenshot_7-11-2011_9.37.17.275
screenshot_7-11-2011_9.37.20.226 screenshot_7-11-2011_9.37.22.692
screenshot_7-11-2011_9.37.25.92 screenshot_7-11-2011_9.37.27.276
screenshot_7-11-2011_9.37.29.825 screenshot_7-11-2011_9.37.31.659
screenshot_7-11-2011_9.37.33.775 screenshot_7-11-2011_9.37.35.609
screenshot_7-11-2011_9.37.37.425 screenshot_7-11-2011_9.37.39.258
screenshot_7-11-2011_9.37.42.26 screenshot_7-11-2011_9.37.43.908
0