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
- latency, download and upload speed of the user connection
- robust measuring of cellular, wireless and even local network
- testing details like the current speed and progress
- additional information like network type and location (see KPI list below in FAQ)
- included high-capacity servers provided and maintained by SpeedChecker or custom servers
- detailed statistics and reports by SpeedChecker
Android | iOS |
---|---|
supported βοΈ | supported βοΈ |
- Platform-specific requirements:
- Android:
- minSDK version: 21 or higher
- Location permissions (for free users)
- iOS:
- Xcode 13.3.1 or later
- Development Target 11.0 or later
- Android:
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();
};
}, []);
3. To start speed test by event (e.g. button click), you need to import the plugin and add "startTest" method to your App.tsx file:
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();
};
4. If you are paid user, you should set license key before you start test. Please contact us and we will provide you with licenseKey for your app:
For Android licenseKey should be setup in Application onCreate method in native flutter project code.
class MainApplication : Application() {
override fun onCreate() {
super.onCreate()
SpeedcheckerSDK.setLicenseKey(this, "Insert your key here")
}
}
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.
-
Open
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 want to add this new React Native code to an existing application, check out the Integration guide.
- If you're curious to learn more about React Native, check out the Introduction to React Native.
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:
- React Native Website - learn more about React Native.
- Getting Started - an overview of React Native and how setup your environment.
- Learn the Basics - a guided tour of the React Native basics.
- Blog - read the latest official React Native Blog posts.
@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.