| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,12 +4,14 @@ export enum connectionType { | |||
| 4 | 4 | none = 0, | |
| 5 | 5 | wifi = 1, | |
| 6 | 6 | mobile = 2, | |
| 7 | - ethernet = 3 | ||
| 7 | + ethernet = 3, | ||
| 8 | + bluetooth = 4 | ||
| 8 | 9 | } | |
| 9 | 10 | ||
| 10 | 11 | const wifi = "wifi"; | |
| 11 | 12 | const mobile = "mobile"; | |
| 12 | 13 | const ethernet = "ethernet"; | |
| 14 | + const bluetooth = "bluetooth"; | ||
| 13 | 15 | ||
| 14 | 16 | // Get Connection Type | |
| 15 | 17 | function getConnectivityManager(): android.net.ConnectivityManager { | |
@@ -43,6 +45,10 @@ export function getConnectionType(): number { | |||
| 43 | 45 | if (type.indexOf(ethernet) !== -1) { | |
| 44 | 46 | return connectionType.ethernet; | |
| 45 | 47 | } | |
| 48 | + | ||
| 49 | + if (type.indexOf(bluetooth) !== -1) { | ||
| 50 | + return connectionType.bluetooth; | ||
| 51 | + } | ||
| 46 | 52 | ||
| 47 | 53 | return connectionType.none; | |
| 48 | 54 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,12 @@ export enum connectionType { | |||
| 32 | 32 | /** | |
| 33 | 33 | * Denotes an ethernet connection | |
| 34 | 34 | */ | |
| 35 | - ethernet = 3 | ||
| 35 | + ethernet = 3, | ||
| 36 | + | ||
| 37 | + /** | ||
| 38 | + * Denotes an bluetooth connection | ||
| 39 | + */ | ||
| 40 | + bluetooth = 4 | ||
| 36 | 41 | } | |
| 37 | 42 | ||
| 38 | 43 | /** | |
| Back | FazBrowse Home | New Git URL |
0 commit comments