Skip to content

Commit

Permalink
fix: resolved get ip issue in hotspot and changed example app logo
Browse files Browse the repository at this point in the history
  • Loading branch information
aboozaid committed Mar 29, 2023
1 parent 335d9a2 commit 17ad966
Show file tree
Hide file tree
Showing 21 changed files with 39 additions and 70 deletions.
4 changes: 2 additions & 2 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ 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 /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',

// 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',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="976"
android:viewportHeight="945">
<group android:scaleX="0.64428574"
android:scaleY="0.62382174"
android:translateX="156.12128"
android:translateY="169.28798">
<path
android:pathData="m873.5,409c-45.8,-32.8 -155.5,-56 -155.5,-56 -44.5,-205.5 -200.4,-197.7 -200.4,-197.7s-158,-8 -202.5,197.5c0,0 -109.8,23.3 -155.5,56 0,0 -53.5,36 8.8,92.7l72,58s-105.7,195.7 -6,244.7c0,0 55.3,32.7 95.3,-33.3l106,-20.3s35.6,65.6 82.9,61.9c47.3,3.8 78.7,-61.8 78.7,-61.8l106,20.3c40,66 95.3,33.3 95.3,33.3 99.7,-49 -6,-244.7 -6,-244.7l72,-58c62.4,-56.6 8.9,-92.6 8.9,-92.6zM753.5,542.1 L676.2,592.8 714.9,495.3zM608,381.1 L684.7,470.1 627.4,616.1 518.5,676.6 518.2,676.8 415.4,615.5 351.4,467.5 437.4,381.2h170.6zM467.7,344.8 L516,301 517.9,302.8 562,344.7h-94.3zM694.8,422.5 L657.5,381.2 694.8,387.2zM681.2,344.8h-58l-71.5,-67 62.5,-40.5c55.5,44.7 67,107.5 67,107.5zM517.7,191.3c20.1,-0.7 42.8,3.9 65,20l-64,45 -0.9,-0.6 -64.1,-44.4s27.6,-18.8 64,-20zM423.7,237.3 L486.2,277.8 414.7,344.8h-58s11.5,-62.8 67,-107.5zM344.7,387.1 L382,381.1 344.7,422.4zM363.3,592.8 L286,542.1 324.7,495.3zM187,454.5s-12,-12.8 16.3,-27.3c0,0 41.3,-19.2 98.3,-35l14,68.3s-38.2,35.5 -54.3,61c0,0 -27.5,-15.9 -74.3,-67zM329.4,738.3s-0.8,-31.9 -39,-50.5c0,0 -31.1,-8.3 -59.3,9.5 0,0 14.4,-66 43.3,-119.3l114,68.3 36.3,75zM459.2,709.8 L435.2,665.8 490.5,697.8zM521.3,781.1c-0.9,-0.4 -1.8,-0.8 -2.7,-1.3 -16,-8.8 -39.6,-38.7 -39.6,-38.7 24.3,-8.5 35.1,-15.2 39.5,-18.7 2.2,-1.7 2.8,-2.6 2.8,-2.6s6.2,8.7 42.3,21.3c0.1,0 -26.4,33.5 -42.3,40zM585.3,709.8 L554,697.8 609.3,665.8zM809.9,697.3c-28.1,-17.8 -59.3,-9.5 -59.3,-9.5 -38.3,18.6 -39,50.5 -39,50.5l-95.3,-17 36.3,-75 114,-68.3c28.9,53.3 43.3,119.3 43.3,119.3zM855.1,454.5c-46.8,51.2 -74.3,67 -74.3,67 -16.2,-25.5 -54.3,-61 -54.3,-61l14,-68.3c57,15.8 98.3,35 98.3,35 28.3,14.4 16.3,27.3 16.3,27.3z"
android:fillColor="#3ecc5f"/>
<path
android:pathData="M521,485.1m-70.3,0a70.3,70.3 0,1 1,140.6 0a70.3,70.3 0,1 1,-140.6 0"
android:fillColor="#3ecc5f"/>
</group>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>
6 changes: 3 additions & 3 deletions example/src/WifiScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function WifiScreen({ back }: WifiScreenProps) {
</Pressable>
<View style={styles.wrapper}>
<Text style={styles.wrapperHeader}>WiFi States</Text>
<View style={styles.row}>
<View style={{ width: '100%' }}>
<Pressable
style={styles.button}
android_ripple={{ color: '#ccc' }}
Expand Down Expand Up @@ -113,8 +113,8 @@ export default function WifiScreen({ back }: WifiScreenProps) {
onPress={async () => {
try {
await TetheringManager.connectToLocalNetwork({
ssid: 'network name',
password: 'network password',
ssid: 'Robix',
password: 'robixrobix@gotsha1986',
isHidden: true
});
ToastAndroid.show('WiFi Connected', ToastAndroid.SHORT)
Expand Down
31 changes: 0 additions & 31 deletions packages/hotspot/README.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion packages/hotspot/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
31 changes: 0 additions & 31 deletions packages/wifi/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion packages/wifi/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 17ad966

Please sign in to comment.