{"id":1045,"date":"2011-05-29T13:46:00","date_gmt":"2011-05-29T13:46:00","guid":{"rendered":"https:\/\/rawbytes.org\/?p=1045"},"modified":"2025-11-24T02:59:33","modified_gmt":"2025-11-24T02:59:33","slug":"android-widget%e3%81%ae%e3%83%a9%e3%82%a4%e3%83%95%e3%82%b5%e3%82%a4%e3%82%af%e3%83%ab%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e8%a6%81%e7%82%b9%e3%81%a0%e3%81%91","status":"publish","type":"post","link":"https:\/\/rawbytes.org\/?p=1045","title":{"rendered":"Android Widget\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u306b\u3064\u3044\u3066\u8981\u70b9\u3060\u3051"},"content":{"rendered":"<p>Android App Widget\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30a4\u30d9\u30f3\u30c8\u306f4\u3064\u3002\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u8aad\u3093\u3060\u3060\u3051\u3067\u306f\u3044\u307e\u3044\u3061\u5206\u304b\u308a\u3065\u3089\u304b\u3063\u305f\u306e\u3067\u8abf\u3079\u3066\u307f\u305f\u30e1\u30e2\u3002<\/p>\n<p>\uff08\uff11\uff09onEnabled(Context context)<br \/>\n\u4e00\u3064\u76ee\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u30db\u30fc\u30e0\u306b\u8ffd\u52a0\u3055\u308c\u308b\u3068\u304d\u3002<\/p>\n<p>\uff08\uff12\uff09onUpdate(Context context, AppWidgetmanager appWidgetManager, int[] appWidgetIds)<br \/>\n\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u30db\u30fc\u30e0\u306b\u8ffd\u52a0\u3055\u308c\u308b\u3068\u304d\u3002\u4e00\u3064\u76ee\u306e\u3068\u304d\u306fonEnabled\u306e\u76f4\u5f8c\u306b\u547c\u3070\u308c\u308b\u30022\u3064\u76ee\u4ee5\u964d\uff08\uff1d\u540c\u3058\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u65e2\u306b\u30db\u30fc\u30e0\u306b\u7f6e\u304b\u308c\u3066\u3044\u308b\u5834\u5408\uff09\u306f\u3053\u306eonUpdate\u3060\u3051\u304c\u30b3\u30fc\u30eb\u3055\u308c\u308b\u3002<br \/>\nappWidgetIds\u306b\u306f\u3001\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u5bfe\u8c61\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306eID\u304c\u5165\u3063\u3066\u308b\u3002\u306a\u306e\u3067\u3001widget\u306e\u8ffd\u52a0\u6642\u306b\u306f\u57fa\u672c\u7684\u306b\uff11\u3064\u306eID\u306e\u914d\u5217\u3067\u3001\u5b9a\u671f\u66f4\u65b0\u6642\u306b\u306f2\u3064\u4ee5\u4e0a\u306eID\u304c\u5165\u3063\u3066\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3063\u3066\u3044\u3046\u3053\u3068\u307f\u305f\u3044\u3002<\/p>\n<p>\uff08\uff13\uff09onDeleted(Context context, int[] appWidgetIds)<br \/>\n\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u30db\u30fc\u30e0\u304b\u3089\u524a\u9664\u3055\u308c\u308b\u3068\u304d\u3002\u4ed6\u306b\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u6b8b\u3063\u3066\u3044\u308b\u3068\u304d\uff08\uff1d\u540c\u3058\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u307e\u3060\u30db\u30fc\u30e0\u306b\u7f6e\u304b\u308c\u3066\u3044\u308b\u5834\u5408\uff09\u306f\u3053\u306eonDeleted\u3060\u3051\u304c\u547c\u3070\u308c\u308b\u3002<\/p>\n<p>\uff08\uff14\uff09onDisabled(Context context)<br \/>\n\u30db\u30fc\u30e0\u304b\u3089\u6700\u5f8c\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u524a\u9664\u3055\u308c\u308b\u3068\u304d\u3001onDeleted\u306e\u76f4\u5f8c\u306b\u30b3\u30fc\u30eb\u3055\u308c\u308b\u3002<\/p>\n<p>\u3082\u3046\u3044\u3063\u3053onReceived\u306f\u4e0a\u8a18\uff13\u3064\u304c\u7d50\u5c40\u30b3\u30fc\u30eb\u3055\u308c\u308b\u306e\u3067\u3001\u901a\u5e38\u306f\u3042\u3093\u307e\u308a\u6c17\u306b\u3057\u306a\u304f\u3066\u5927\u4e08\u592b\u307f\u305f\u3044\u3002\u4ee5\u4e0b\uff14\u3064\u4ee5\u5916\u306eBroadcast\u3092\u306a\u3093\u3068\u304b\u3057\u305f\u3044\u6642\u306b\u304d\u306b\u3059\u308c\u3070\u826f\u3044\u3002<\/p>\n<ul>\n<li>ACTION_APPWIDGET_DELETED\u2192onDeleted<\/li>\n<li>ACTION_APPWIDGET_DISABLED\u2192onDisabled<\/li>\n<li>ACTION_APPWIDGET_ENABLED\u2192onEnabled<\/li>\n<li>ACTION_APPWIDGET_UPDATE\u2192onUpdate<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Android App Widget\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30a4\u30d9\u30f3\u30c8\u306f4\u3064\u3002\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u8aad\u3093\u3060\u3060\u3051\u3067\u306f\u3044\u307e\u3044\u3061\u5206\u304b\u308a\u3065\u3089\u304b\u3063\u305f\u306e\u3067\u8abf\u3079\u3066\u307f\u305f\u30e1\u30e2\u3002 \uff08\uff11\uff09onEnabled(Context context) \u4e00\u3064\u76ee\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u30db\u30fc\u30e0\u306b\u8ffd\u52a0\u3055\u308c\u308b\u3068\u304d\u3002 \uff08\uff12\uff09onUpdate(Context context, AppWidgetmanager appWidgetManager, int[] appWidgetIds) \u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u30db\u30fc\u30e0\u306b\u8ffd\u52a0\u3055\u308c\u308b\u3068\u304d\u3002\u4e00\u3064\u76ee\u306e\u3068\u304d\u306fonEnabled\u306e\u76f4\u5f8c\u306b\u547c\u3070\u308c\u308b\u30022\u3064\u76ee\u4ee5\u964d\uff08\uff1d\u540c\u3058\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u65e2\u306b\u30db\u30fc\u30e0\u306b\u7f6e\u304b\u308c\u3066\u3044\u308b\u5834\u5408\uff09\u306f\u3053\u306eonUpdate\u3060\u3051\u304c\u30b3\u30fc\u30eb\u3055\u308c\u308b\u3002 appWidgetIds\u306b\u306f\u3001\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u5bfe\u8c61\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306eID\u304c\u5165\u3063\u3066\u308b\u3002\u306a\u306e\u3067\u3001widget\u306e\u8ffd\u52a0\u6642\u306b\u306f\u57fa\u672c\u7684\u306b\uff11\u3064\u306eID\u306e\u914d\u5217\u3067\u3001\u5b9a\u671f\u66f4\u65b0\u6642\u306b\u306f2\u3064\u4ee5\u4e0a\u306eID\u304c\u5165\u3063\u3066\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3063\u3066\u3044\u3046\u3053\u3068\u307f\u305f\u3044\u3002 \uff08\uff13\uff09onDeleted(Context context, int[] appWidgetIds) \u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u30db\u30fc\u30e0\u304b\u3089\u524a\u9664\u3055\u308c\u308b\u3068\u304d\u3002\u4ed6\u306b\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u6b8b\u3063\u3066\u3044\u308b\u3068\u304d\uff08\uff1d\u540c\u3058\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u307e\u3060\u30db\u30fc\u30e0\u306b\u7f6e\u304b\u308c\u3066\u3044\u308b\u5834\u5408\uff09\u306f\u3053\u306eonDeleted\u3060\u3051\u304c\u547c\u3070\u308c\u308b\u3002 \uff08\uff14\uff09onDisabled(Context context) \u30db\u30fc\u30e0\u304b\u3089\u6700\u5f8c\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u524a\u9664\u3055\u308c\u308b\u3068\u304d\u3001onDeleted\u306e\u76f4\u5f8c\u306b\u30b3\u30fc\u30eb\u3055\u308c\u308b\u3002 \u3082\u3046\u3044\u3063\u3053onReceived\u306f\u4e0a\u8a18\uff13\u3064\u304c\u7d50\u5c40\u30b3\u30fc\u30eb\u3055\u308c\u308b\u306e\u3067\u3001\u901a\u5e38\u306f\u3042\u3093\u307e\u308a\u6c17\u306b\u3057\u306a\u304f\u3066\u5927\u4e08\u592b\u307f\u305f\u3044\u3002\u4ee5\u4e0b\uff14\u3064\u4ee5\u5916\u306eBroadcast\u3092\u306a\u3093\u3068\u304b\u3057\u305f\u3044\u6642\u306b\u304d\u306b\u3059\u308c\u3070\u826f\u3044\u3002 ACTION_APPWIDGET_DELETED\u2192onDeleted ACTION_APPWIDGET_DISABLED\u2192onDisabled ACTION_APPWIDGET_ENABLED\u2192onEnabled ACTION_APPWIDGET_UPDATE\u2192onUpdate<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,11],"tags":[],"class_list":["post-1045","post","type-post","status-publish","format-standard","hentry","category-android","category-develop"],"_links":{"self":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1045","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1045"}],"version-history":[{"count":1,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1045\/revisions"}],"predecessor-version":[{"id":1046,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1045\/revisions\/1046"}],"wp:attachment":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}