SpeedChecker plugin allows developers to integrate speed test features into their own React Native apps. You can also try our native apps on Google Play and App Store, they are powered by the latest Speedchecker SDK versions. More information about SpeedChecker SDKs
Android | iOS |
---|---|
supported :heavy_check_mark: | supported :heavy_check_mark: |
Free version of the plugin requires location permission to be able to perform a speed test. You need to handle location permission in your app level. Check out our location policy
Note: Make sure you have completed the React Native - Environment Setup instructions till "Creating a new application" step, before proceeding.
npx react-native init [project folder]
cd [project folder]
npm i @speedchecker/react-native-plugin -- save
npm link @speedchecker/react-native-plugin
You will need to start Metro, the JavaScript bundler that ships with React Native.
To start Metro, run the following command from the root of your React Native project:
# using npm
npm start
# OR using Yarn
yarn start
Let Metro Bundler run in its own terminal. Open a new terminal from the root of your React Native project. Run the following command to start your Android or iOS app:
# using npm
npm run android
# OR using Yarn
yarn android
# using npm
npm run ios
# OR using Yarn
yarn ios
If everything is set up correctly, you should see your new app running in your Android Emulator or iOS Simulator shortly provided you have set up your emulator/simulator correctly.
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
import SpeedCheckerPlugin from '@speedchecker/react-native-plugin';
const [status, setStatus] = useState('');
const [ping, setPing] = useState('');
const [currentSpeed, setCurrentSpeed] = useState('');
const [download, setDownload] = useState('');
const [upload, setUpload] = useState('');
const [server, setServer] = useState('');
const [connectionType, setConnectionType] = useState('');
useEffect(() => {
return () => {
SpeedCheckerPlugin.removeTestStartedListener();
};
}, []);
const startTest = () => {
SpeedCheckerPlugin.addTestStartedListener((event: {
status: React.SetStateAction<string>;
ping: React.SetStateAction<string>;
currentSpeed: React.SetStateAction<string>;
downloadSpeed: React.SetStateAction<string>;
uploadSpeed: React.SetStateAction<string>;
server: React.SetStateAction<string>;
connectionType: React.SetStateAction<string>;
}) => {
setStatus(event.status || '');
setPing(event.ping);
setCurrentSpeed(event.currentSpeed);
setDownload(event.downloadSpeed);
setUpload(event.uploadSpeed);
setServer(event.server);
setConnectionType(event.connectionType);
});
SpeedCheckerPlugin.startTest();
};
SpeedCheckerPlugin.setAndroidLicenseKey('Your license key')
SpeedCheckerPlugin.setIosLicenseKey('Your license key')
If no license is set, test will be conducted in free mode and, as a result, request a location permission.
const stopTest = () => {
SpeedCheckerPlugin.stopTest();
setStatus('Speed Test stopped');
SpeedCheckerPlugin.removeTestStartedListener();
};
Now that you have successfully run the app, let's modify it.
App.tsx
in your text editor of choice and edit some lines.For Android: Press the R key twice or select "Reload" from the Developer Menu (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes!
For iOS: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes!
You've successfully run and modified your React Native App!
To uninstall the plugin, run the following commands
npm unlink @speedchecker/react-native-plugin
npm uninstall @speedchecker/react-native-plugin --save
If you can't get this to work, see the Troubleshooting page.
To learn more about React Native, take a look at the following resources:
@facebook/react-native
- the Open Source; GitHub repository for React Native.Please check our demo application in React Native which includes basic speed test functionality.
SpeedChecker is offering different types of licenses:
Items | Free | Basic | Advanced |
---|---|---|---|
Speed Test Metrics | Download / Upload / Latency | Download / Upload / Latency / Jitter | Download / Upload / Latency / Jitter |
Accompanying Metrics | Device / Network KPIs | Device / Network KPIs | Device / Network KPIs / Advanced Cellular KPIs |
Test Customization | - | test duration, multi-threading, warm-up phase etc | test duration, multi-threading, warm-up phase etc |
Location Permission | Required location permissions | - | - |
Data Sharing Requirement | Required data sharing | - | - |
Measurement Servers | - | Custom measurement servers | Custom measurement servers |
Background and passive collection | - | - | Background and Passive data collection |
Cost | FREE | Cost: Enquire | Cost: Enquire |
Yes! But the SDK collects data on network performance from your app and shares it with SpeedChecker and our clients. The free SDK version requires and enabled location. Those restrictions are not in the Basic and Advanced versions
Yes, we have both Android and iOS SDKs.
Yes! YouTube video streaming, Voice over IP and other tests are supported by our native SDK libraries. Check out our Android and iOS API documentation
No, we provide support only on Basic and Advanced plans
The free version of our plugin allows getting basic metrics which are described in this API documentation
Full list of our KPIs for Basic and Advanced versions
Yes, you do not need to run any servers. We provide and maintain a network of high-quality servers and CDNs to ensure the testing is accurate. If you wish to configure your own server, this is possible on Basic and Advanced plans.
See our measurement methodology
Please contact us for more details and license requirements.