[
https://issues.apache.org/jira/browse/CB-10160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15061712#comment-15061712
]
Jagdish Adusumalli commented on CB-10160:
-----------------------------------------
I am also facing the same issue.
My app is not working on android when i am connected to any GSM network.
tested on Galaxy Note 2, Asus Zenfone 2, Yu yuphoria, Motorola X Play and 4-5
other phones
It works fine with Wifi networks.
Temporarily i have downgraded to 1.0.1 which
is working fine.
Please resolve this ASAP.
My complete dev stack info below
Cordova CLI: 5.4.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.1.1
Ionic CLI Version: 1.7.12
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.8.3
ios-sim version: 5.0.4
OS: Mac OS X El Capitan
Node Version: v5.2.0
Xcode version: Xcode 7.2 Build version 7C68
Showing installed npm version info :
3.5.3
Showing installed bower version info :
1.7.1
Showing installed Cordova Platforms (IOS, Android) and their versions :
Installed platforms: android 5.0.0, ios 3.9.2
Available platforms: amazon-fireos, blackberry10, browser, firefoxos, osx, webos
Showing installed brew config info :
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: d9e105042ea59fa58ff105957e196685900abd46
Last commit: 9 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit ivybridge
OS X: 10.11.2-x86_64
Xcode: 7.2
CLT: 7.2.0.0.1.1447826929
Clang: 7.0 build 700
X11: N/A
System Ruby: 2.0.0-p645
Perl: /usr/bin/perl
Python: /usr/local/bin/python =>
/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/jagdish/.rbenv/shims/ruby =>
/Users/jagdish/.rbenv/versions/2.2.3/bin/ruby
Java: 1.8.0_66
Showing installed postgres version info:
psql (PostgreSQL) 9.4.5
Showing Android tools and Platform-tools version info :
Pkg.Revision=24.4.1
Pkg.Revision=23.1
> Android - ConnectionType always returning Connection.UNKNOWN
> ------------------------------------------------------------
>
> Key: CB-10160
> URL: https://issues.apache.org/jira/browse/CB-10160
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Network Information
> Affects Versions: 1.1.0
> Environment: Apache Cordova project utilizing the Ionic Framework on
> Mac OSX. Building and deploying using Android Studio 1.5.
> Reporter: Binh Robles
> Labels: Android
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> In src/android/NetworkManager.java, all the static final String constants are
> written in all lowercase. When checking the type in GetType(), the code
> already makes this adjustment:
> {quote}private String getType(NetworkInfo info) {
> if (info != null) {
> String type =
> info.getTypeName().{color:red}toLowerCase{color}(Locale.US);{quote}
> However, if type == MOBILE or CELLULAR, the subType is not converted to all
> lowercase:
> {quote}
> else if (type.equals(MOBILE) || type.equals(CELLULAR)) {
> type = {color:red}info.getSubtypeName();{color}
> if (type.equals(GSM) ||
> type.equals(GPRS) ||
> {quote}
> For me, running on the Android emulator and pushing to a device, this was
> causing the app to always fail every subType comparison, and always return
> Connection.UNKNOWN, resulting in an app that was always 'offline'.
> After debugging the plugin, it looked like subTypes were coming in as 'GSM'
> and 'UMTS' in all-caps, and being compared to 'gsm' and 'umts', the
> lower-case pre-defined strings. I added a .toLowerCase() to the subType get,
> and everything seems to be working fine for me:
> else if (type.equals(MOBILE) || type.equals(CELLULAR)) {
> {color:green}type =
> info.getSubtypeName().toLowerCase();{color}
> if (type.equals(GSM) ||
> I'm not sure why this was an issue for me, but hasn't been in the past for
> other users. I can submit whatever environment info you might want if you let
> me know. Thanks!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]