Tapped events not firing API calls once Android is deployed to Playstore


#1

When I’m testing an Android application, the tapped event on buttons and text views makes API calls. But once I deploy it to the Google Playstore, these events do not fire off. This is one of the weirdest things I’ve ever seen. Was wondering has anyone else experienced this, and what the remedy is. Because right now, no one can signup or login to my app on Android.


#2

Whoa… That’s definitely a weird one there. Just to be safe, rebuild the project and redeploy. This sounds like something of an anomaly.


#3

I’ve rebuilt several times. I’ve tried running API requests on button click, and using text views. I have to build and deploy, wait for the deploy to hit the store each time. Now I’m trying to using menu buttons to run API requests, and see how that works.


#4

When you test it on a device is everything working as planned but when you deploy that’s when things go wrong? Am I reading that right?


#5

Yes sir! Exactly!!!..


#6

That is odd. @Nate is there anything that could be occurring in Dropsource when it comes to a test deployment versus a production deployment when it comes to settings on our side?


#7

What I can add is, I’ve been deploying my builds as an App Bundle as opposed to an APK. Android is really pushing devs that directions to compress their builds more. Last night, I went away from that, and back to an APK. Once my build is live in the store, I will check to see if that has a bearing on the issue. Also, it’s only appearing to be happening on Galaxy phones to my knowledge.


#8

The problem definitely sounds strange. At least it’s looking isolated to a certain phone so it’s not effecting everyone.

Drop an update on the recent deployment and let me know if that somehow made a difference. I Googled around a little bit and some people talk about similar oddities but no one really has a solution I can see to look into. Might have to dig around more if it persists.


#9

I bypassed the login and signup on my most recent build, just to see if the API requests would run on lifecycle events, since none ran on button events; and they did not. This confirms that the APIs are not running at all, whether a button events or lifecycle events. So at this point, it seems to be a deeper issue, out of my hands as a developer. Currently, where things stand now, users on certain devices (Galaxy is a known device), people will not be able to use the app. Please investigate.


#10

I came across this article, which suggests adding some permissions to the manifest. But I don’t want to start adding stuff, not knowing how your engine works in converting the high level drag and drop stuff to Java byte code. But here it is: https://stackoverflow.com/questions/28985870/android-httprequest-is-not-working


#11

This forum suggests the exact same remedy: https://github.com/facebook/react-native/issues/24408


#12

There seems to be a common thread, that Android has disallowed HTTP request on API 28, which is where Android is forcing your build to be now. This article has a manifest line addition suggestion as well. Let me know what you guys think. https://answers.unity.com/questions/1602555/https-requests-removed-on-android-pie-api-28.html


#13

Thank you for sharing these details. No one else has reached out about the same issue so I’m wondering if it’s isolated to your particular project.

Can you please share me a good Build ID and give me some instructions for navigating from app open to a spot where you’re expecting an API request to be performed on a button tap so I can step through the code and see what I can spy?


#14

Build ID: 1206051778053867661
Keep in mind, this will work in dev (test build). But this is the build that is currently in the Playstore.


#15

@wade So I’ve fixed this issue. In API 28, which is the API the Playstore forces you to now, removes the ability to send HTTP request is disabled by default. So before deploying, you must go into the Manifest and add
android:usesCleartextTraffic=“true” This will allow you to send API request using the HTTP protocol.

FYI, can you guys update the default API to 28, as well as the cleartext line I added above, to your builds? It’s a small thing. but extremely detrimental to a successful build deployment, especially if your app uses APIs.


#16

Ahhh this is great details. Thanks for sharing. That’s funny Android has just now this. HTTP request require intervention on the iOS side for several years now.

I will pass this to engineering as it sounds like a spot they can make an adjustment.


#17

Thanks Wade! Us devs help wherever we can. We need your product to be as good as possible.


#18

We super appreciate these learning lessons and feedback. Thanks for paying it forward!

Happy Holidays!