Title: @SystemService & android.appwidget.AppWidgetManager · Issue #1377 · androidannotations/androidannotations · GitHub
Open Graph Title: @SystemService & android.appwidget.AppWidgetManager · Issue #1377 · androidannotations/androidannotations
X Title: @SystemService & android.appwidget.AppWidgetManager · Issue #1377 · androidannotations/androidannotations
Description: Given I inject the AppWidgetManager service into a Fragment like this: @SystemService protected AppWidgetManager appWidgetManager; Then the generated code looks like this: appWidgetManager = ((AppWidgetManager) getActivity().getSystemSer...
Open Graph Description: Given I inject the AppWidgetManager service into a Fragment like this: @SystemService protected AppWidgetManager appWidgetManager; Then the generated code looks like this: appWidgetManager = ((AppW...
X Description: Given I inject the AppWidgetManager service into a Fragment like this: @SystemService protected AppWidgetManager appWidgetManager; Then the generated code looks like this: appWidgetManager = ((AppW...
Opengraph URL: https://github.com/androidannotations/androidannotations/issues/1377
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@SystemService \u0026 android.appwidget.AppWidgetManager","articleBody":"Given I inject the AppWidgetManager service into a Fragment like this:\n\n```\n@SystemService\nprotected AppWidgetManager appWidgetManager;\n```\n\nThen the generated code looks like this:\n\n```\nappWidgetManager = ((AppWidgetManager) getActivity().getSystemService(Context.APPWIDGET_SERVICE));\n```\n\nHowever, this will result in NPE, because AppWidgetManager can not be retrieved like that.\n\nInstead, the following code should be generated:\n\n```\nappWidgetManager = AppWidgetManager.getInstance(getActivity());\n```\n","author":{"url":"https://github.com/ened","@type":"Person","name":"ened"},"datePublished":"2015-04-22T08:02:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":14},"url":"https://github.com/1377/androidannotations/issues/1377"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fcb883fe-5242-0b6c-1645-bb9334509594 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83EA:9BF62:192056:22F89C:6A6265DC |
| html-safe-nonce | 77016e6dd5a0e13908e97f57e788120f95198f4fcbd0ecdaafda52950499a5b9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0VBOjlCRjYyOjE5MjA1NjoyMkY4OUM6NkE2MjY1REMiLCJ2aXNpdG9yX2lkIjoiMTYxNzE4NzU2MzkxNTg2MzUxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c2bd462e8813504439efc5fdd4d89dc3395f3aeb0bbc08bd4bd7cc1d7937047a |
| hovercard-subject-tag | issue:70053230 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/androidannotations/androidannotations/1377/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0d32235b4429534838b379ea5aa50a90501d4cf3f01426b21eedbaeccb9d77a2/androidannotations/androidannotations/issues/1377 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0d32235b4429534838b379ea5aa50a90501d4cf3f01426b21eedbaeccb9d77a2/androidannotations/androidannotations/issues/1377 |
| og:image:alt | Given I inject the AppWidgetManager service into a Fragment like this: @SystemService protected AppWidgetManager appWidgetManager; Then the generated code looks like this: appWidgetManager = ((AppW... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ened |
| hostname | github.com |
| expected-hostname | github.com |
| None | 194bddaed53c0eb07047629c520853f4208e77a17ff57428346485cc202e39f2 |
| turbo-cache-control | no-preview |
| go-import | github.com/androidannotations/androidannotations git https://github.com/androidannotations/androidannotations.git |
| octolytics-dimension-user_id | 1315313 |
| octolytics-dimension-user_login | androidannotations |
| octolytics-dimension-repository_id | 3116751 |
| octolytics-dimension-repository_nwo | androidannotations/androidannotations |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3116751 |
| octolytics-dimension-repository_network_root_nwo | androidannotations/androidannotations |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c2862cf2db52f0c7f6cba3de21ffeeafe7c5456e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width