AhmetAbak/cocos2dxInternetConnectionChecker
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This helper class is mostly created from the codes taken from internet .( mostly stackoverflow.com ) Main aim of this code pieces is to unify the internet check for iOS and Android OS for cocos2d-x. I didnt try it for other tools. But it may work with small changes. In iOS folder there 2 classes. Just add them to proj.ios_mac/ios folder. and add them to project by right clicking the group and add new files option over xcode. In Android folder there is 1 class. add it to proj.android-studio/app/src/your/package/name. And lastly; In CocosProject folder add InternetStatus file to somewhere in Classes. Important note: you have to change the package names in JNI methods in InternetStatus to your package name. Currently they are com/sngict/game/connection/Connectivity. you have to convert them to your/package/name/Connectivity to make them work. there are 3 basic static functions usages are simple: InternetStatus::hasInternetConnection(); InternetStatus::isConnectionFast(); InternetStatus::isConnectionTypeMobile(); code tested in iOS 7+ and Android 4.1.3+.
About
This helper classes will let you check internet connection, speed and type on cocos2d-x game development for Android and iOS
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published