Showing posts with label My software. Show all posts
Showing posts with label My software. Show all posts

Thursday, August 25, 2011

Linking to Android Market applications on the web

While working on web version of Da Dictionary I've decided to add link to Android version. Web links to Android Market looks like this http://market.android.com/details?id=com.demosten.android.dadict where 'com.demosten.android.dadict' is the package name which is unique for Android Market. This seams to work well when opened from PC browser. However opening this link from Android is a different story. The best way to open it is directly in Android Market application which works with different URI scheme. It looks like market://details?id=com.demosten.android.dadict where again we see the same package name mentioned. While built-in Android browser plays it smart and open the link in directly in Market Application alternative browsers like Firefox does not do so and viewing web version of Android Market on an Android phone is far form what users expected to see.

My solution
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
  updateAndroidMarketLinks();
  // some more core here ... 
 
  function updateAndroidMarketLinks()
  {
    var ua = navigator.userAgent.toLowerCase();
    if (0 <= ua.indexOf("android")) {
      // we have android
      $("a[href^='http://market.android.com/']").each(function() {
        this.href = this.href.replace(/^http:\/\/market\.android\.com\//,
          "market://");
      });
    }
  }
});
</script>
</head>

<body>
<a href="http://market.android.com/details?id=com.demosten.android.dadict" target="_blank">Download for Android</a>
</body>

</html>
As you can see my solution is based on JavaScript and jQuery. The idea is to search for 'android' sub-string inside browser's UserAgent and if that is the case - replace HTTP URI part with Android Market URI part, inside all links.

I believe a JavaScript only version is not hard to do, but I prefer to use jQuery.

Sunday, January 11, 2009

Announcing: Diamond SensorScroll

This Christmas I gave myself a new HTC Touch Diamond as a present. To be honest I made the present a month earlier, but who needs patience when it comes to hi tech gadgets?

I played around with it and found some missing features. The most obvious for me was, the phone has a great sensor control which is used only by several HTC applications and Opera (custom version made for HTC). I decided to fix this and that's how I met Windows Mobile 6.1.

I spent some time in research and writing simple test applications and found, that though it is "Mobile", it is "Windows" only around 50% (the other 50% came from the Microsoft's marketing department I guess). Don't get me wrong here. It doesn't mean I don't like it. It's just quite different from PC Windows. API is same - but not quite, internal architecture is totally different and this left useless almost half of my Win32 API knowledge. After a month of research and a week of codding I finally brought my idea to life.

Announcing: Diamond SensorScroll
This is my latest free application. There are several things that happen for the first time because of it.
  • It is my first application running on Windows Mobile.
  • It is my first application published first outside my site and then on it.
  • It is my first application, about which people wrote comments and blog posts just hours after the initial release (on 1.1.2009).
All of this happened because I stepped into the great community of the http://forum.xda-developers.com/ site! The guys there got me unprepared! All I expected was several downloads and some bug reports. Unstead I got many thanks, Near a 1000 downloads in first 10 days (I released 3 bugfixing versions in that time and the application doesn't have a 1000 users just yet). Greatly described bug reports with aditional analysis what went wrong. More thanks. Cool feature ideas. Links to blog posts for "spreading the word". Idea to add donations link. And more! All this, made me feel really happy to be part of this community. THANK YOU GUYS!

Now you know why the primary site for Diamond SensorScroll is http://forum.xda-developers.com/showthread.php?t=466377 :)

Have fun!

P.S. The picture you see in this post is from another blog post. I liked it, asked the author, and got a permission to use it from now on. I hope this illustrates my point one more time :)

Friday, September 5, 2008

Announcing Demosten's Perl distribution for Win32

Today I published the first version of my Perl distribution for Windows. My idea was to create a distribution which could fully take advantage of CPAN. This means that you need a C/C++ compiler and make program together with some Unix tools like gzip, tar, less etc. I've added a Perl Scripting Engine (thanks to Atanas Kolev). The distribution also contains several simple scripts to provide a documentation with TOC and to add and remove directories to/from path environment. There is also a simple program written to relocate perl and the compiler to specified directories. The distribution has no additional license limitations and all our code is distributed with the same license as Perl itself.

Links:
Official homepage: http://dnperl.sf.net/
Downloads at project home page: http://sourceforge.net/projects/dnperl/

Sunday, August 17, 2008

Designing the next generation of CDRfe

(last updated 17.August.2008)

I've finally found some free time to think about the next version of CDRfe. This is one of my favorite own programs, but in time I realized that this way of creating C++ closed source software will lead us nowhere. So I'm thinking about designing the next generation of CDRtools frontend. The planning is on really early stage (like some thoughts on a single sheet of paper) and I decide this time to involve the community. I realize this will take much more time than designing it by myself, but I believe the outcome worth it! So here are my general ideas about it:
  • We'll start codding from scratch (will use only knowledge gathered in CDRfe development, but not a single line of code)
  • We'll use some platform independent language like Java which will allow using CDRfe on other OS-es too.
  • Next generation version will combine VisualISO with CDRfe into a single program.
  • I'm planning to include remote recording functionality. This is when you have a single recorder and many clients
  • The new project will be an open source and I'll be very careful with licenses this time when it comes to using external source code and/or libraries
  • We might also select a better name of the project. If you have an idea please post a comment or send me an e-mail.
Now I'll go deeper into the technical part:

I'm planning to use a Rich client platform instead of doing everything on my own. The best candidates are: Eclipse, Netbeans and Mozilla. If you have other ideas, please post a comment or drop me an e-mail at demosten@gmail.com. At the moment my favorite is Eclipse. Advantages of using such a platform are: you have much work done and tested and we could concentrate on the actual functionality instead of for example user interface. So the software could be delivered faster and better tested. Disadvantage I can think of is that it will be much bigger and in general slower.

I need your help! I'm looking for:
  • Fresh ideas what to include inside the next generation version as functionality, usability, code libraries etc.
  • Codding help. I'll need it at moment a concrete Rich client platform and programming language is selected and the work could start. The project will be hosted probably on sourseforge.net and will have a repository and so on.
  • Designer's help: this version should look great :)
If you can help please do it! Post a comment here or drop me an e-mail at demosten@gmail.com. I'll update this post in time so come and check it from time to time.