diff --git a/tns-core-modules/connectivity/connectivity.android.ts b/tns-core-modules/connectivity/connectivity.android.ts index c7833224e..b2e49d097 100644 --- a/tns-core-modules/connectivity/connectivity.android.ts +++ b/tns-core-modules/connectivity/connectivity.android.ts @@ -4,12 +4,14 @@ export enum connectionType { none = 0, wifi = 1, mobile = 2, - ethernet = 3 + ethernet = 3, + bluetooth = 4 } const wifi = "wifi"; const mobile = "mobile"; const ethernet = "ethernet"; +const bluetooth = "bluetooth"; // Get Connection Type function getConnectivityManager(): android.net.ConnectivityManager { @@ -43,6 +45,10 @@ export function getConnectionType(): number { if (type.indexOf(ethernet) !== -1) { return connectionType.ethernet; } + + if (type.indexOf(bluetooth) !== -1) { + return connectionType.bluetooth; + } return connectionType.none; } diff --git a/tns-core-modules/connectivity/connectivity.d.ts b/tns-core-modules/connectivity/connectivity.d.ts index a4c09c092..a41a68f47 100644 --- a/tns-core-modules/connectivity/connectivity.d.ts +++ b/tns-core-modules/connectivity/connectivity.d.ts @@ -32,7 +32,12 @@ export enum connectionType { /** * Denotes an ethernet connection */ - ethernet = 3 + ethernet = 3, + + /** + * Denotes an bluetooth connection + */ + bluetooth = 4 } /**