Android Question Fetch data from wikipedia api

DIYMicha

Member
Okay, so I tried the whole day now, to fetch the text of a wikipedia article via the wikipedia api. My own try to get this failed always with
Code: Copy
ResponseError. Reason: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb92080a8: Failure in SSL library, usually a protocol error
so my next approach was to use an example by eren, and alter it to my needs. But still the same issue. Okay, so I marked out my request, and added "https://www.google.de" and - now it works. But thats completely illogical. so I tried some more:

"https://www.google.de" -> works
"https://www.bing.com" -> works
"https://www.duckduckgo.com" -> doesn't work?
"https://en.wikipedia.org/wiki/Main_Page" -> doesn't work??
"https://www.b4x.com" -> works
"https://www.ebay.de" -> works
and of course my needed
"https://de.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&titles=bärlauch" -> doesn't work???????????

but if I paste those directly in the browser, it works. So why do some work, and some don't if the only thing I change is the string variable, and leave the code as is?

Code: Copy
    ApiTextLink = "https://www.ebay.de"
    
    Log (ApiTextLink)
    
    httpJobs.Initialize("",Me)
    httpJobs.Download(ApiTextLink)
    wait for (httpJobs) JobDone (httpJobs As HttpJob)
    If httpJobs.Success Then
        Log(httpJobs.GetString)
        Log("Hedasack geht!")
    Else
        Log("Hedasack geht NICHT!")
    End If
    httpJobs.Release
 
Thank you Erel.

Oh my... Programming Android really gives me headaches... I'm using LeapdroidVM to debug, even if it's not maintained for years now, it felt good. Easy to install, extremely light weight, loads in seconds. I'm running it on a somewhat outdated PC. Works with B4A perfectly. Except it runs And4...
Turns out I have to search for another Emulator. I tried a lot, but most of them are extremely resource hungry, especially the android studio ones, or throw one exception after the other... I'm frustrated.
Excuse me, I've got to go into my corner and cry now.

Any suggestions for another light weight Emu?
 
Upvote 0
Back
Top