{"id":6844,"date":"2015-01-26T09:35:01","date_gmt":"2015-01-26T00:35:01","guid":{"rendered":"http:\/\/www.gesource.jp\/weblog\/?p=6844"},"modified":"2017-09-30T10:01:31","modified_gmt":"2017-09-30T01:01:31","slug":"delphi-xe7%e3%81%aeandroid%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a7wifi%e3%81%8c%e6%9c%89%e5%8a%b9%e3%81%8b%e7%84%a1%e5%8a%b9%e3%81%8b%e3%82%92%e8%aa%bf","status":"publish","type":"post","link":"https:\/\/www.gesource.jp\/weblog\/?p=6844","title":{"rendered":"Delphi XE7\u306eAndroid\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067Wifi\u304c\u6709\u52b9\u304b\u7121\u52b9\u304b\u3092\u8abf\u3079\u308b"},"content":{"rendered":"<p>Delphi XE7\u306eAndroid\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067Wifi\u304c\u6709\u52b9\u304b\u7121\u52b9\u304b\u3092\u8abf\u3079\u308b\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p>Java2OP\u3067WifiManager\u30af\u30e9\u30b9\u306e\u30d6\u30ea\u30c3\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><code>Java2OP.exe -classes android.net.wifi.WifiManager -unit Androidapi.JNI.WifiManager\n<\/code><\/pre>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u300c\u4f7f\u7528\u3059\u308b\u6a29\u9650\u300d\u3067\u300cWi-Fi \u72b6\u614b\u3078\u306e\u30a2\u30af\u30bb\u30b9\u300d\u3092\u300ctrue\u300d\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2015\/01\/IsWifiEnabled.gif?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2015\/01\/IsWifiEnabled.gif?resize=300%2C240&#038;ssl=1\" alt=\"Wifi\u72b6\u614b\u3078\u306e\u30a2\u30af\u30bb\u30b9\" width=\"300\" height=\"240\" class=\"alignnone size-medium wp-image-6845\" srcset=\"https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2015\/01\/IsWifiEnabled.gif?resize=300%2C240&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2015\/01\/IsWifiEnabled.gif?resize=730%2C584&amp;ssl=1 730w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>IsWifiEnabled\u30e1\u30bd\u30c3\u30c9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><code>type\n  TForm1 = class(TForm)\n\n    \/\/\/ &lt;summary&gt;\n    \/\/\/   Wifi\u304c\u6709\u52b9\u306e\u3068\u304d\u306fTrue\u3001\u7121\u52b9\u306e\u6642\u306fFalse\u3092\u8fd4\u3057\u307e\u3059\u3002\n    \/\/\/ &lt;\/summary&gt;\n    function IsWifiEnabled: Boolean;\n\n  end;\n<\/code><\/pre>\n<p>\u5b9f\u88c5\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code>uses\n  Androidapi.Helpers,\n  Androidapi.JNI.JavaTypes,\n  Androidapi.JNI.GraphicsContentViewText,\n  Androidapi.JNIBridge,\n  Androidapi.JNI.WifiManager;\n\nfunction TForm1.IsWifiEnabled: Boolean;\nvar\n  Obj: JObject;\n  WifiManager: JWifiManager;\nbegin\n  Obj := SharedActivityContext.getSystemService\n    (TJContext.JavaClass.WIFI_SERVICE);\n  if Obj = nil then\n    Exit(False);\n  WifiManager := TJWiFiManager.Wrap((Obj as ILocalObject).GetObjectID);\n  Result := WifiManager.isWifiEnabled;\nend;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Delphi XE7\u306eAndroid\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067Wifi\u304c\u6709\u52b9\u304b\u7121\u52b9\u304b\u3092\u8abf\u3079\u308b\u65b9\u6cd5\u3067\u3059\u3002 Java2OP\u3067WifiManager\u30af\u30e9\u30b9\u306e\u30d6\u30ea\u30c3\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 Java2OP.exe -classes an &#8230;<\/p>\n<p><a href=\"https:\/\/www.gesource.jp\/weblog\/?p=6844\" class=\"more-link\">Continue reading &lsquo;Delphi XE7\u306eAndroid\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067Wifi\u304c\u6709\u52b9\u304b\u7121\u52b9\u304b\u3092\u8abf\u3079\u308b&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[48],"tags":[106,156,118,136],"class_list":["post-6844","post","type-post","status-publish","format-standard","hentry","category-delphi","tag-android","tag-delphi","tag-firemonkey","tag-xe7"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/6844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6844"}],"version-history":[{"count":0,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/6844\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}