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

2 Answers 2

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.

4
  • How were you able to check that the shared preference got corrupted?
    – James D
    Commented Aug 2, 2020 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
    Commented Aug 4, 2020 at 2:51
  • 1
    Aha, something like stackoverflow.com/questions/23635644/… then?
    – James D
    Commented Aug 4, 2020 at 6: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
    Commented Aug 21, 2020 at 7:24
0

Just add the following line in your Manifest.xml:

android:usesCleartextTraffic="true"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.