diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index aed4bf0..dac814b 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -11,7 +11,7 @@ const config = { favicon: 'img/favicon.ico', // Set the production url of your site here - url: 'https://your-docusaurus-test-site.com', + url: 'https://react-native-tethering.onrender.com', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: '/', @@ -19,7 +19,7 @@ const config = { // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. organizationName: 'facebook', // Usually your GitHub org/user name. - projectName: 'docusaurus', // Usually your repo name. + projectName: 'react-native-tethering', // Usually your repo name. onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', diff --git a/example/android/app/src/main/res/drawable/ic_launcher_foreground.xml b/example/android/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b7d4c5 --- /dev/null +++ b/example/android/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,17 @@ + + + + + + diff --git a/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..7353dbd --- /dev/null +++ b/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..7353dbd --- /dev/null +++ b/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index a2f5908..f53a64f 100644 Binary files a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index 1b52399..79ce8c4 100644 Binary files a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index ff10afd..3bf7978 100644 Binary files a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index 115a4c7..d75a310 100644 Binary files a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index dcd3cd8..e6c3708 100644 Binary files a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index 459ca60..a6b23f5 100644 Binary files a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 8ca12fe..7dfcb38 100644 Binary files a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index 8e19b41..31258fc 100644 Binary files a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index b824ebd..b124a79 100644 Binary files a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index 4c19a13..7878ba2 100644 Binary files a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/example/android/app/src/main/res/values/ic_launcher_background.xml b/example/android/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..c5d5899 --- /dev/null +++ b/example/android/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + \ No newline at end of file diff --git a/example/src/WifiScreen.tsx b/example/src/WifiScreen.tsx index 457f3b1..9b8969a 100644 --- a/example/src/WifiScreen.tsx +++ b/example/src/WifiScreen.tsx @@ -32,7 +32,7 @@ export default function WifiScreen({ back }: WifiScreenProps) { WiFi States - + { try { await TetheringManager.connectToLocalNetwork({ - ssid: 'network name', - password: 'network password', + ssid: 'Robix', + password: 'robixrobix@gotsha1986', isHidden: true }); ToastAndroid.show('WiFi Connected', ToastAndroid.SHORT) diff --git a/packages/hotspot/README.md b/packages/hotspot/README.md deleted file mode 100644 index e6186a3..0000000 --- a/packages/hotspot/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# @react-native-tethering/hotspot - -test - -## Installation - -```sh -npm install @react-native-tethering/hotspot -``` - -## Usage - -```js -import { multiply } from '@react-native-tethering/hotspot'; - -// ... - -const result = await multiply(3, 7); -``` - -## Contributing - -See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. - -## License - -MIT - ---- - -Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob) diff --git a/packages/hotspot/android/src/main/java/com/reactnativetethering/hotspot/HotspotTethering.kt b/packages/hotspot/android/src/main/java/com/reactnativetethering/hotspot/HotspotTethering.kt index ef3872c..3696c24 100644 --- a/packages/hotspot/android/src/main/java/com/reactnativetethering/hotspot/HotspotTethering.kt +++ b/packages/hotspot/android/src/main/java/com/reactnativetethering/hotspot/HotspotTethering.kt @@ -97,7 +97,7 @@ class HotspotTethering(private val context: ReactApplicationContext) { promise.resolve(devices) } - fun getMyIPAddress(promise: Promise) = if (isHotspotRunning()) promise.resolve(null) else promise.resolve(getHotspotIpAddress()) + fun getMyIPAddress(promise: Promise) = if (!isHotspotRunning()) promise.resolve(null) else promise.resolve(getHotspotIpAddress()) @RequiresApi(Build.VERSION_CODES.P) private fun enableHotspotInRAndAbove(promise: Promise) { diff --git a/packages/hotspot/package.json b/packages/hotspot/package.json index 748fe94..31ac11f 100644 --- a/packages/hotspot/package.json +++ b/packages/hotspot/package.json @@ -1,7 +1,7 @@ { "name": "@react-native-tethering/hotspot", "version": "0.1.0", - "description": "Tethering Hotspot module enables seamless functions to work with your device's hotspot and supports both React-Native & Expo.", + "description": "Tethering Hotspot is an Android module for your react-native and expo app which provides Hotspot functionalities such as scanning, change states and more. It built on top of the latest/official Android Connectivity classes.", "main": "lib/commonjs/index", "module": "lib/module/index", "types": "lib/typescript/index.d.ts", diff --git a/packages/wifi/README.md b/packages/wifi/README.md deleted file mode 100644 index efad0e6..0000000 --- a/packages/wifi/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# @react-native-tethering/wifi - -Power up your React Native app with wifi capabilities. Scan, connect, and retrieve wifi network info with ease using our cross-platform module. - -## Installation - -```sh -npm install @react-native-tethering/wifi -``` - -## Usage - -```js -import { multiply } from '@react-native-tethering/wifi'; - -// ... - -const result = await multiply(3, 7); -``` - -## Contributing - -See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. - -## License - -MIT - ---- - -Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob) diff --git a/packages/wifi/package.json b/packages/wifi/package.json index 96cb4d5..9074b8d 100644 --- a/packages/wifi/package.json +++ b/packages/wifi/package.json @@ -1,7 +1,7 @@ { "name": "@react-native-tethering/wifi", "version": "0.1.0", - "description": "Tethering WiFi module enables seamless connectivity, scanning, and network management and supports both React-Native & Expo.", + "description": "Tethering WiFi is an Android module for your react-native and expo app which provides WiFi functionalities such as scanning, connecting and more. It built on top of the latest/official Android WiFi classes.", "main": "lib/commonjs/index", "module": "lib/module/index", "types": "lib/typescript/index.d.ts",