This site is described in Japanese.

[TIPS] カレンダーアプリの起動方法

2009年12月3日 このエントリをはてなブックマークに登録

TIPSと言う名のメモ書き

基本的に、自作のアプリから他のアプリを起動するにはインテントを利用します。

Androidのカレンダーアプリの場合は、以下のようになります。

Intent i = new Intent(Intent.ACTION_VIEW);
i.setClassName("com.android.calendar",
               "com.android.calendar.LaunchActivity");
startActivity(i);

 

HTC HERO ではオリジナルのカレンダーアプリのようなのでこっちを使います。

Intent i = new Intent(Intent.ACTION_MAIN);
i.setComponent(new componentName("com.htc.calendar",
                                 "com.htc.calendar.MonthActivity"));
startActivity(i);

 

参考リンク:
launch calendar app with generic intent – Android Developers
 

Category: 開発TIPS

Tags:

TrackBack URL :

Similar Posts / 関連する投稿

2 Comments / コメント

  1. 久男高橋 より:

    なんとなく、見てみたい。

    • Futaba より:

      Android開発についてのTIPSなので、見せるも何もないのですが、何か勘違いさせてしまったのなら、ごめんなさい。

Leave a Reply / コメントをどうぞ

(required)

(required),(Hidden)

Do you want to show your avatar?


Pages / 固定ページ

Category / カテゴリー

Recent Entries / 最近の投稿

Recent Comments / 最近のコメント

Tags / タグクラウド

おすすめのAndroid本