okhttputils2

  1. P

    Android Question Download huge files with HttpUtils2 in B4xpages

    Download huge files with HttpUtils2 Sub btnDownload_Click Dim dd As DownloadData dd.url = link1 '<--- download link dd.EventName = "dd" dd.Target = Me CallSubDelayed2(DownloadService, "StartDownload", dd) End Sub Please, i used to use the above example to download files with...
  2. W

    Android Question Http's Request's Timeout seems not be configured

    Hi, I am using library OkHttpUtils2 and find the timeout of Http's request sticked to around 20 seconds but cannot be assigned. My testing codes is: #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region Sub Process_Globals 'These global variables will be...
  3. H

    Android Question Upload file, e.g. jpg using okHttUtils2

    A service or a server, not B4J server, is accepting the ff. HTTP PUT command. curl -vX PUT http://admin:password@127.0.0.1:5984/albums/6e1295ed6c29495e54cc05947f18c8af/artwork.jpg?rev=2-2739352689 --data-binary @artwork.jpg -H "Content-Type:image/jpg" I tried the sample provided by the link...
  4. Erick Kalugdan

    Android Question Select file (like PDF) then upload via WebView or OkHttpUtils2

    I have a web app (written in PHP) which is accessed by a WebView in my B4A app. I need the user to select a file (like PDF) from his phone and upload it to my web app via form POST as multipart/form-data. Note that the file is outside my app's assets / internal directories. I can't seem to...
  5. A

    Android Question Block Incoming calls

    Hi all. Is it possible to block incoming calls? My app synchronizes with a server by using OkHTTPUtils2. Let's say I sent a request and waiting for a JobDone event to get a server response. At the same time an incoming call received. User accepted this this call and now my app get paused and...
  6. AriGharavi

    Android Question okhttputils2 Error - javax.net.ssl.SSLHandshakeException

    Hi guys! I have problem with sending request with okhttputils2 and httputils. this is my code : #Region Project Attributes #ApplicationLabel: B4A_register #VersionCode: 1 #VersionName: 'SupportedOrientations possible values: unspecified, landscape or portrait...
  7. B

    Android Question OkHTTPUtlis2 Connection problem on Android 10

    Hello, I post data to my server with OkHttpUtils2 and it works. But my server not have SSL and that is why my program does not work in Android 10. I do not know what to do to connect to the server in Android 10 without SSL.
  8. P

    Android Question OkHttpUtils2 2.82 / 2.91 compatibility issue

    Error with OkHttpUtils2 2.91 B4A Version: 9.80 Java Version: 8 Parsing code. Error Error parsing program. Error description: Unknown type: jobtag Are you missing a library reference? Error occurred on line: 74 (HttpUtils2Service) Dim jt As JobTag = j.Tag OkHttpUtils2 2.82 shipped with B4A...
  9. MohsenSaber2019

    Android Question B4A ResponseError. Reason: java.net.SocketException: Machine is not on the network, Response:

    Hi All. i wrote an app that connects to my ESP8266 local web server. everythings is ok on Android 4.4.2 . But in Android 7+ i'm facing a boring problem! I have written a function (named NetCheck) whose function is to check the status of the network. If the connected network is not the network...
  10. saeed10051

    Android Question How to get an array using okhttputils2

    I am using following php script and it is returning an array to me. How can i get the data out of this array as i am using j as httpjob, but httpjob does not have a get array type of method. $result = $conn->query("SELECT * FROM menuitems"); if ($result->num_rows > 0) { $rows = array()...
  11. A

    Android Question Wait For with OkHTTPUtils2 and CallSubDelayed

    Hi, I have a question. I created a small project (see the attachment) where I tried to learn how to work with a subject. I created a class where I put all the logic -the main procedure in this class calls a private sub that sends request to the server Sub Class_Globals Public FacilityID...
  12. Songwut K.

    Android Example B4A and PHP REST

    Thanks @Erel for free version that I plan to buy but donate instead. I'll share my B4A knowledge in Thailand, your great product must popular, later. PHP is well known for web developer, it cheap resource and easy to learn in Thailand. Backend system easy manage by PHP & MySQL but till now...
  13. C

    Android Question JSON Post, quotes in wrong place

    Hi everyone; I'm having a rough time posting a particular JSON object. The JSONParser works perfectly, but when the resulting map is posted, the quotes for the array type and JSON type end up in the wrong place, breaking the object. Sub btnSend_Click...
  14. chris_selkis

    Android Question to read html with okhttputils 2 - character encoding

    Hello, sorry for my bad English. I'm using OkHttputils2 to download a text file and read it. this file contains html code. I display this code in a webview. it works well except for the characters "éèà% .." is there a library to read this encoding correctly? or how can I do it. thank you
  15. james_sgp

    Android Question OKHTTPUTILS2 Wait For, .GetString Error

    Hi, Im using OKHTTPUTILS2 with a Wait For; and it is causing me a .GetString error saying 'File Not Found'. I`ve been searching the forum for hours but can`t seem to find a solution. Below is the code I`m using, which I copied from the example: Dim login_job As HttpJob Dim act As...
  16. KMatle

    B4J Tutorial [B4x] Exchange Data via OkHttpUtils and php (or other platforms) via lists, maps, arrays, etc.

    I made 7 examples how to exchange data between B4x apps and php. I use the POSTSTRING method as it is simple, secure (get-methods will be logged with the data autmatically on the server, post-methods not), strings can be formatted very easy (JSON) and en-/decrypted (not included but see my other...
  17. D

    Android Question Unable to resolve host using OkHttpUtils2

    I am using the following boilerplate code for OkHttpUtils2 with Wait For: Public Sub FetchData Dim myJob As HttpJob myJob.Initialize("", Me) myJob.Download("https://www.wikipedia.org/") Wait For (myJob) JobDone (myJob As HttpJob) If myJob.Success Then...
  18. trejocode

    Spanish [RESUELTO] OkHTTPUtils2 - MySQL Bloqueante

    Hola, tengo un problema es que no alcanzo a comprender del todo como "Bloquear" una petición HTTP por que utilizo Wait For (Resumable). Miren el caso: Selecciono mis elementos de mi base de datos local, y luego envío los datos a una API pero no se envían de forma apropiada por que, como es un...
  19. D

    Android Question Upload text file with OkHttpUtils2

    After successfully figuring out (with assistance here) how to download an .mp3 file from the internet, I am trying upload a .txt file to the internet. The libraries I have installed are: Core (v 8.30), OkHttp (v 1.2), RuntimePermissions (v 1.1), and StringUtils (v 1.12) I also have HttpJob and...
  20. D

    Android Question Downloading Internet files with OkHttpUtils2

    I am trying download .mp3 files from the internet. I have tried without success from two different web locations; one requiring a username and password and one that does not. In both cases I get the same error message: ***Error: javax.net.ssl.SSLHandshakeException...
Top