Groups
Groups
Sign in
Groups
Groups
日本Androidの会
Conversations
About
Send feedback
Help
現在設定されているホームアプリのパッケージ名の取得
1,100 views
Skip to first unread message
石井
unread,
Jan 18, 2014, 5:21:48 AM
1/18/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-g...@googlegroups.com
石井と申します.
Android開発初心者なため,助言を頂きたいです.
PackageManager,もしくは
ActivityManager
を用いて,現在設定されているホームアプリのパッケージ名を取得することは可能でしょうか?
XBG
unread,
Jan 19, 2014, 1:16:31 AM
1/19/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-g...@googlegroups.com
こんにちは。
こちらはいかがでしょう。
http://yukiasu.blogspot.jp/2011/10/android_31.html
一応デフォルトのアプリが設定されていない場合の対応が必要になります。
2014年1月18日土曜日 19時21分48秒 UTC+9 石井:
石井
unread,
Jan 19, 2014, 4:48:24 PM
1/19/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-g...@googlegroups.com
XBGさんありがとうございます.
そちらの記事は事前に確認しておりました.
それですと,やはりデフォルトの以外で設定されている場合が発生してしまうので,やはり現在の設定されているホームの取得を行いたいです.
やはり難しいのでしょうか?
Tetsuro Nakamura
unread,
Jan 19, 2014, 11:15:46 PM
1/19/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-g...@googlegroups.com
t2lowと申します。
デフォルトで起動するよう設定されているアプリを判定するには
PackageManager#getPreferredActivities()というメソッドを使えば良いようです。
このメソッドを使って判定している方の記事がありました。
Androidアプリのデフォルトでの起動判定 | I Wanna Be β
http://gsbina.com/?p=483
以上です。
2014年1月20日 6:48 石井 <
mar5.pa...@gmail.com
>:
> --
> このメールは Google グループのグループ「日本Androidの会」の登録者に送られています。
> このグループから退会し、メールの受信を停止するには、
android-group-j...@googlegroups.com
> にメールを送信します。
> このグループに投稿するには、
android-g...@googlegroups.com
にメールを送信してください。
>
http://groups.google.com/group/android-group-japan
からこのグループにアクセスしてください。
> その他のオプションについては、
https://groups.google.com/groups/opt_out
にアクセスしてください。
bina
unread,
Jan 21, 2014, 4:59:00 AM
1/21/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-g...@googlegroups.com
bina です。
PackageManager の queryIntentActivities(Intent, int) で、
ホームアプリを起動する Intent を引数にすれば取得できると思います。
2014年1月18日土曜日 19時21分48秒 UTC+9 石井:
Reply all
Reply to author
Forward
0 new messages