Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const ms = await Ping.start("114.114.114.114"); returns null #20

Closed
apawar14 opened this issue Mar 15, 2019 · 3 comments
Closed

const ms = await Ping.start("114.114.114.114"); returns null #20

apawar14 opened this issue Mar 15, 2019 · 3 comments

Comments

@apawar14
Copy link

const ms = await Ping.start("114.114.114.114"); &
const result = await Ping.getTrafficStats();
returns null

@RoJoHub
Copy link
Owner

RoJoHub commented Mar 15, 2019

4011552637402_ pic_hd
Which platniform?

@apawar14
Copy link
Author

apawar14 commented Mar 15, 2019 via email

@RoJoHub
Copy link
Owner

RoJoHub commented Mar 15, 2019

@apawar14
Accourding to This
https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted

We should change content of AndroidManifest.xml.

In my project .The path example/android/app/src/main/AndroidManifest.xml.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

    <application
        android:name=".MainApplication"
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
+       android:allowClearUserData="true"
+       android:usesCleartextTraffic="true">
        <activity
            android:name=".MainActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
            android:label="@string/app_name"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    </application>

</manifest>

Also I fix my example of android .
Now it is ok.
Please download again.

@RoJoHub RoJoHub closed this as completed Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants