4

I looked this up quite a bit and so far what I gathered is that this is a Samsung issue that involves the HttpUrlConnection not being able to work on a Samsung for some reason. So how do I go about fixing this. I could not understand what the other people have said to do to fix this. The app runs perfectly on a emulator but dies on both Samsung phones I have for testing. One of the samsongs is a S4 active Android 5.0.1 API 21

I am using the same http calls to download other data and that works just fine. It is just when I try to access a login page that it won't even go to it. I don't think that there is anything wrong with my code because it works on the emulator just fine.

This is what the output error is giving me Thank for any help with this.

W/InstanceID/Rpc: Found 10063
E/ViewSystem: ViewRootImpl #2 Surface is not valid.
D/AbsListView: Get MotionRecognitionManager
I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
I/System.out: (HTTPLog)-Static: isShipBuild true
/System.out: (HTTPLog)-Thread-35911-714863967: SmartBonding Enabling is false, 
    SHIP_BUILD is true, log to file is false, DBG is false
/System.out: (HTTPLog)-Static: isSBSettingEnabled false
JJD
  • 50,076
  • 60
  • 203
  • 339
MNM
  • 2,673
  • 6
  • 38
  • 73

2 Answers2

7

Ok i found out what went wrong. I was using a shared preference that got corrupted when I uninstalled it from the device and reinstalled it. Then I would send the wrong stored values to the loginpage which would think it was right and then send it along its merry way not caring. Stupid login page. Just goes to show you you can't always rely on the logcat for all your needs. Thank for anyone who looked at this.

MNM
  • 2,673
  • 6
  • 38
  • 73
  • How were you able to check that the shared preference got corrupted? – James D Aug 02 '20 at 21:47
  • If I recall corrctly I started to look at the preference directly once on a clean install and then removed the app and then reinstalled it but still saw the original ID number form the old install which does not get overwritten. – MNM Aug 04 '20 at 02:51
  • 1
    Aha, something like https://stackoverflow.com/questions/23635644/how-can-i-view-the-shared-preferences-file-using-android-studio then? – James D Aug 04 '20 at 06:37
  • Yes, that looks familiar. I am sorry I can't help much I has been a really long time and I have moved away from that project 4 years ago. – MNM Aug 21 '20 at 07:24
0

Just add the following line in your Manifest.xml:

android:usesCleartextTraffic="true"
Nikos Hidalgo
  • 3,666
  • 9
  • 25
  • 39