このエントリーをはてなブックマークに追加

2010年3月1日月曜日

Run Android Market App From Your App

[In English]
Today I wrote how to show the application download view on Android Market from the other application.

It's simple to do it.
Just issue Intent to run Android Market Application with the application package parameter.
The following sample is how to show "CounTap" Aplication on Android Market.


//Uri uri = Uri.parse("market://search?q=pname:jp.linkyou.android.countap");
Uri uri = Uri.parse("market://details?id=jp.linkyou.android.countap");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

This way is useful to stimulate the users to download the paid edition from free edition or dependent applications from the other one.



[In Japanese]
今回は、あるアプリからAndroidマーケット上の別のアプリのダウンロード画面を表示させる方法について、記載します。

実現方法は、すごくシンプルです。
該当のアプリのパッケージパラメータを付与させ、Android Marketアプリを起動させるためのIntentを発行させるだけです。
下記のサンプルは、Androidマーケット上に"CounTap"アプリを表示させる方法になります。


//Uri uri = Uri.parse("market://search?q=pname:jp.linkyou.android.countap");
Uri uri = Uri.parse("market://details?id=jp.linkyou.android.countap");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

上記の方法は、無償版のアプリから有償版のアプリへの導線や依存関係にあるアプリへの導線などに使えると思います。

0 件のコメント:

コメントを投稿