GMS 2 [bug] http_post_string not working on android

duran can

Member
Not sending http_post_string on android , I have to work with http_post_string Please fix this bug.
GML:
05-07 17:23:17.409 14714 14762 I yoyo    : HttpPost("http://example.com/", "submit=test_user&id=1798573820", 63)
05-07 17:23:17.440 14714 14714 I yoyo    : [VK] SetInputString. Length: 0. New string:
05-07 17:23:17.447 14714 14762 I yoyo    : DATA::::::::::: START
05-07 17:23:17.448 14714 14762 I yoyo    : IOException
05-07 17:23:17.448 14714 14762 I yoyo    : #######################
05-07 17:23:17.448 14714 14762 I yoyo    : ######### data founded ##############
05-07 17:23:17.448 14714 14762 I yoyo    : #######################
05-07 17:23:17.448 14714 14762 I yoyo    :
05-07 17:23:17.448 14714 14762 I yoyo    : DATA::::::::::: END
 

FrostyCat

Member
Show your actual code, not just the debug output.

Also, plain HTTP traffic (i.e. not encrypted HTTPS traffic) on Android is banned on Pie and above unless you set this in Option > Android > Permissions > Inject to Android Application Tag:
Code:
android:usesCleartextTraffic="true"
 

GameDevDan

The Jam Host
Moderator
GMC Elder
Or - use https on your website & in the link passed from GameMaker (in which case the only Android permission you should need is access to the internet).

GML:
http_post_string("https://mysite.uk/login.php?","APP_TOKEN=blahblahblah");
 

FrostyCat

Member
HTTPS is also required if you plan to publish the app to Google Play. android:usesCleartextTraffic is only a workaround for local development.
 
Top