Hey everyone,
I have finally succeeded in live-streaming to my webpage.
Although, I work with HTTP POST Method and everytime the Timer runs of, it executes some Java Code that initializes a new HTTP Client and sends the data. This takes long and gives me sometimes an ANR message.
1) Is there a way in B4A to keep a connection open between the device and the webserver or doesn't this really matter?
2) I use this:
in my Java to pass the data to my PHP code.
How should I assign the correct data ba1 to image and FrameProtect to PHPProtect within the POST Method to send to the webserver.
3) How can you change the time out settings until a ANR message appears.
Thanks,
XverhelstX
I have finally succeeded in live-streaming to my webpage.
Although, I work with HTTP POST Method and everytime the Timer runs of, it executes some Java Code that initializes a new HTTP Client and sends the data. This takes long and gives me sometimes an ANR message.
B4X:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new
HttpPost(WebServer);
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
1) Is there a way in B4A to keep a connection open between the device and the webserver or doesn't this really matter?
2) I use this:
B4X:
ArrayList<NameValuePair> nameValuePairs = new
ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("image",ba1));
nameValuePairs.add(new BasicNameValuePair("PHPProtect",FrameProtect));
in my Java to pass the data to my PHP code.
B4X:
if (isset($_REQUEST['PHPProtect'])) {
$isProtected=$_REQUEST['PHPProtect'];
How should I assign the correct data ba1 to image and FrameProtect to PHPProtect within the POST Method to send to the webserver.
3) How can you change the time out settings until a ANR message appears.
Thanks,
XverhelstX