Groups
Sign in
Groups
日本Androidの会
Conversations
About
Send feedback
Help
ライブ壁紙からのActivity実行
301 views
Skip to first unread message
けるぷ
unread,
Mar 3, 2012, 10:31:56 AM
3/3/12
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の会
どうも、お世話になります。
先週からAndroidアプリを作り始めたばかりの者です。
「ライブ壁紙」に関する質問なのですが、
検索しても知りたい情報が見つからず投稿した次第です。
現在、「ライブ壁紙」を作成しています。
Androidバージョンは2.1の環境です。
通常のActivityであれば、AlertDialogなどを表示したり、
Intentで別のActivityを実行したり出来るのですが、
なぜかライブ壁紙ではこのようなことができません。
ビルドは出来ますが、実行するとエラーダイアログが表示され、
強制終了してしまいます。
ライブ壁紙では、AlertDialogなどを表示したり、
Intentで別のActivityを実行したりはできないのでしょうか?
もしやり方があるのであればご教授頂けないでしょうか。
どうかよろしくお願いします。
けるぷ
unread,
Mar 3, 2012, 8:15:39 PM
3/3/12
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の会
すみません、色々試行錯誤した結果、自己解決できました。
スレ汚し申し訳ありませんでした…。
miyake osamu
unread,
Mar 4, 2012, 7:22:15 PM
3/4/12
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
三宅です。
色々試行錯誤した内容を書けば、同じ問題を抱えた人が解決するかもしれません。
せっかくですので、書くのもありだと思いますよ。
けるぷ
unread,
Mar 5, 2012, 6:35:03 AM
3/5/12
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の会
返信ありがとうございます。
そうですね、折角なのでやり方を書いておこうと思います。
まず、AlertDialogですが、こちらはどうやっても表示することが出来ませんでした…。
何かやり方がありそうですがわかりませんでした。
次にActivityのほうですが、AndroidManifest設定のandroid.intent.action.MAINの他に、
以下のように「FLAG_ACTIVITY_NEW_TASK」をフラグに設定すると表示することが出来ました。
Intent intent = new Intent( LiveWallpaper.this, testActivity.class );
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity( intent );
デバッガのエラーログをよく見たら、この辺りのことが書いてありました…。
それでは。
Reply all
Reply to author
Forward
0 new messages