1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[22],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},d=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},l="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,d=a(e,["components","mdxType","originalType","parentName"]),l=p(n),f=o,m=l["".concat(s,".").concat(f)]||l[f]||u[f]||i;return n?r.createElement(m,c(c({ref:t},d),{},{components:n})):r.createElement(m,c({ref:t},d))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,c=new Array(i);c[0]=f;var a={};for(var s in t)hasOwnProperty.call(t,s)&&(a[s]=t[s]);a.originalType=e,a[l]="string"==typeof e?e:o,c[1]=a;for(var p=2;p<i;p++)c[p]=n[p];return r.createElement.apply(null,c)}return r.createElement.apply(null,n)}f.displayName="MDXCreateElement"},4358:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>a,toc:()=>p});var r=n(7462),o=(n(7294),n(3905));const i={sidebar_position:4},c="getConnectedDevices",a={unversionedId:"hotspot/api-reference/functions/getConnectedDevices",id:"hotspot/api-reference/functions/getConnectedDevices",title:"getConnectedDevices",description:"Gets a list of connected devices to your hotspot on an Android device and return a promise of Device otherwise TetheringError will be thrown with the error details.",source:"@site/docs/hotspot/api-reference/functions/getConnectedDevices.md",sourceDirName:"hotspot/api-reference/functions",slug:"/hotspot/api-reference/functions/getConnectedDevices",permalink:"/docs/hotspot/api-reference/functions/getConnectedDevices",draft:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/hotspot/api-reference/functions/getConnectedDevices.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"setLocalHotspotEnabled",permalink:"/docs/hotspot/api-reference/functions/setLocalHotspotEnabled"},next:{title:"isWriteSettingsGranted",permalink:"/docs/hotspot/api-reference/functions/isWriteSettingsGranted"}},s={},p=[],d={toc:p},l="wrapper";
1function u(e){let{components:t,...n}=e;return(0,o.kt)(l,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"getconnecteddevices"},"getConnectedDevices"),(0,o.kt)("p",null,"Gets a list of connected devices to your hotspot on an Android device and return a promise of ",(0,o.kt)("a",{parentName:"p",href:"/docs/hotspot/api-reference/objects#device"},(0,o.kt)("inlineCode",{parentName:"a"},"Device"))," otherwise ",(0,o.kt)("a",{parentName:"p",href:"/docs/hotspot/api-reference/objects#tetheringerror"},(0,o.kt)("inlineCode",{parentName:"a"},"TetheringError"))," will be thrown with the error details."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"}," This method won't work in Android 13 due to the new security roles in that version.")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Returns:")," ",(0,o.kt)("inlineCode",{parentName:"p"},"Promise")))}u.isMDXComponent=!0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.