sorry for the slow reply - I didn't see the email.

I'm using rails - the code is pretty simple:



  def is_android_device
    user_agent = request.env['HTTP_USER_AGENT'].downcase
    is_type=false
    if user_agent =~ /android/i
        is_type=true
    end

    return is_type
  end


and:

    if (is_android_device)
      redirect_to "market://" + search
    else
redirect_to :action => "offer_email", :search => search, :name => name
    end


glad you like it!

Rob


On Fri, 02 Apr 2010 23:23:23 +0100, patbenatar <[email protected]> wrote:

Awesome! Thanks much Rob! Bookmarking.

Out of curiosity, how do you go about doing this programmatically on
the Web server side?

-Nick




On Apr 1, 8:47 am, Rob <[email protected]> wrote:
Hi Folks,

I just launched my app VLC Remote and was surprised to see that there
isn't a way to post a link to the app on the market that works both on
my android device and also in my browser.

-so I made a way, and I'm opening it up for all-comers.

What it does is lets you post an http link like this

http://and-download.hobbyistsoftware.com/android/download?name=VLC
Remote&q=pname:com.hobbyistsoftware.android.vlcremote

If someone clicks on the link from an android device, then the link
opens in the market. If they click from their computer, then it offers
to send them a link by email (so they can click on the link on their
device).

the download emails have a (subtle) advert for my app, but the feature
is clearly your app!

details are here:http://and-download.hobbyistsoftware.com/

I'm hoping this will be useful for people, so please use it anywhere
you like.

cheers,

Rob


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to